diff --git a/README.md b/README.md index 11d5fd4..a6dff19 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ a Page to view some global statistics about [Modrinth](https://modrinth.com/) ### Planned Features * data on specific projects - Same graphs as for mods but only showing a single project -* revenue - https://api.modrinth.com/v3/payout/platform_revenue ### .env diff --git a/app/pages/charts.vue b/app/pages/charts.vue index e148401..f8ed085 100644 --- a/app/pages/charts.vue +++ b/app/pages/charts.vue @@ -33,11 +33,25 @@ const isGlobalStats = computed(() => { ); }); +const isRevenueStats = computed(() => { + return ["revenue"].includes( + projectType.value, + ); +}); + +const isGroupData = computed(() => { + return time.value === 'current' && !isGlobalStats.value && !isRevenueStats.value; +}) + const url = computed(() => { if (isGlobalStats.value) { return "/api/stats/time/global"; } + if (isRevenueStats.value) { + return "/api/stats/time/revenue"; + } + return time.value === "current" ? "/api/stats/projects" : "/api/stats/time/projects"; @@ -77,8 +91,8 @@ onMounted(() => {