A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
chore: medium severity code smells
aminnausincb1a6e1bf3f6
diff --git a/resources/js/components/cards/CategoryCard.vue b/resources/js/components/cards/CategoryCard.vueindex b62bf4d9..d9294b56 100644--- a/resources/js/components/cards/CategoryCard.vue+++ b/resources/js/components/cards/CategoryCard.vue@@ -29,7 +29,7 @@ const processing = ref(false);const popover = useTemplateRef('popover');const folders = computed(() => {- let foldersCopy = props.data?.folders ? [...props.data?.folders] : [];+ let foldersCopy = [...(props.data?.folders || [])];return foldersCopy.sort((itemA, itemB) => itemA.name.localeCompare(itemB.name));});@@ -100,10 +100,6 @@ watch({{ data?.name }}</h3><span class="flex gap-2 [&>*]:h-6 text-sm">- <!-- <ButtonText class="hidden 2xl:flex" :title="'Scan for Folder Changes'" @click="handleStartScan">- <template #text> Scan </template>- <template #icon> <ProiconsArrowSync class="h-4 w-4" /></template>- </ButtonText> --><ButtonIcon :title="'Open Library In New Tab'" :to="`/${data?.name}`" :class="`!aspect-[auto]`"><template #icon><CircumShare1 class="h-4 w-4" /></template></ButtonIcon>diff --git a/resources/js/components/cards/RecordCard.vue b/resources/js/components/cards/RecordCard.vueindex 498caa2f..9e6b5c89 100755--- a/resources/js/components/cards/RecordCard.vue+++ b/resources/js/components/cards/RecordCard.vue@@ -61,9 +61,7 @@ const videoLink = computed(() => {</ButtonCorner></div><div class="flex justify-end gap-1 text-neutral-500 w-full truncate" v-else>- <!-- -if="props.record.relationships.metadata?.attributes?.file_size" -->{{ 'Deleted' }}- <!-- {{ formatFileSize(props.record.relationships.metadata?.attributes?.file_size) }} --></div></section><section class="flex flex-wrap sm:flex-nowrap sm:justify-between w-full gap-x-2 text-sm">diff --git a/resources/js/components/cards/RecordCardDetails.vue b/resources/js/components/cards/RecordCardDetails.vueindex 29544f42..96214a97 100755--- a/resources/js/components/cards/RecordCardDetails.vue+++ b/resources/js/components/cards/RecordCardDetails.vue@@ -20,7 +20,6 @@ const videoLink = computed(() => {</script><template>- <!-- @click.stop.prevent="$emit('clickAction')" --><sectionclass="text-left relative flex flex-col gap-4 sm:flex-row flex-wrap rounded-xl dark:bg-primary-dark-800/70 bg-white ring-1 ring-gray-900/5 dark:hover:bg-primary-dark-600 hover:bg-primary-800 dark:text-white shadow p-3 w-full group cursor-pointer divide-gray-300 dark:divide-neutral-400">diff --git a/resources/js/components/cards/UserCard.vue b/resources/js/components/cards/UserCard.vueindex 7122d492..0536d413 100644--- a/resources/js/components/cards/UserCard.vue+++ b/resources/js/components/cards/UserCard.vue@@ -21,7 +21,7 @@ const props = defineProps<{ data: UserResource }>();<imgclass="aspect-square h-full max-h-28 xs:max-h-16 my-auto rounded-t-xl xs:rounded-full object-cover":src="`https://ui-avatars.com/api/?name=${data.name[0]}&color=7F9CF5&background=random`"- :alt="data.name ?? 'user profile picture'"+ :alt="data.name ?? 'user profile'"/><div class="flex flex-col gap-4 flex-wrap flex-1 max-w-full max-h-full p-3 xs:p-0"><section class="flex justify-between gap-2 w-full items-center">diff --git a/resources/js/components/dashboard/DashboardAnalytics.vue b/resources/js/components/dashboard/DashboardAnalytics.vueindex 30fcbf6d..2b8cf09a 100644--- a/resources/js/components/dashboard/DashboardAnalytics.vue+++ b/resources/js/components/dashboard/DashboardAnalytics.vue@@ -139,7 +139,6 @@ watch(</section><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">- <!-- <StatsCard v-for="stat in stats" :title="`Total ${stat.title}`" :forceCount="stat.count" class="col-span-1 row-span-1 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" />