From fe46db6bc620ef07418c90411ea2edaa8099ef40 Mon Sep 17 00:00:00 2001 From: Abizrh Date: Fri, 15 Aug 2025 16:30:48 +0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat=20(dashboard):=20implement=20d?= =?UTF-8?q?ashboard=20page=20with=20summary=20cards=20and=20quick=20action?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/flow/dashboard/index.vue | 185 +++++++++++++++++++++++ app/components/pub/base/summary-card.vue | 4 +- app/composables/useXfetch.ts | 4 +- app/pages/index.vue | 183 +--------------------- 4 files changed, 191 insertions(+), 185 deletions(-) create mode 100644 app/components/flow/dashboard/index.vue diff --git a/app/components/flow/dashboard/index.vue b/app/components/flow/dashboard/index.vue new file mode 100644 index 00000000..9b591024 --- /dev/null +++ b/app/components/flow/dashboard/index.vue @@ -0,0 +1,185 @@ + + + diff --git a/app/components/pub/base/summary-card.vue b/app/components/pub/base/summary-card.vue index d3413111..7b45af84 100644 --- a/app/components/pub/base/summary-card.vue +++ b/app/components/pub/base/summary-card.vue @@ -44,10 +44,10 @@ const isTrending = computed(() => (props.stat?.trend ?? 0) > 0) - + {{ props.stat.title }} - +
diff --git a/app/composables/useXfetch.ts b/app/composables/useXfetch.ts index e4e4c3ef..3f27c07f 100644 --- a/app/composables/useXfetch.ts +++ b/app/composables/useXfetch.ts @@ -1,3 +1,5 @@ +import type { Pinia } from 'pinia' + export interface XError { code: string message: string @@ -75,7 +77,7 @@ export async function xfetch( function clearStore() { const { $pinia } = useNuxtApp() - const userStore = useUserStore($pinia) + const userStore = useUserStore($pinia as Pinia) userStore.logout() navigateTo('/401') } diff --git a/app/pages/index.vue b/app/pages/index.vue index f745ba70..efb292f7 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -1,190 +1,9 @@