Skip to content

A self-hosted media server and file management system

fix: library folder card does not show size

aminnausin5c95d466acb8
diff --git a/resources/js/components/cards/data/LibraryCard.vue b/resources/js/components/cards/data/LibraryCard.vue
index 503a3a72..7b190586 100644
--- a/resources/js/components/cards/data/LibraryCard.vue
+++ b/resources/js/components/cards/data/LibraryCard.vue
@@ -108,9 +108,7 @@ watch(
</RouterLink>
<section class="flex h-full flex-1 flex-col gap-2 p-3">
<div class="flex flex-wrap items-start justify-between">
- <h3 class="group-hover:text-primary capitalize">
- {{ data?.name }}
- </h3>
+ <h3 class="group-hover:text-primary capitalize">{{ data?.id }} - {{ data?.name }}</h3>
<span class="flex gap-2 text-sm *:h-6">
<BasePopover popoverClass="max-w-56! rounded-lg mt-8" :buttonClass="'p-1! ml-auto'" ref="popover">
<template #buttonIcon>
@@ -133,7 +131,7 @@ watch(
<span class="text-foreground-1 mt-auto flex h-full w-full flex-col text-sm sm:gap-1" v-if="data">
<span class="flex flex-wrap items-start justify-between">
<span class="flex flex-col gap-1 sm:gap-0">
- <p class="">Videos: {{ data?.videos_count ?? '?' }}</p>
+ <p class="">Files: {{ data?.videos_count ?? '?' }}</p>
<p class="">Folders: {{ data?.folders_count }}</p>
</span>
diff --git a/resources/js/components/cards/data/LibraryFolderCard.vue b/resources/js/components/cards/data/LibraryFolderCard.vue
index 8c52bcff..d341eced 100644
--- a/resources/js/components/cards/data/LibraryFolderCard.vue
+++ b/resources/js/components/cards/data/LibraryFolderCard.vue
@@ -50,12 +50,12 @@ const popover = useTemplateRef('popover');
<p class="">{{ data.is_majority_audio ? 'Tracks' : 'Videos' }}: {{ data?.file_count ?? '?' }}</p>
</span>
- <span class="flex flex-wrap items-center justify-between gap-x-2">
- <p class="" :title="`Date Added ${data?.created_at ? toFormattedDate(new Date(data?.created_at)) : 'N/A'}`">
- {{ data?.created_at ? toFormattedDate(new Date(data?.created_at)) : 'N/A' }}
+ <span class="flex items-center justify-between gap-x-2">
+ <p class="truncate" :title="`Date Added ${toFormattedDate(data?.created_at)}`">
+ {{ toFormattedDate(data?.created_at) }}
</p>
- <p class="" :title="`Total Size ${formatFileSize(data.total_size)}`">
- <!-- {{ formatFileSize(data.total_size) }} -->
+ <p class="whitespace-nowrap" :title="`Total Size ${formatFileSize(data.total_size)}`">
+ {{ formatFileSize(data.total_size) }}
</p>
</span>
</span>
diff --git a/resources/js/components/dashboard/DashboardLibraries.vue b/resources/js/components/dashboard/DashboardLibraries.vue
index 3e23d3e0..f3dc449e 100644
--- a/resources/js/components/dashboard/DashboardLibraries.vue
+++ b/resources/js/components/dashboard/DashboardLibraries.vue
@@ -42,7 +42,7 @@ const sortingOptions = ref([
disabled: false,
},
{
- title: 'Videos',
+ title: 'Files',
value: 'videos_count',
disabled: false,
},