A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
feat: simple slide in for sidebars
aminnausin1322ba1cfab3
diff --git a/resources/js/layouts/LayoutBase.vue b/resources/js/layouts/LayoutBase.vueindex c25ad52e..14cc0dee 100755--- a/resources/js/layouts/LayoutBase.vue+++ b/resources/js/layouts/LayoutBase.vue@@ -1,6 +1,7 @@<script setup lang="ts">import { useAppStore } from '@/stores/AppStore';import { storeToRefs } from 'pinia';+import { FLAGS } from '@/config/featureFlags';import { cn } from '@aminnausin/cedar-ui';import NavBar from '@/components/panels/NavBar.vue';@@ -9,7 +10,17 @@ const { selectedSideBar, sideBarTarget } = storeToRefs(useAppStore());</script><template>- <main class="page grid snap-y grid-cols-1 gap-3 overflow-x-clip sm:gap-6 md:h-auto lg:grid-cols-10 2xl:grid-cols-6">+ <main+ :class="+ cn(+ 'page grid snap-y grid-cols-1 gap-3 overflow-x-clip sm:gap-6 md:h-auto lg:grid-cols-10 2xl:grid-cols-6',+ FLAGS.USE_ASYMMETRICAL_PLAYER && {+ '2xl:grid-cols-10': true,+ 'lg:col-span-9 2xl:grid-cols-7': !selectedSideBar,+ },+ )+ "+ ><sectionid="left-card":class="@@ -17,21 +28,46 @@ const { selectedSideBar, sideBarTarget } = storeToRefs(useAppStore());'card order-2 col-span-1 sm:scroll-mt-6 lg:order-1 lg:col-span-2 2xl:col-span-1','hidden flex-col gap-3 sm:p-3',selectedSideBar && sideBarTarget === 'left-card' ? 'm:ring-1 sticky top-3 sm:top-6 lg:flex' : 'lg:invisible lg:block',+ FLAGS.USE_ASYMMETRICAL_PLAYER && {+ 'lg:col-span-1': !selectedSideBar || sideBarTarget !== 'left-card',+ '2xl:col-span-2': selectedSideBar && sideBarTarget === 'left-card',+ },)"><slot name="leftSidebar"></slot></section>- <section id="content-card" :class="cn('card', 'order-1 col-span-full w-full grow lg:order-2 lg:col-span-6 2xl:col-span-4', 'flex flex-col gap-3 sm:p-6 sm:pt-3')">+ <section+ id="content-card"+ :class="+ cn(+ 'card',+ 'order-1 col-span-full w-full grow lg:order-2 lg:col-span-6 2xl:col-span-4',+ 'flex flex-col gap-3 sm:p-6 sm:pt-3',+ FLAGS.USE_ASYMMETRICAL_PLAYER && {+ 'lg:col-span-7 2xl:col-span-7': selectedSideBar,+ 'lg:col-span-8 2xl:col-span-5': !selectedSideBar,+ },+ )+ "+ ><NavBar /><slot name="content" class="relative z-0"></slot></section><sectionid="list-card":class="- cn('card order-3 col-span-1 sm:scroll-mt-6 lg:col-span-2 2xl:col-span-1', 'hidden flex-col gap-3 sm:p-3', {- 'hidden lg:flex': selectedSideBar && sideBarTarget === 'list-card',- })+ cn(+ 'card order-3 col-span-1 sm:scroll-mt-6 lg:col-span-2 2xl:col-span-1',+ 'hidden flex-col gap-3 sm:p-3',+ {+ 'hidden lg:flex': selectedSideBar && sideBarTarget === 'list-card',+ },+ FLAGS.USE_ASYMMETRICAL_PLAYER && {+ '2xl:col-span-2': selectedSideBar && sideBarTarget === 'list-card',+ 'lg:col-span-1': !selectedSideBar && sideBarTarget === 'list-card',+ },+ )"><slot name="sidebar"></slot>@@ -48,4 +84,34 @@ const { selectedSideBar, sideBarTarget } = storeToRefs(useAppStore());.page {@apply bg-surface-1 sm:bg-surface-0 xms:px-4 text-foreground-0 p-3 antialiased sm:p-6;}++@keyframes slideInLeft {+ from {+ opacity: 0;+ transform: translateX(-20px);+ }+ to {+ opacity: 1;+ transform: translateX(0);+ }+}++@keyframes slideInRight {+ from {+ opacity: 0;+ transform: translateX(20px);+ }+ to {+ opacity: 1;+ transform: translateX(0);+ }+}++#left-card.lg\:flex {+ animation: slideInLeft var(--tw-duration, 0.3s) cubic-bezier(0.4, 0, 0.2, 1) forwards;+}++#list-card.lg\:flex {+ animation: slideInRight var(--tw-duration, 0.3s) cubic-bezier(0.4, 0, 0.2, 1) forwards;+}</style>