A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
fix: layout changes
aminnausin9bb33ba4ab54
diff --git a/resources/js/components/cards/VideoCard.vue b/resources/js/components/cards/VideoCard.vueindex 472f3352..827529fa 100755--- a/resources/js/components/cards/VideoCard.vue+++ b/resources/js/components/cards/VideoCard.vue@@ -111,11 +111,7 @@ watch(</h4></span>- <span- v-if="props.data.video_tags.length"- class="hidden sm:flex flex-wrap gap-1 max-h-[22px] px-2 flex-1 overflow-clip [overflow-clip-margin:4px] hover:overflow-y-auto scrollbar-minimal scrollbar-hover"- title="Tags"- >+ <span v-if="props.data.video_tags.length" class="hidden sm:flex flex-wrap gap-1 max-h-[22px] px-2 flex-1 overflow-clip [overflow-clip-margin:4px]" title="Tags"><ChipTagv-for="(tag, index) in props.data?.video_tags"v-bind:key="index"@@ -129,11 +125,7 @@ watch({{ toFormattedDate(new Date(props.data?.date_uploaded ?? props.data.date + ' GMT')) }}</h4>- <span- v-if="props.data.video_tags.length"- class="sm:hidden w-full flex flex-wrap gap-1 overflow-clip [overflow-clip-margin:4px] hover:overflow-y-auto scrollbar-minimal scrollbar-hover"- title="Tags"- >+ <span v-if="props.data.video_tags.length" class="sm:hidden w-full flex flex-wrap gap-1 overflow-clip [overflow-clip-margin:4px]" title="Tags"><ChipTagv-for="(tag, index) in props.data?.video_tags"v-bind:key="index"diff --git a/resources/js/components/labels/ChipTag.vue b/resources/js/components/labels/ChipTag.vueindex 0c736b2b..5208e4d2 100644--- a/resources/js/components/labels/ChipTag.vue+++ b/resources/js/components/labels/ChipTag.vue@@ -11,7 +11,9 @@ const props = defineProps(['label', 'colour', 'textClass', 'URL', 'removeable']):class="`p-1 px-2 text-sm ${props.textClass ? `${props.textClass} ` : ''}leading-none rounded-xl truncate lowercase text-neutral-100 dark:text-neutral-300 ${props.colour ? `${props.colour}` : 'bg-violet-600 dark:bg-violet-900/90'} shrink-0 transition-colors duration-200 `":to="props.URL">- {{ props.label }}+ <slot name="content">+ {{ props.label }}+ </slot><ButtonCornerv-if="removeable":positionClasses="'w-4 h-4'"@@ -25,7 +27,9 @@ const props = defineProps(['label', 'colour', 'textClass', 'URL', 'removeable'])v-else:class="`p-1 px-2 text-sm ${props.textClass ? `${props.textClass} ` : ''}leading-none rounded-xl truncate lowercase text-neutral-100 dark:text-neutral-300 ${props.colour ? `${props.colour}` : 'bg-violet-600 dark:bg-violet-900/90'} shrink-0 transition-colors duration-200 cursor-default ${removeable ? 'flex gap-1 items-center justify-between' : ''}`">- {{ props.label }}+ <slot name="content">+ {{ props.label }}+ </slot><ButtonCornerv-if="removeable":positionClasses="'w-4 h-4'"diff --git a/resources/js/components/video/VideoInfoPanel.vue b/resources/js/components/video/VideoInfoPanel.vueindex f20af77c..b49ddb90 100755--- a/resources/js/components/video/VideoInfoPanel.vue+++ b/resources/js/components/video/VideoInfoPanel.vue@@ -86,53 +86,77 @@ watch(</script><template>- <section id="mp4-header-mobile" class="flex items-center justify-between w-full sm:hidden flex-wrap px-3 gap-2">- <h2 class="text-xl truncate capitalize">- {{ metaData?.fields.title ?? '[File Not Found]' }}- </h2>+ <section class="flex flex-wrap gap-4 p-3 w-full rounded-xl shadow-lg dark:bg-primary-dark-800/70 bg-primary-800 z-[3] text-neutral-500 dark:text-neutral-400">+ <section id="mp4-header-mobile" class="flex items-center w-full sm:hidden flex-wrap gap-2">+ <HoverCard :content="`You have viewed this ${personalViewCount} time${personalViewCount == 1 ? '' : 's'}`" class="flex-1 min-w-10">+ <template #trigger>+ <h2 class="text-xl capitalize truncate text-gray-900 dark:text-white">+ {{ metaData?.fields.title ?? '[File Not Found]' }}+ </h2>+ </template>+ </HoverCard>- <section :class="`flex gap-2 justify-end sm:hidden items-center ${(stateVideo?.video_tags?.length ?? 0) > 0 ? 'w-full' : ''}`">- <span v-if="(stateVideo?.video_tags?.length ?? 0) > 0" :class="`flex gap-1 flex-row flex-wrap h-[22px] overflow-clip mr-auto`">- <ChipTag v-for="(tag, index) in stateVideo?.video_tags" v-bind:key="index" :label="tag.name" />- </span>- <p- v-if="stateVideo.date_uploaded"- :title="`Date Uploaded: ${toFormattedDate(new Date(stateVideo.date_uploaded))}`"- class="text-neutral-500 dark:text-neutral-400 text-sm line-clamp-1"- >- {{ toTimeSpan(stateVideo.date_uploaded, '') }}- </p>+ <section :class="`contents sm:hidden`">+ <Popover popoverClass="!max-w-32 !p-1 !rounded-md !shadow-sm" :vertical-offset-pixels="36" :buttonClass="'!p-1 w-6 h-6 ml-auto mt-auto'" ref="popover">+ <template #buttonIcon>+ <ProiconsMoreVertical class="h-4 w-4" />+ </template>+ <template #content>+ <ContextMenuItem+ :icon="CircumEdit"+ :text="'Edit'"+ :action="+ () => {+ popover?.handleClose();+ editVideoModal.toggleModal();+ }+ "+ />+ <ContextMenuItem+ :icon="CircumShare1"+ :text="'Share'"+ :action="+ () => {+ popover?.handleClose();+ shareVideoModal.toggleModal();+ }+ "+ />+ </template>+ </Popover>+ </section>- <Popover popoverClass="!max-w-32 !p-1 !rounded-md !shadow-sm" :vertical-offset-pixels="36" :buttonClass="'!p-1 w-6 h-6 ml-auto mt-auto'" ref="popover">- <template #buttonIcon>- <ProiconsMoreVertical class="h-4 w-4" />- </template>- <template #content>- <ContextMenuItem- :icon="CircumEdit"- :text="'Edit'"- :action="- () => {- popover?.handleClose();- editVideoModal.toggleModal();- }- "- />- <ContextMenuItem- :icon="CircumShare1"- :text="'Share'"- :action="- () => {- popover?.handleClose();- shareVideoModal.toggleModal();- }- "- />- </template>- </Popover>+ <span class="sm:hidden flex flex-wrap w-full gap-1 overflow-clip [overflow-clip-margin:4px] h-[22px]">+ <ChipTag+ v-if="stateVideo.date_uploaded"+ :title="`Date Uploaded: ${toFormattedDate(new Date(stateVideo.date_uploaded))}`"+ :label="toTimeSpan(stateVideo.date_uploaded, '')"+ :colour="'bg-neutral-200 leading-none shadow dark:bg-neutral-900 hover:bg-neutral-600 text-neutral-500 hover:text-neutral-50 hover:dark:bg-neutral-600/90 !max-h-[22px] text-xs flex items-center'"+ />+ <ChipTag+ :class="'flex gap-0.5 items-center'"+ :colour="'bg-neutral-200 leading-none shadow dark:bg-neutral-900 hover:bg-neutral-600 text-neutral-500 hover:text-neutral-50 hover:dark:bg-neutral-600/90 !max-h-[22px] text-xs'"+ >+ <template #content>+ {{ metaData?.fields.views }}+ <HoverCard :content="`You have viewed this ${personalViewCount} time${personalViewCount == 1 ? '' : 's'}`">+ <template #trigger>+ <ProiconsEye class="w-4 h-4 scale-90 hover:scale-100 transition-all hover:text-neutral-400 dark:hover:text-white" v-if="personalViewCount > 0" />+ </template>+ </HoverCard>+ </template>+ </ChipTag>++ <ChipTag+ v-if="stateVideo?.metadata?.resolution_height"+ :label="stateVideo?.metadata?.resolution_height + 'p'"+ :colour="'bg-neutral-200 leading-none shadow dark:bg-neutral-900 hover:bg-neutral-600 text-neutral-500 hover:text-neutral-50 hover:dark:bg-neutral-600/90 !max-h-[22px] text-xs flex items-center'"+ />+ </span>+ <!-- <span v-if="(stateVideo?.video_tags?.length ?? 0) > 0" :class="`flex gap-1 flex-row flex-wrap h-[22px] overflow-clip mr-auto w-full`">+ <ChipTag v-for="(tag, index) in stateVideo?.video_tags" v-bind:key="index" :label="tag.name" />+ </span> --></section>- </section>- <section class="flex gap-4 p-3 w-full rounded-xl shadow-lg dark:bg-primary-dark-800/70 bg-primary-800 z-[3]"><section id="mp4-folder-info" class="hidden xs:block h-32 my-auto object-cover rounded-md shadow-md aspect-2/3 mb-auto relative group"><imgid="folder-thumbnail"@@ -158,7 +182,7 @@ watch(</section><section class="flex flex-col gap-2 flex-1 min-w-0 w-full group"><section class="hidden sm:flex justify-between gap-2">- <h2 id="mp4-title" class="text-xl truncate capitalize h-8" :title="metaData?.fields.title ?? 'no file was found at this location'">+ <h2 id="mp4-title" class="text-xl truncate capitalize h-8 text-gray-900 dark:text-white" :title="metaData?.fields.title ?? 'no file was found at this location'">{{ metaData?.fields.title ?? '[File Not Found]' }}</h2><section class="flex gap-2 justify-end h-8 lg:min-w-32 max-w-64 w-fit">@@ -177,28 +201,29 @@ watch(</section><HoverCard :content="metaData?.fields?.description" :hover-card-delay="800" :margin="10"><template #trigger>- <div :class="`h-[3.75rem] overflow-y-auto overflow-x-clip dark:text-slate-400 text-neutral-500 text-sm whitespace-pre-wrap scrollbar-minimal scrollbar-hover`">+ <div :class="`h-[3.75rem] overflow-y-auto overflow-x-clip text-sm whitespace-pre-wrap scrollbar-minimal scrollbar-hover `">{{ metaData?.fields?.description || defaultDescription }}</div></template></HoverCard>-- <span class="flex flex-1 gap-2 items-end justify-between text-sm py-1 w-full">- <span class="flex items-center justify-start gap-1 truncate h-6 sm:h-[22px] dark:text-slate-400 text-neutral-500">- <p class="text-nowrap text-start truncate">{{ metaData?.fields.views }}</p>+ <span class="flex gap-2 items-end justify-between text-sm w-full flex-1">+ <span class="hidden sm:flex items-center justify-start gap-1 truncate h-[22px]">+ <p class="lowercase">{{ metaData?.fields.views }}</p><HoverCard :content="`You have viewed this ${personalViewCount} time${personalViewCount == 1 ? '' : 's'}`"><template #trigger><ProiconsEye class="w-4 h-4 scale-90 hover:scale-100 transition-all hover:text-neutral-400 dark:hover:text-white" v-if="personalViewCount > 0" /></template></HoverCard>- <p class="text-nowrap text-start truncate hidden xs:block" v-if="stateVideo?.metadata?.resolution_height">++ <p v-if="stateVideo.date_uploaded" :title="`Date Uploaded: ${toFormattedDate(new Date(stateVideo.date_uploaded))}`" class="text-nowrap text-start truncate">+ {{ ' | ' + toTimeSpan(stateVideo.date_uploaded, '') }}+ </p>+ <p class="text-nowrap text-start truncate hidden xs:block" v-else-if="stateVideo?.metadata?.resolution_height">{{ ` | ${stateVideo?.metadata?.resolution_height}p` }}</p></span>- <section- class="hidden sm:flex justify-end text-end text-sm dark:text-slate-400 text-slate-500 max-w-full overflow-clip [overflow-clip-margin:4px] gap-1 flex-wrap max-h-[22px]"- >+ <section class="flex justify-end text-end text-sm max-w-full overflow-clip [overflow-clip-margin:4px] gap-1 flex-wrap max-h-[22px]"><ChipTag v-for="(tag, index) in stateVideo?.video_tags" v-bind:key="index" :label="tag.name" /></section></span>diff --git a/resources/js/composables/useMetaData.ts b/resources/js/composables/useMetaData.tsindex 55ef4fab..99d81eeb 100644--- a/resources/js/composables/useMetaData.ts+++ b/resources/js/composables/useMetaData.ts@@ -12,7 +12,7 @@ export default function useMetaData(data: VideoResource, skipBaseURL: boolean =fields: {title: data?.title ?? data?.name,duration: toFormattedDuration(data?.duration) ?? 'N/A',- views: data?.view_count ? `${data?.view_count} View${data?.view_count !== 1 ? 's' : ''}` : '0 Views',+ views: data?.view_count ? `${data?.view_count} view${data?.view_count !== 1 ? 's' : ''}` : '0 views',description: data?.description ?? '',url: encodeURI((skipBaseURL ? '' : document.location.origin) + route.path + `?video=${data.id}`),file_size: data.file_size ? formatFileSize(data.file_size) : '',@@ -22,7 +22,7 @@ export default function useMetaData(data: VideoResource, skipBaseURL: boolean =...this.fields,title: props?.title ?? props?.name,duration: toFormattedDuration(props?.duration) ?? 'N/A',- views: props?.view_count ? `${props?.view_count} View${props?.view_count !== 1 ? 's' : ''}` : '0 Views',+ views: props?.view_count ? `${props?.view_count} view${props?.view_count !== 1 ? 's' : ''}` : '0 views',description: props?.description ?? '',url: encodeURI((skipBaseURL ? '' : document.location.origin) + route.path + `?video=${data.id}`),file_size: data.file_size ? formatFileSize(data.file_size) : '',