Skip to content

A self-hosted media server and file management system

chore: make dashboard sidebar item a type

aminnausinf5e3d0a4bd46
diff --git a/resources/js/types/types.ts b/resources/js/types/types.ts
index 263f9c7c..a5ac9a7d 100644
--- a/resources/js/types/types.ts
+++ b/resources/js/types/types.ts
@@ -343,3 +343,12 @@ export interface LyricItem {
time: number;
percentage: number;
}
+
+export interface SidebarTabItem {
+ name: string;
+ title?: string;
+ description?: string;
+ info?: { value: string; icon?: Component };
+ icon?: Component;
+ disabled?: boolean;
+}
diff --git a/resources/js/views/DashboardView.vue b/resources/js/views/DashboardView.vue
index 86adab51..4eb0de55 100644
--- a/resources/js/views/DashboardView.vue
+++ b/resources/js/views/DashboardView.vue
@@ -1,7 +1,8 @@
<script setup lang="ts">
-import type { AppManifest, TaskStatsResponse } from '@/types/types';
+import type { SidebarTabItem, TaskStatsResponse } from '@/types/types';
+import type { Ref } from 'vue';
-import { computed, onMounted, ref, watch, type Component, type Ref } from 'vue';
+import { computed, onMounted, ref, watch } from 'vue';
import { useDashboardStore } from '@/stores/DashboardStore';
import { useAuthStore } from '@/stores/AuthStore';
import { useAppStore } from '@/stores/AppStore';
@@ -34,16 +35,7 @@ const { userData } = storeToRefs(useAuthStore());
const dashboardTab = ref<{ name: string; title?: string; icon?: any }>();
-const dashboardTabs = computed<
- {
- name: string;
- title?: string;
- description?: string;
- info?: { value: string; icon?: Component };
- icon?: Component;
- disabled?: boolean;
- }[]
->(() => {
+const dashboardTabs = computed<SidebarTabItem[]>(() => {
return [
{
name: 'overview',