Skip to content

A self-hosted media server and file management system

feat: add breadcrumbs to settings and make spacing and structure consistent between settings and dashboard

aminnausin2bc64188faba
diff --git a/resources/js/components/dashboard/DashboardActivity.vue b/resources/js/components/dashboard/DashboardActivity.vue
index b79dd598..8f0cad1f 100644
--- a/resources/js/components/dashboard/DashboardActivity.vue
+++ b/resources/js/components/dashboard/DashboardActivity.vue
@@ -55,30 +55,28 @@ const handleSearch = (query: string) => {
</script>
<template>
- <section id="tasks-snapshot" class="flex gap-4 flex-col">
- <div class="flex items-center gap-2 justify-between flex-wrap">
- <p class="uppercase">Running: {{ categories?.length }}</p>
- <div class="flex flex-wrap items-center gap-2 [&>*]:h-8">
- <ButtonText title="Start New Task" @click="toast.add('Success', { type: 'success', description: 'Submitted Scan Request!', life: 3000 })" disabled>
- <template #text>New Task</template>
- <template #icon><ProiconsAdd /></template>
- </ButtonText>
- <ButtonText @click="toast.add('Success', { type: 'success', description: 'Submitted File Indexing Request!', life: 3000 })" disabled>
- <template #text>Run File Scan</template>
- <template #icon><ProiconsArrowSync /></template>
- </ButtonText>
- </div>
+ <div class="flex items-center gap-2 justify-between flex-wrap">
+ <p class="uppercase">Running: {{ categories?.length }}</p>
+ <div class="flex flex-wrap items-center gap-2 [&>*]:h-8">
+ <ButtonText title="Start New Task" @click="toast.add('Success', { type: 'success', description: 'Submitted Scan Request!', life: 3000 })" disabled>
+ <template #text>New Task</template>
+ <template #icon><ProiconsAdd /></template>
+ </ButtonText>
+ <ButtonText @click="toast.add('Success', { type: 'success', description: 'Submitted File Indexing Request!', life: 3000 })" disabled>
+ <template #text>Run File Scan</template>
+ <template #icon><ProiconsArrowSync /></template>
+ </ButtonText>
</div>
- <TableBase
- :use-grid="'grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 2xl:grid-cols-4 3xl:grid-cols-5 gap-3'"
- :use-pagination="true"
- :data="[...filteredCategories]"
- :row="LibraryCard"
- :click-action="() => {}"
- :loading="false"
- :sort-action="handleSort"
- :sorting-options="sortingOptions"
- @search="handleSearch"
- />
- </section>
+ </div>
+ <TableBase
+ :use-grid="'grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 2xl:grid-cols-4 3xl:grid-cols-5 gap-3'"
+ :use-pagination="true"
+ :data="[...filteredCategories]"
+ :row="LibraryCard"
+ :click-action="() => {}"
+ :loading="false"
+ :sort-action="handleSort"
+ :sorting-options="sortingOptions"
+ @search="handleSearch"
+ />
</template>
diff --git a/resources/js/components/dashboard/DashboardAnalytics.vue b/resources/js/components/dashboard/DashboardAnalytics.vue
index 068bbc42..842c503c 100644
--- a/resources/js/components/dashboard/DashboardAnalytics.vue
+++ b/resources/js/components/dashboard/DashboardAnalytics.vue
@@ -59,59 +59,58 @@ watch(
);
</script>
<template>
- <section class="flex flex-wrap gap-4 flex-col">
- <div class="flex items-center gap-2 justify-between flex-wrap">
- <BreadCrumbs :bread-crumbs="breadCrumbs" />
+ <div class="flex items-center gap-2 justify-between flex-wrap">
+ <BreadCrumbs :bread-crumbs="breadCrumbs" />
- <div class="flex items-center flex-wrap gap-2 ml-auto text-sm font-medium">
- <h5>Time Period</h5>
- <button
- v-for="(validPeriod, index) in validPeriods"
- :key="index"
- @click="period = validPeriod.value"
- :class="`font-semibold ${period === validPeriod.value ? 'text-gray-700 dark:text-gray-300' : 'text-gray-300 dark:text-gray-600'} hover:text-gray-400 dark:hover:text-gray-500`"
- >
- {{ validPeriod.key }}
- </button>
- </div>
- <div class="flex flex-wrap items-center gap-2 [&>*]:h-fit [&>*]:xs:h-8 w-full">
- <ButtonText @click.stop.prevent="handleStartTask('scan')" :text="'Run Full Scan'" class="flex-1 xs:flex-initial">
- <template #icon><ProiconsArrowSync /></template>
- </ButtonText>
- <BasePopover popoverClass="!w-52 rounded-lg mt-10 " :button-attributes="{ title: 'Start New Task', text: 'New Task', class: 'h-full' }" ref="taskPopover" class="">
- <template #buttonIcon>
- <ProiconsAdd />
- </template>
- <template #content>
- <DashboardTaskMenu @handle-close="taskPopover?.handleClose" :show-scan-all="false" />
- </template>
- </BasePopover>
- <ButtonText :to="'/pulse'" text="Pulse" class="flex-1 xs:flex-initial">
- <template #icon><ProiconsBolt /></template>
- </ButtonText>
- </div>
+ <div class="flex items-center flex-wrap gap-2 ml-auto text-sm font-medium">
+ <h5>Time Period</h5>
+ <button
+ v-for="(validPeriod, index) in validPeriods"
+ :key="index"
+ @click="period = validPeriod.value"
+ :class="`font-semibold ${period === validPeriod.value ? 'text-gray-700 dark:text-gray-300' : 'text-gray-300 dark:text-gray-600'} hover:text-gray-400 dark:hover:text-gray-500`"
+ >
+ {{ validPeriod.key }}
+ </button>
</div>
- <PulseServers :pulseData="pulseData" :isLoading="pulseLoading" />
- <span class="mx-auto grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-6 gap-6 w-full">
- <DashboardCard cols="2" :rows="4" :title="'Data changes over time'" :name="'Data Changes'" :details="`past ${periodForHumans(period)}`">
- <template #icon>
- <LucideChartNoAxesCombined class="w-6 h-6" />
+ <div class="flex flex-wrap items-center gap-2 [&>*]:h-fit [&>*]:xs:h-8 w-full">
+ <ButtonText @click.stop.prevent="handleStartTask('scan')" :text="'Run Full Scan'" class="flex-1 xs:flex-initial">
+ <template #icon><ProiconsArrowSync /></template>
+ </ButtonText>
+ <BasePopover popoverClass="!w-52 rounded-lg mt-10 " :button-attributes="{ title: 'Start New Task', text: 'New Task', class: 'h-full' }" ref="taskPopover" class="">
+ <template #buttonIcon>
+ <ProiconsAdd />
</template>
- <template #slot>
- <span v-for="(stat, index) in stats?.changes" :key="index" class="flex gap-2 capitalize items-center flex-wrap">
- <h3 class="text-sm dark:text-slate-400 text-slate-500 w-full text-nowrap">{{ stat.title }}</h3>
- <span>
- <h3 class="text-lg">{{ stat.count ?? 0 }}</h3>
- </span>
- <h4 :class="`text-sm ${stat.change >= 0 ? 'text-green-700 dark:text-green-600' : 'text-rose-500'} ml-auto`">
- {{ `${stat.change === 0 ? 'no change' : `${stat.change >= 0 ? '+' : '-'}${stat.change}`}` }}
- </h4>
- </span>
+ <template #content>
+ <DashboardTaskMenu @handle-close="taskPopover?.handleClose" :show-scan-all="false" />
</template>
- </DashboardCard>
- <PulseUsage :pulseData="pulseData" :isLoading="pulseLoading" :period="period" :rows="4" />
- <PulseQueues :pulseData="pulseData" :isLoading="pulseLoading" :period="period" :rows="2" />
- <PulseRequests :pulseData="pulseData" :isLoading="pulseLoading" :period="period" :rows="2" />
- </span>
- </section>
+ </BasePopover>
+ <ButtonText :to="'/pulse'" text="Pulse" class="flex-1 xs:flex-initial">
+ <template #icon><ProiconsBolt /></template>
+ </ButtonText>
+ </div>
+ </div>
+ <span class="mx-auto grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-6 gap-6 w-full">
+ <PulseServers :pulseData="pulseData" :isLoading="pulseLoading" cols="6" :rows="1" />
+
+ <DashboardCard cols="2" :rows="4" :title="'Data changes over time'" :name="'Data Changes'" :details="`past ${periodForHumans(period)}`">
+ <template #icon>
+ <LucideChartNoAxesCombined class="w-6 h-6" />
+ </template>
+ <template #slot>
+ <span v-for="(stat, index) in stats?.changes" :key="index" class="flex gap-2 capitalize items-center flex-wrap">
+ <h3 class="text-sm dark:text-slate-400 text-slate-500 w-full text-nowrap">{{ stat.title }}</h3>
+ <span>
+ <h3 class="text-lg">{{ stat.count ?? 0 }}</h3>
+ </span>
+ <h4 :class="`text-sm ${stat.change >= 0 ? 'text-green-700 dark:text-green-600' : 'text-rose-500'} ml-auto`">
+ {{ `${stat.change === 0 ? 'no change' : `${stat.change >= 0 ? '+' : '-'}${stat.change}`}` }}
+ </h4>
+ </span>
+ </template>
+ </DashboardCard>
+ <PulseUsage :pulseData="pulseData" :isLoading="pulseLoading" :period="period" :rows="4" />
+ <PulseQueues :pulseData="pulseData" :isLoading="pulseLoading" :period="period" :rows="2" />
+ <PulseRequests :pulseData="pulseData" :isLoading="pulseLoading" :period="period" :rows="2" />
+ </span>
</template>
diff --git a/resources/js/components/dashboard/DashboardLibraries.vue b/resources/js/components/dashboard/DashboardLibraries.vue
index 52b7b9ea..1f535508 100644
--- a/resources/js/components/dashboard/DashboardLibraries.vue
+++ b/resources/js/components/dashboard/DashboardLibraries.vue
@@ -216,60 +216,58 @@ watchEffect(() => {
onMounted(() => {});
</script>
<template>
- <section id="content-libraries" class="flex gap-4 flex-col">
- <div class="flex items-center gap-2 justify-between flex-wrap">
- <BreadCrumbs :bread-crumbs="breadCrumbs" />
+ <div class="flex items-center gap-2 justify-between flex-wrap">
+ <BreadCrumbs :bread-crumbs="breadCrumbs" />
- <p class="capitalize font-medium" v-if="stateLibraryId < 0">Count: {{ stateLibraries?.length }}</p>
- <span v-else class="flex overflow-clip gap-2">
- <p class="capitalize font-medium">Count: {{ stateLibraryFolders?.length }}</p>
- <p class="capitalize font-medium">Videos: {{ stateLibraryFolders?.reduce((total: number, folder: FolderResource) => total + Number(folder.file_count), 0) }}</p>
- </span>
- <div class="flex flex-wrap items-center gap-2 [&>*]:h-fit [&>*]:xs:h-8 w-full">
- <ButtonText title="Add New Library" disabled class="hidden">
- <template #text>New Library</template>
- <template #icon><ProiconsAdd /></template>
- </ButtonText>
- <ButtonText @click="handleStartScan" :title="'Index Files'">
- <template #text>Scan For Changes</template>
- <template #icon><ProiconsSearch /></template>
- </ButtonText>
- </div>
+ <p class="capitalize font-medium" v-if="stateLibraryId < 0">Count: {{ stateLibraries?.length }}</p>
+ <span v-else class="flex overflow-clip gap-2">
+ <p class="capitalize font-medium">Count: {{ stateLibraryFolders?.length }}</p>
+ <p class="capitalize font-medium">Videos: {{ stateLibraryFolders?.reduce((total: number, folder: FolderResource) => total + Number(folder.file_count), 0) }}</p>
+ </span>
+ <div class="flex flex-wrap items-center gap-2 [&>*]:h-fit [&>*]:xs:h-8 w-full">
+ <ButtonText title="Add New Library" disabled class="hidden">
+ <template #text>New Library</template>
+ <template #icon><ProiconsAdd /></template>
+ </ButtonText>
+ <ButtonText @click="handleStartScan" :title="'Index Files'">
+ <template #text>Scan For Changes</template>
+ <template #icon><ProiconsSearch /></template>
+ </ButtonText>
</div>
- <TableBase
- v-if="stateLibraryId > 0"
- :use-grid="'grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 3xl:grid-cols-5 gap-3'"
- :use-pagination="true"
- :data="filteredFolders"
- :row="LibraryFolderCard"
- :loading="isLoadingLibraryFolders"
- :sort-action="handleFolderSort"
- :click-action="handleFolderAction"
- :sorting-options="folderSortingOptions"
- @search="
- (query: string) => {
- searchQuery = query;
- }
- "
- />
+ </div>
+ <TableBase
+ v-if="stateLibraryId > 0"
+ :use-grid="'grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 3xl:grid-cols-5 gap-3'"
+ :use-pagination="true"
+ :data="filteredFolders"
+ :row="LibraryFolderCard"
+ :loading="isLoadingLibraryFolders"
+ :sort-action="handleFolderSort"
+ :click-action="handleFolderAction"
+ :sorting-options="folderSortingOptions"
+ @search="
+ (query: string) => {
+ searchQuery = query;
+ }
+ "
+ />
- <TableBase
- v-else
- :use-grid="'grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 3xl:grid-cols-5 gap-3'"
- :use-pagination="true"
- :data="filteredLibraries"
- :row="LibraryCard"
- :click-action="handleDelete"
- :loading="isLoadingLibraries"
- :sort-action="handleSort"
- :sorting-options="sortingOptions"
- @search="
- (query: string) => {
- searchQuery = query;
- }
- "
- />
- </section>
+ <TableBase
+ v-else
+ :use-grid="'grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 3xl:grid-cols-5 gap-3'"
+ :use-pagination="true"
+ :data="filteredLibraries"
+ :row="LibraryCard"
+ :click-action="handleDelete"
+ :loading="isLoadingLibraries"
+ :sort-action="handleSort"
+ :sorting-options="sortingOptions"
+ @search="
+ (query: string) => {
+ searchQuery = query;
+ }
+ "
+ />
<ModalBase :modalData="confirmModal" :action="submitDelete">
<template #description> Are you sure you want to delete this Library? </template>
</ModalBase>
diff --git a/resources/js/components/dashboard/DashboardLibraryFolders.vue b/resources/js/components/dashboard/DashboardLibraryFolders.vue
deleted file mode 100644
index 8206a3a1..00000000
--- a/resources/js/components/dashboard/DashboardLibraryFolders.vue
+++ /dev/null
@@ -1,118 +0,0 @@
-<script setup lang="ts">
-import type { FolderResource, SeriesResource } from '@/types/resources';
-
-import { computed, onMounted, ref } from 'vue';
-import { useDashboardStore } from '@/stores/DashboardStore';
-import { useContentStore } from '@/stores/ContentStore';
-import { useQueryClient } from '@tanstack/vue-query';
-import { useAppStore } from '@/stores/AppStore';
-import { storeToRefs } from 'pinia';
-import { sortObject } from '@/service/sort/baseSort';
-
-import LibraryFolderCard from '@/components/cards/LibraryFolderCard.vue';
-import EditFolder from '@/components/forms/EditFolder.vue';
-import ModalBase from '@/components/pinesUI/ModalBase.vue';
-import TableBase from '@/components/table/TableBase.vue';
-import useModal from '@/composables/useModal';
-
-const sortingOptions = ref([
- {
- title: 'ID',
- value: 'id',
- },
- {
- title: 'Title',
- value: 'name',
- disabled: false,
- },
- {
- title: 'Date',
- value: 'created_at',
- disabled: false,
- },
- {
- title: 'Videos',
- value: 'file_count',
- disabled: false,
- },
- {
- title: 'Total Size',
- value: 'total_size',
- },
-]);
-
-const { stateLibraryFolders, isLoadingLibraryFolders } = storeToRefs(useDashboardStore());
-const { updateFolderData } = useContentStore();
-const { pageTitle } = storeToRefs(useAppStore());
-
-const editFolderModal = useModal({ title: 'Edit Folder Details', submitText: 'Submit Details' });
-const queryClient = useQueryClient();
-const cachedID = ref<null | number>(null);
-const cachedFolder = ref<FolderResource>();
-const searchQuery = ref('');
-
-const filteredFolders = computed(() => {
- const tempList = searchQuery.value
- ? stateLibraryFolders.value.filter((folder: FolderResource) => {
- try {
- const strRepresentation = [folder.name, folder.series?.title, folder.series?.description, folder.series?.studio, folder.created_at].join(' ').toLowerCase();
- return strRepresentation.includes(searchQuery.value.toLowerCase());
- } catch (error) {
- console.log(error);
- return false;
- }
- })
- : stateLibraryFolders.value;
- return tempList;
-});
-
-const handleSort = async (column: keyof FolderResource = 'created_at', dir: -1 | 1 = 1) => {
- const tempList = [...stateLibraryFolders.value].sort(sortObject<FolderResource>(column, dir, ['created_at']));
- stateLibraryFolders.value = tempList;
- return tempList;
-};
-
-const handleFolderAction = (_: any, id: number, action: 'edit' | 'share' = 'edit') => {
- const folder = stateLibraryFolders.value?.find((folder: FolderResource) => folder.id === id);
-
- if (folder) cachedFolder.value = folder;
-
- if (action === 'edit') editFolderModal.toggleModal();
- // else shareFolderModal.toggleModal();
-};
-
-const handleSeriesUpdate = async (res: any) => {
- if (res?.data?.id) updateFolderData(res.data as SeriesResource);
- editFolderModal.toggleModal(false);
-
- await queryClient.invalidateQueries({
- queryKey: ['libraryFolders'],
- });
-};
-
-onMounted(() => {
- pageTitle.value = 'Library Folders';
-});
-</script>
-<template>
- <TableBase
- :use-grid="'grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-2 xl:grid-cols-3 2xl:grid-cols-4 3xl:grid-cols-5 gap-3'"
- :use-pagination="true"
- :data="filteredFolders"
- :row="LibraryFolderCard"
- :loading="isLoadingLibraryFolders"
- :sort-action="handleSort"
- :click-action="handleFolderAction"
- :sorting-options="sortingOptions"
- @search="
- (query: string) => {
- searchQuery = query;
- }
- "
- />
- <ModalBase :modalData="editFolderModal" :useControls="false">
- <template #content>
- <EditFolder v-if="cachedFolder" :folder="cachedFolder" @handleFinish="handleSeriesUpdate" />
- </template>
- </ModalBase>
-</template>
diff --git a/resources/js/components/dashboard/DashboardTasks.vue b/resources/js/components/dashboard/DashboardTasks.vue
index e6da9849..6191cf48 100644
--- a/resources/js/components/dashboard/DashboardTasks.vue
+++ b/resources/js/components/dashboard/DashboardTasks.vue
@@ -209,51 +209,49 @@ onUnmounted(async () => {
</script>
<template>
- <section id="tasks-snapshot" class="flex gap-4 flex-col">
- <div class="flex items-center gap-2 justify-between flex-wrap">
- <BreadCrumbs :bread-crumbs="breadCrumbs" />
+ <div class="flex items-center gap-2 justify-between flex-wrap">
+ <BreadCrumbs :bread-crumbs="breadCrumbs" />
- <span class="flex overflow-clip gap-2 capitalize font-medium">
- <p class="">Running Tasks: {{ stateTaskStats?.count_running }}</p>
- <p class="">Total Tasks: {{ stateTasks.length ?? stateTaskStats?.count_tasks }}</p>
- </span>
- <div class="flex flex-wrap items-center gap-2 [&>*]:h-fit [&>*]:xs:h-8 w-full">
- <BasePopover popoverClass="!w-52 rounded-lg mt-10" :button-attributes="{ title: 'Start New Task' }" ref="taskPopover">
- <template #buttonText>New Task</template>
- <template #buttonIcon>
- <ProiconsAdd />
- </template>
- <template #content>
- <DashboardTaskMenu @handle-close="taskPopover?.handleClose" />
- </template>
- </BasePopover>
- <ButtonText
- @click="
- () => {
- loadData().then(() => {
- toast.add('Success', { type: 'success', description: 'Data Refreshed!', life: 3000 });
- });
- }
- "
- >
- <template #text>Refresh</template>
- <template #icon><ProiconsArrowSync /></template>
- </ButtonText>
- </div>
+ <span class="flex overflow-clip gap-2 capitalize font-medium">
+ <p class="">Running Tasks: {{ stateTaskStats?.count_running }}</p>
+ <p class="">Total Tasks: {{ stateTasks.length ?? stateTaskStats?.count_tasks }}</p>
+ </span>
+ <div class="flex flex-wrap items-center gap-2 [&>*]:h-fit [&>*]:xs:h-8 w-full">
+ <BasePopover popoverClass="!w-52 rounded-lg mt-10" :button-attributes="{ title: 'Start New Task' }" ref="taskPopover">
+ <template #buttonText>New Task</template>
+ <template #buttonIcon>
+ <ProiconsAdd />
+ </template>
+ <template #content>
+ <DashboardTaskMenu @handle-close="taskPopover?.handleClose" />
+ </template>
+ </BasePopover>
+ <ButtonText
+ @click="
+ () => {
+ loadData().then(() => {
+ toast.add('Success', { type: 'success', description: 'Data Refreshed!', life: 3000 });
+ });
+ }
+ "
+ >
+ <template #text>Refresh</template>
+ <template #icon><ProiconsArrowSync /></template>
+ </ButtonText>
</div>
- <TableBase
- :use-pagination="true"
- :data="[...filteredTasks]"
- :row="TaskCard"
- :row-attributes="{ isScreenSmall, isScreenLarge }"
- :loading="isLoadingTasks"
- :clickAction="handleDelete"
- :sort-action="handleSort"
- :sorting-options="sortingOptions"
- :table-styles="'gap-4 xs:gap-2'"
- @search="handleSearch"
- />
- </section>
+ </div>
+ <TableBase
+ :use-pagination="true"
+ :data="[...filteredTasks]"
+ :row="TaskCard"
+ :row-attributes="{ isScreenSmall, isScreenLarge }"
+ :loading="isLoadingTasks"
+ :clickAction="handleDelete"
+ :sort-action="handleSort"
+ :sorting-options="sortingOptions"
+ :table-styles="'gap-4 xs:gap-2'"
+ @search="handleSearch"
+ />
<ModalBase :modalData="cancelModal" :action="submitCancel">
<template #description> Are you sure you want to cancel this task and all of its sub tasks? </template>
</ModalBase>
diff --git a/resources/js/components/dashboard/DashboardUsers.vue b/resources/js/components/dashboard/DashboardUsers.vue
index c253625d..839dda9b 100644
--- a/resources/js/components/dashboard/DashboardUsers.vue
+++ b/resources/js/components/dashboard/DashboardUsers.vue
@@ -123,45 +123,43 @@ onMounted(() => {
</script>
<template>
- <section id="users-snapshot" class="flex gap-4 flex-col">
- <div class="flex items-center gap-2 justify-between flex-wrap">
- <BreadCrumbs :bread-crumbs="breadCrumbs" />
-
- <span class="flex overflow-clip gap-2">
- <p class="capitalize font-medium">Users: {{ stateUsers.length }}</p>
- <p class="capitalize font-medium">Active: {{ stateActiveSessions ?? 0 }}</p>
- </span>
- <div class="flex flex-wrap items-center gap-2 [&>*]:h-fit [&>*]:xs:h-8 w-full">
- <ButtonText title="Create new user" @click="toast.add('Success', { type: 'success', description: 'User Created!', life: 3000 })" disabled>
- <template #text>New User</template>
- <template #icon><ProiconsAdd /></template>
- </ButtonText>
- <ButtonText
- @click="
- () => {
- loadData().then(() => {
- toast.add('Success', { type: 'success', description: 'Data Refreshed!', life: 3000 });
- });
- }
- "
- >
- <template #text>Refresh</template>
- <template #icon><ProiconsArrowSync /></template>
- </ButtonText>
- </div>
+ <div class="flex items-center gap-2 justify-between flex-wrap">
+ <BreadCrumbs :bread-crumbs="breadCrumbs" />
+
+ <span class="flex overflow-clip gap-2">
+ <p class="capitalize font-medium">Users: {{ stateUsers.length }}</p>
+ <p class="capitalize font-medium">Active: {{ stateActiveSessions ?? 0 }}</p>
+ </span>
+ <div class="flex flex-wrap items-center gap-2 [&>*]:h-fit [&>*]:xs:h-8 w-full">
+ <ButtonText title="Create new user" @click="toast.add('Success', { type: 'success', description: 'User Created!', life: 3000 })" disabled>
+ <template #text>New User</template>
+ <template #icon><ProiconsAdd /></template>
+ </ButtonText>
+ <ButtonText
+ @click="
+ () => {
+ loadData().then(() => {
+ toast.add('Success', { type: 'success', description: 'Data Refreshed!', life: 3000 });
+ });
+ }
+ "
+ >
+ <template #text>Refresh</template>
+ <template #icon><ProiconsArrowSync /></template>
+ </ButtonText>
</div>
- <TableBase
- :use-pagination="true"
- :data="filteredUsers"
- :row="UserCard"
- :loading="isLoadingUsers"
- :clickAction="handleDelete"
- :sort-action="handleSort"
- :sorting-options="sortingOptions"
- :table-styles="'gap-4 xs:gap-2'"
- @search="handleSearch"
- />
- </section>
+ </div>
+ <TableBase
+ :use-pagination="true"
+ :data="filteredUsers"
+ :row="UserCard"
+ :loading="isLoadingUsers"
+ :clickAction="handleDelete"
+ :sort-action="handleSort"
+ :sorting-options="sortingOptions"
+ :table-styles="'gap-4 xs:gap-2'"
+ @search="handleSearch"
+ />
<ModalBase :modalData="confirmModal" :action="submitDelete">
<template #description> Are you sure you want to remove this user? </template>
</ModalBase>
diff --git a/resources/js/components/pinesUI/BreadCrumbs.vue b/resources/js/components/pinesUI/BreadCrumbs.vue
index c35e7c5d..5a221588 100644
--- a/resources/js/components/pinesUI/BreadCrumbs.vue
+++ b/resources/js/components/pinesUI/BreadCrumbs.vue
@@ -13,7 +13,7 @@ withDefaults(defineProps<{ breadCrumbs: BreadCrumbItem[] }>(), { breadCrumbs: ()
<RouterLink
:to="breadCrumb.url"
class="transition-colors inline-flex items-center p-2 py-1.5 space-x-1.5 rounded-md hover:!text-neutral-900 dark:hover:!text-white hover:ring-[0.125rem] ring-inset hover:ring-violet-400 hover:bg-white hover:dark:ring-violet-700 hover:dark:bg-primary-dark-800"
- :class="{ 'cursor-default active-breadcrumb ': index === breadCrumbs.length - 1 }"
+ :class="{ 'active-breadcrumb ': index === breadCrumbs.length - 1 }"
:title="breadCrumb.name"
>
<component v-if="breadCrumb.icon" :is="breadCrumb.icon" class="w-3.5 h-3.5 shrink-0" />
diff --git a/resources/js/components/settings/SettingsAccount.vue b/resources/js/components/settings/SettingsAccount.vue
index 71a5e10f..afcbc60b 100644
--- a/resources/js/components/settings/SettingsAccount.vue
+++ b/resources/js/components/settings/SettingsAccount.vue
@@ -1,11 +1,39 @@
<script setup lang="ts">
+import type { BreadCrumbItem } from '@/types/types';
+
+import { computed } from 'vue';
+
import SettingsDeleteAccount from '@/components/settings/account/SettingsDeleteAccount.vue';
import SettingsSessions from '@/components/settings/account/SettingsSessions.vue';
import ChangePassword from '@/components/forms/ChangePassword.vue';
+import BreadCrumbs from '@/components/pinesUI/BreadCrumbs.vue';
import ChangeEmail from '@/components/forms/ChangeEmail.vue';
+
+import ProiconsSettings from '~icons/proicons/settings';
+import LucideUser from '~icons/lucide/user';
+
+const breadCrumbs = computed(() => {
+ const items: BreadCrumbItem[] = [
+ {
+ name: 'Settings',
+ url: '/settings/preferences',
+ icon: ProiconsSettings,
+ },
+ {
+ name: 'Account',
+ url: '/Settings/Account',
+ icon: LucideUser,
+ },
+ ];
+
+ return items;
+});
</script>
<template>
+ <section class="flex items-center gap-2 justify-between flex-wrap">
+ <BreadCrumbs :bread-crumbs="breadCrumbs" />
+ </section>
<ChangePassword />
<ChangeEmail />
<SettingsSessions />
diff --git a/resources/js/components/settings/SettingsPreferences.vue b/resources/js/components/settings/SettingsPreferences.vue
index c47ece19..5991a34c 100644
--- a/resources/js/components/settings/SettingsPreferences.vue
+++ b/resources/js/components/settings/SettingsPreferences.vue
@@ -1,7 +1,29 @@
<script setup lang="ts">
-import SettingsPlayerPreferences from './preferences/SettingsPlayerPreferences.vue';
+import type { BreadCrumbItem } from '@/types/types';
+
+import { computed } from 'vue';
+
+import SettingsPlayerPreferences from '@/components/settings/preferences/SettingsPlayerPreferences.vue';
+import BreadCrumbs from '@/components/pinesUI/BreadCrumbs.vue';
+
+import ProiconsSettings from '~icons/proicons/settings';
+
+const breadCrumbs = computed(() => {
+ const items: BreadCrumbItem[] = [
+ {
+ name: 'Settings',
+ url: '/settings/preferences',
+ icon: ProiconsSettings,
+ },
+ ];
+
+ return items;
+});
</script>
<template>
+ <section class="flex items-center gap-2 justify-between flex-wrap">
+ <BreadCrumbs :bread-crumbs="breadCrumbs" />
+ </section>
<SettingsPlayerPreferences />
</template>
diff --git a/resources/js/views/DashboardView.vue b/resources/js/views/DashboardView.vue
index db1ca2fb..3592b6a7 100644
--- a/resources/js/views/DashboardView.vue
+++ b/resources/js/views/DashboardView.vue
@@ -103,7 +103,7 @@ watch(
<template>
<LayoutBase>
<template v-slot:content>
- <section id="content-dashboard" class="min-h-[80vh] 3xl:min-h-[60vh] text-sm">
+ <section id="content-dashboard" class="min-h-[80vh] 3xl:min-h-[60vh] text-sm flex flex-col gap-4">
<DashboardAnalytics v-if="dashboardTab?.name == 'overview'" />
<DashboardLibraries v-if="dashboardTab?.name == 'libraries'" />
<DashboardActivity v-if="dashboardTab?.name == 'activity'" />