A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
responsive update
aminnausin94b6bf2808e9
diff --git a/resources/js/components/layout/LayoutBase.vue b/resources/js/components/layout/LayoutBase.vueindex a72aa9b2..3f1d6402 100644--- a/resources/js/components/layout/LayoutBase.vue+++ b/resources/js/components/layout/LayoutBase.vue@@ -1,22 +1,24 @@<script setup>- import NavBar from './NavBar.vue';- import { useAppStore } from '../../stores/AppStore';- import { storeToRefs } from 'pinia';+import NavBar from './NavBar.vue';+import { useAppStore } from '../../stores/AppStore';+import { storeToRefs } from 'pinia';- const appStore = useAppStore();- const { selectedSideBar } = storeToRefs(appStore);+const appStore = useAppStore();+const { selectedSideBar } = storeToRefs(appStore);</script><template>- <main class="p-6 flex gap-6 flex-row-reverse flex-wrap-reverse lg:flex-nowrap snap-y">- <section id="list-card" :class="{ invisible: !selectedSideBar}" class="bg-primary-900 dark:bg-primary-dark-900 dark:text-[#e2e0e2] shadow-xl p-3 pb-6 rounded-2xl w-full lg:w-1/6 lg:max-w-72 shrink-0 space-y-2 scroll-mt-6">- <slot name="sidebar"></slot>+ <main class="p-6 flex gap-6 flex-wrap lg:flex-nowrap snap-y">+ <section id="left-card" class="w-full lg:w-1/6 lg:max-w-72 sm:min-w-32 hidden lg:block"></section>- <section id="content-card" class="bg-primary-900 dark:bg-primary-dark-900 dark:text-[#e2e0e2] shadow-xl p-6 pt-3 rounded-2xl w-full flex flex-col gap-3">- <NavBar/>+ <section id="content-card"+ class="bg-primary-900 dark:bg-primary-dark-900 dark:text-[#e2e0e2] shadow-xl p-6 pt-3 rounded-2xl w-full flex flex-col gap-3 overflow-x-hidden">+ <NavBar /><slot name="content"></slot></section>- <section id="left-card" class="w-full lg:w-72 shrink-0 hidden lg:block">+ <section id="list-card" :class="{ invisible: !selectedSideBar }"+ class="bg-primary-900 dark:bg-primary-dark-900 dark:text-[#e2e0e2] shadow-xl p-3 pb-6 rounded-2xl w-full lg:w-1/6 lg:max-w-72 sm:min-w-32 shrink-0 space-y-2 scroll-mt-6">+ <slot name="sidebar"></slot></section></main></template>\ No newline at end of filediff --git a/resources/js/components/layout/NavBar.vue b/resources/js/components/layout/NavBar.vueindex 2d2ed34d..cc848259 100644--- a/resources/js/components/layout/NavBar.vue+++ b/resources/js/components/layout/NavBar.vue@@ -52,8 +52,8 @@<section id="user_options" class="group inline-block relative" data-dropdown-toggle="user_dropdown" aria-haspopup="true"><button id="user_header" class="flex gap-2 text-2xl text-slate-900 dark:text-white hover:text-accent-600 dark:hover:text-accent-600 items-center justify-center" @click="toggleDropdown">- <span id="user_name" v-if="username">{{ username }}</span>- <span id="user_name_unauth" v-else class="w-[10vw] text-right">Guest</span>+ <span id="user_name" class="hidden sm:block" v-if="username">{{ username }}</span>+ <span id="user_name_unauth" v-else class="text-right hidden sm:block">Guest</span><img :src="userData?.value?.avatar ?? '/storage/avatars/12345.jpg'" class="h-7 w-7 rounded-full ring-2 ring-accent-600/60 object-cover aspect-square" alt="profile picture"></button>diff --git a/resources/js/views/VideoView.vue b/resources/js/views/VideoView.vueindex 8ce8972f..08ad1226 100644--- a/resources/js/views/VideoView.vue+++ b/resources/js/views/VideoView.vue@@ -15,7 +15,7 @@const appStore = useAppStore();const ContentStore = useContentStore();const { selectedSideBar } = storeToRefs(appStore);- const { stateFolder, stateVideo} = storeToRefs(ContentStore);+ const { stateVideo} = storeToRefs(ContentStore);const { getFolder, getCategory, getRecords, playlistSeek } = ContentStore;async function cycleSideBar(state){@@ -48,25 +48,32 @@<!-- <hr class=""> -->- <div class="p-6 w-full mx-auto dark:bg-primary-dark-800 bg-primary-800 rounded-xl shadow-lg flex justify-center sm:justify-between gap-4 flex-wrap sm:flex-nowrap">- <div id="mp4-description" class="flex items-center gap-4 md:w-2/3 ">+ <div class="p-6 w-full mx-auto dark:bg-primary-dark-800 bg-primary-800 rounded-xl shadow-lg flex justify-center sm:justify-between gap-4 flex-wrap sm:flex-nowrap overflow-hidden">+ <div id="mp4-description" class="hidden sm:flex items-center gap-4 md:w-2/3 "><div class="shrink-0"><img id="folder-thumbnail" class="h-28 object-contain rounded-md" src="https://app.test:8080/storage/thumbnails/folders/5.jpg" onerror='this.onerror=null;this.src="https\:\/\/app.test:8080/storage/thumbnails/folders/5.jpg";' alt="Folder Cover Art"></div><div class="h-full flex flex-col gap-2"><div id="mp4-title" class="text-xl font-medium">{{ stateVideo?.attributes ? stateVideo.attributes.name : ''}}</div><p class="dark:text-slate-400 text-slate-400 line-clamp-3 text-sm">After defeating the Demon Lord, Himmel the Hero, priest Heiter, dwarf warrior Eisen, and elf mage Frieren return to the royal capital. After their procession, they view a meteor shower and discuss their future plans. Himmel, Heiter, and Eisen are ready to retire from adventuring after their ten-year quest. Frieren, whose lifespan is much longer, considers the ten years to be trivially short and plans to travel and learn new spells. To her colleagues' amusement, she promises to show them a better site to observe the meteor shower at its next occurrence in 50 years. Frieren keeps her word and returns 50 years later to find that Himmel and Heiter have become elderly, and Eisen is middle-aged. The week-long journey to Frieren's viewing site reminds the party of their past adventures. Himmel the Hero dies of old age shortly after the expedition. At his funeral, Frieren tearfully realizes she did not adequately get to know him and decides to learn as much about humans as possible. 20 years later, she visits Heiter to find that he has adopted a war orphan, nine year old Fern. Heiter, suffering from death anxiety in his advanced age, asks Frieren to research life-extending magic and tutor Fern in magic in her spare time. She agrees after seeing Fern is already remarkably skilled despite her youth.</p>- <p class="text-xs">20 Views</p></div>-+ </div>+ <div id="mp4-description-mobile" class="flex sm:hidden items-center gap-4 flex-col ">+ <div id="mp4-title" class="text-xl font-medium w-full">{{ stateVideo?.attributes ? stateVideo.attributes.name : ''}}</div>+ <div class="flex items-center gap-4 md:w-2/3">+ <img id="folder-thumbnail" class="h-28 object-contain rounded-md" src="https://app.test:8080/storage/thumbnails/folders/5.jpg" onerror='this.onerror=null;this.src="https\:\/\/app.test:8080/storage/thumbnails/folders/5.jpg";' alt="Folder Cover Art">+ <div class="h-full flex flex-col gap-2">+ <p class="dark:text-slate-400 text-slate-400 line-clamp-3 text-sm">After defeating the Demon Lord, Himmel the Hero, priest Heiter, dwarf warrior Eisen, and elf mage Frieren return to the royal capital. After their procession, they view a meteor shower and discuss their future plans. Himmel, Heiter, and Eisen are ready to retire from adventuring after their ten-year quest. Frieren, whose lifespan is much longer, considers the ten years to be trivially short and plans to travel and learn new spells. To her colleagues' amusement, she promises to show them a better site to observe the meteor shower at its next occurrence in 50 years. Frieren keeps her word and returns 50 years later to find that Himmel and Heiter have become elderly, and Eisen is middle-aged. The week-long journey to Frieren's viewing site reminds the party of their past adventures. Himmel the Hero dies of old age shortly after the expedition. At his funeral, Frieren tearfully realizes she did not adequately get to know him and decides to learn as much about humans as possible. 20 years later, she visits Heiter to find that he has adopted a war orphan, nine year old Fern. Heiter, suffering from death anxiety in his advanced age, asks Frieren to research life-extending magic and tutor Fern in magic in her spare time. She agrees after seeing Fern is already remarkably skilled despite her youth.</p>+ </div>+ </div></div>- <div id="mp4-details" class="container flex w-auto flex-col justify-between min-w-64" role="group">- <section class="flex gap-2 justify-end">+ <div id="mp4-details" class="container flex sm:w-auto sm:flex-col justify-between sm:min-w-64 items-center sm:items-end gap-3 flex-wrap" role="group">+ <section class="flex gap-2"><button class="p-2 bg-button-100 dark:bg-button-900 rounded-lg ring-indigo-500 hover:ring-indigo-800 hover:bg-button-200 dark:hover:bg-indigo-400 hover:text-neutral-950 ring-[0.125rem] ring-inset">Edit Details</button><button class="p-2 bg-button-100 dark:bg-button-900 rounded-lg hover:ring-indigo-500 hover:ring-[0.125rem] ring-inset">s</button></section>- <section class="hidden justify-end">+ <section class="hidden"><button type="button" class="bg-button-100 dark:bg-button-900 dark:text-white rounded-l-md border-r ring border-indigo-300 py-2 hover:bg-red-700 hover:text-white px-3 shadow-xl" @click="playlistSeek(-1)"><div class="flex flex-row align-middle"><svg class="w-5 mr-2" fill="currentColor" viewBox="0 0 20 20" xmlns="https://www.w3.org/2000/svg">@@ -84,8 +91,9 @@</div></button></section>- <section class="flex gap flex-col items-end text-sm text-slate-400">- <p>#atmospheroc #sad #rocky</p>+ <section class="flex gap flex-col items-end text-sm text-slate-400 justify-between">+ <p>20 views</p>+ <p class="line-clamp-1 truncate">#atmospheroc #sad #rocky</p></section></div></div>