-
+
+ {{ title }}
+
+
+
+
-
+
{{ model }}
-
+
{{ getOptionDescription(model) }}
+
- {{ option }}
+ {{ option.value }}
diff --git a/app/pages/charts.vue b/app/pages/charts.vue
index cbf5edf..a6088b2 100644
--- a/app/pages/charts.vue
+++ b/app/pages/charts.vue
@@ -37,13 +37,27 @@
const time = useFilterItem("time", "all");
const times = computed(() => {
if (isProjectStats.value) {
- return ["all", "last 30 days", "today"];
+ return [
+ { value: "all", description: "Display Full available history" },
+ { value: "last 30 days", description: "Display only last 30 days" },
+ { value: "today", description: "Display only Today" },
+ ];
}
if (isRevenueStats.value) {
- return ["all", "last 30 days", "raw"];
+ return [
+ { value: "all", description: "Display Full available history" },
+ { value: "last 30 days", description: "Display only last 30 days" },
+ {
+ value: "raw",
+ description: "Display Full available time with out smoothing",
+ },
+ ];
}
- return ["all", "last 30 days"];
+ return [
+ { value: "all", description: "Display Full available history" },
+ { value: "last 30 days", description: "Display only last 30 days" },
+ ];
});
const aggregate = useFilterItem("aggregate", "yes");
@@ -54,19 +68,46 @@
const versionFrom = useFilterNullableItem("version_from", undefined);
const versionTo = useFilterNullableItem("version_to", undefined);
- const { to, from } = await useVersionRange(
+ const { to: toRaw, from: fromRaw } = await useVersionRange(
versionGroup,
versionTo,
versionFrom,
);
+ const to = computed(() =>
+ toRaw.value.map((v) => {
+ return {
+ value: v,
+ description: `The Minecraft version ${v} is the first to be displayed`,
+ };
+ }),
+ );
+ const from = computed(() =>
+ fromRaw.value.map((v) => {
+ return {
+ value: v,
+ description: `The Minecraft version ${v} is the last to be displayed`,
+ };
+ }),
+ );
+
watch([versionGroup], () => {
versionFrom.value = undefined;
versionTo.value = undefined;
});
- const gameVersions = await useGameVersions(versionGroup);
- const defaultVersion = computed(() => gameVersions.value[0] as string);
+ const gameVersionsRaw = await useGameVersions(versionGroup);
+ const defaultVersion = computed(() => gameVersionsRaw.value[0] as string);
+
+ const gameVersions = computed(() =>
+ gameVersionsRaw.value.map((v) => {
+ return {
+ value: v,
+ description: `Only display the Minecraft version ${v}`,
+ };
+ }),
+ );
+
const version = useFilterItem("version", defaultVersion);
const isGroupData = computed(() => {
@@ -122,40 +163,73 @@
:should-display="true"
v-model="projectType"
:options="[
- 'mod',
- 'plugin',
- 'datapack',
- 'shader',
- 'resourcepack',
- 'modpack',
- 'projects',
- 'versions',
- 'authors',
- 'files',
- 'revenue',
+ {
+ value: 'mod',
+ description: 'Minecraft Mods on Modrinth',
+ },
+ {
+ value: 'plugin',
+ description: 'Minecraft Plugins on Modrinth',
+ },
+ {
+ value: 'datapack',
+ description: 'Minecraft Datapacks on Modrinth',
+ },
+ {
+ value: 'shader',
+ description: 'Minecraft Shaders on Modrinth',
+ },
+ {
+ value: 'resourcepack',
+ description: 'Minecraft Resourcepacks on Modrinth',
+ },
+ {
+ value: 'modpack',
+ description: 'Minecraft Modpacks on Modrinth',
+ },
+ {
+ value: 'projects',
+ description: 'Number of Projects on Modrinth',
+ },
+ {
+ value: 'versions',
+ description: 'Number of Versions on Modrinth',
+ },
+ {
+ value: 'authors',
+ description: 'Number of Authors on Modrinth',
+ },
+ {
+ value: 'files',
+ description: 'Number of Files on Modrinth',
+ },
+ {
+ value: 'revenue',
+ description: 'Revenue on Modrinth',
+ },
]"
title="Type"
- explanation=""
+ explanation="What type of project should be displayed"
/>
@@ -164,7 +238,7 @@
v-model="time"
:options="times"
title="Time"
- explanation=""
+ explanation="What Time period should be displayed"
/>