From 22d6703ab703dcde82031fa7518bf1cc0799a78b Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Sun, 21 Jul 2024 01:18:41 +0800 Subject: [PATCH] feat: add download count (#22) --- home.tsx | 6 ++++- plugins.ts | 1 + readInfoFile.ts | 11 ++++++++ utils/github.ts | 69 +++++++++++++++++++++++++++++++++++++------------ 4 files changed, 69 insertions(+), 18 deletions(-) diff --git a/home.tsx b/home.tsx index 61f94fe..6d6620b 100644 --- a/home.tsx +++ b/home.tsx @@ -70,9 +70,11 @@ function renderPlugins(data: PluginsData) {
Name
URL
+
Latest Downloads
+
Total Downloads
- {data.latest.map(plugin => renderPlugin(plugin))} + {data.latest.map((plugin) => renderPlugin(plugin))} ); } @@ -82,6 +84,8 @@ function renderPlugin(plugin: PluginData) {
{plugin.name}
{plugin.url}
+
{plugin.downloadCount.currentVersion}
+
{plugin.downloadCount.allVersions}