A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
refactor: toggle and global animation duration
aminnausin44df368255d3
diff --git a/resources/css/cedar-theme.css b/resources/css/cedar-theme.cssindex ae308cc5..70dfed4b 100644--- a/resources/css/cedar-theme.css+++ b/resources/css/cedar-theme.css@@ -35,6 +35,7 @@/* Input */--input-height: calc(var(--spacing) * 9); /* h-8 */+ --duration-input: 200ms;/* Surfaces (0 is page) */--color-surface-i: oklch(0.1749 0.0082 285.52); /* primary-dark-950 #101014 */diff --git a/resources/js/components/cards/data/LibraryCard.vue b/resources/js/components/cards/data/LibraryCard.vueindex 3cd049c1..04984c2f 100644--- a/resources/js/components/cards/data/LibraryCard.vue+++ b/resources/js/components/cards/data/LibraryCard.vue@@ -110,7 +110,7 @@ watch(alt="Folder Cover Art"loading="lazy"/>- <span class="ring-primary/90 absolute top-0 left-0 h-full w-full rounded-t-md transition duration-200 ease-in-out ring-inset hover:ring-2"></span>+ <span class="ring-primary/90 absolute top-0 left-0 h-full w-full rounded-t-md transition duration-(--duration-input) ease-in-out ring-inset hover:ring-2"></span></RouterLink><section class="flex h-full flex-1 flex-col gap-2 p-3"><div class="flex flex-wrap items-start justify-between">diff --git a/resources/js/components/cedar-ui/badge/BadgeTag.vue b/resources/js/components/cedar-ui/badge/BadgeTag.vueindex 2d8b0310..3f8d9967 100644--- a/resources/js/components/cedar-ui/badge/BadgeTag.vue+++ b/resources/js/components/cedar-ui/badge/BadgeTag.vue@@ -20,7 +20,7 @@ const wrapperProps = computed(() => (props.URL ? { to: props.URL } : {}));:is="wrapper":class="cn(- 'text-foreground-4 bg-primary dark:bg-primary-dark shrink-0 truncate rounded-xl p-1 px-2 text-sm leading-none lowercase transition-colors duration-200',+ 'text-foreground-4 bg-primary dark:bg-primary-dark shrink-0 truncate rounded-xl p-1 px-2 text-sm leading-none lowercase transition-colors duration-(--duration-input)',{'cursor-default': props.URL,'flex items-center justify-between gap-1': removeable,diff --git a/resources/js/components/cedar-ui/button/ButtonBase.vue b/resources/js/components/cedar-ui/button/ButtonBase.vueindex 1364a838..9af3f1a1 100644--- a/resources/js/components/cedar-ui/button/ButtonBase.vue+++ b/resources/js/components/cedar-ui/button/ButtonBase.vue@@ -50,7 +50,7 @@ defineExpose({:is="wrapper":class="cn(- 'transition duration-200 ease-in-out focus:outline-hidden', // Animation+ 'transition duration-(--duration-input) ease-in-out focus:outline-hidden', // Animation{ 'button-disabled-pointer': wrapper === 'button' && disabled }, // Disabled Button{ 'button-disabled': disabled }, // Disabled'flex items-center justify-center gap-2', // Layoutdiff --git a/resources/js/components/cedar-ui/drawer/DrawerController.vue b/resources/js/components/cedar-ui/drawer/DrawerController.vueindex 323738e9..292e19ef 100644--- a/resources/js/components/cedar-ui/drawer/DrawerController.vue+++ b/resources/js/components/cedar-ui/drawer/DrawerController.vue@@ -22,10 +22,10 @@ const drawerStore = useDrawer();v-cloak><Transition- enter-active-class="transition-opacity ease-out duration-200"+ enter-active-class="transition-opacity ease-out duration-(--duration-input)"enter-from-class="opacity-0"enter-to-class="opacity-100"- leave-active-class="transition-opacity ease-in duration-200"+ leave-active-class="transition-opacity ease-in duration-(--duration-input)"leave-from-class="opacity-100"leave-to-class="opacity-0">@@ -37,10 +37,10 @@ const drawerStore = useDrawer();</Transition><Transition- enter-active-class="transition-all ease-out duration-200"+ enter-active-class="transition-all ease-out duration-(--duration-input)"enter-from-class="opacity-0 translate-y-full"enter-to-class="opacity-100 translate-y-0"- leave-active-class="transition-all ease-in duration-200"+ leave-active-class="transition-all ease-in duration-(--duration-input)"leave-from-class="opacity-100 translate-y-0"leave-to-class="opacity-0 translate-y-full">diff --git a/resources/js/components/cedar-ui/hover-card/HoverCard.vue b/resources/js/components/cedar-ui/hover-card/HoverCard.vueindex 509a9878..c00bfabc 100644--- a/resources/js/components/cedar-ui/hover-card/HoverCard.vue+++ b/resources/js/components/cedar-ui/hover-card/HoverCard.vue@@ -90,7 +90,7 @@ watch(:class="cn('absolute z-30',- 'transition-opacity duration-200 ease-in-out',+ 'transition-opacity duration-(--duration-input) ease-in-out','flex gap-2 p-3','border border-neutral-200/70 dark:border-none','bg-white dark:bg-neutral-800/70',diff --git a/resources/js/components/cedar-ui/hover-card/RelativeHoverCard.vue b/resources/js/components/cedar-ui/hover-card/RelativeHoverCard.vueindex 7f36caae..ea674c0d 100644--- a/resources/js/components/cedar-ui/hover-card/RelativeHoverCard.vue+++ b/resources/js/components/cedar-ui/hover-card/RelativeHoverCard.vue@@ -61,7 +61,7 @@ const hoverCardLeave = () => {:class="cn('absolute z-30',- 'transition-opacity duration-200 ease-in-out',+ 'transition-opacity duration-(--duration-input) ease-in-out','flex h-fit items-center gap-2 overflow-auto p-3','border-overlay-2-t border dark:border-none','bg-overlay-t text-foreground-0',diff --git a/resources/js/components/cedar-ui/input/InputShell.vue b/resources/js/components/cedar-ui/input/InputShell.vueindex 4f685d5b..c11e8504 100644--- a/resources/js/components/cedar-ui/input/InputShell.vue+++ b/resources/js/components/cedar-ui/input/InputShell.vue@@ -13,7 +13,7 @@ const props = withDefaults(defineProps<InputShellProps>(), { clampText: true });cn('h-(--input-height)','scrollable-input scrollbar-thin',- 'transition duration-200 ease-in-out focus:outline-hidden',+ 'transition duration-(--duration-input) ease-in-out focus:outline-hidden','bg-surface-2 placeholder:text-foreground-3 dark:placeholder:text-foreground-2 dark:bg-neutral-700','hocus:ring-2 hover:ring-primary-muted focus-visible:ring-primary',{ 'line-clamp-1 text-ellipsis whitespace-nowrap': clampText },diff --git a/resources/js/components/cedar-ui/multi-select/InputMultiChip.vue b/resources/js/components/cedar-ui/multi-select/InputMultiChip.vueindex c63a9940..f94a35d6 100644--- a/resources/js/components/cedar-ui/multi-select/InputMultiChip.vue+++ b/resources/js/components/cedar-ui/multi-select/InputMultiChip.vue@@ -162,7 +162,7 @@ watch(:title="title ?? 'Make Selection'":disabled="disabled":class="[- 'transition duration-200 ease-in-out focus:outline-hidden', // Animation+ 'transition duration-(--duration-input) ease-in-out focus:outline-hidden', // Animation'disabled:button-disabled disabled:button-disabled-pointer', // Disabled'relative flex items-center justify-between gap-2', // Layout'cursor-pointer rounded-md shadow-xs', // Style@@ -190,7 +190,7 @@ watch('bottom-0 mb-11': select.selectDropdownPosition == 'top','top-0 mt-11': select.selectDropdownPosition == 'bottom',}"- class="bg-overlay-t ring-r-button absolute z-30 mt-1 max-h-56 w-full overflow-clip rounded-md shadow-md ring-1 backdrop-blur-lg transition duration-200 ease-in-out"+ class="bg-overlay-t ring-r-button absolute z-30 mt-1 max-h-56 w-full overflow-clip rounded-md shadow-md ring-1 backdrop-blur-lg transition duration-(--duration-input) ease-in-out":options="{allowOutsideClick: true,initialFocus: () => selectInput?.el,diff --git a/resources/js/components/cedar-ui/select/InputSelect.vue b/resources/js/components/cedar-ui/select/InputSelect.vueindex 26806e42..b9d4bef9 100644--- a/resources/js/components/cedar-ui/select/InputSelect.vue+++ b/resources/js/components/cedar-ui/select/InputSelect.vue@@ -121,7 +121,7 @@ watch(:disabled="disabled":class="cn(- 'transition duration-200 ease-in-out focus:outline-hidden', // Animation+ 'transition duration-(--duration-input) ease-in-out focus:outline-hidden', // Animation'disabled:button-disabled disabled:button-disabled-pointer', // Disabled'relative flex items-center justify-between gap-2', // Layout'cursor-pointer rounded-md shadow-xs', // Style@@ -154,7 +154,7 @@ watch(<OnClickOutsidev-show="select.selectOpen":class="[select.selectDropdownPosition == 'top' ? `bottom-0 ${menuMargin?.bottom ?? 'mb-11'}` : `top-0 ${menuMargin?.top ?? 'mt-11'}`]"- class="bg-overlay-t ring-r-button absolute z-30 mt-1 max-h-56 w-full overflow-clip rounded-md shadow-md ring-1 backdrop-blur-lg transition duration-200 ease-in-out"+ class="bg-overlay-t ring-r-button absolute z-30 mt-1 max-h-56 w-full overflow-clip rounded-md shadow-md ring-1 backdrop-blur-lg transition duration-(--duration-input) ease-in-out"@trigger="select.toggleSelect(false)"@keydown.esc.stop="(event: Event) => {diff --git a/resources/js/components/cedar-ui/table/TablePaginationButton.vue b/resources/js/components/cedar-ui/table/TablePaginationButton.vueindex 3863585a..fc930f2f 100644--- a/resources/js/components/cedar-ui/table/TablePaginationButton.vue+++ b/resources/js/components/cedar-ui/table/TablePaginationButton.vue@@ -31,7 +31,7 @@ const props = withDefaults(defineProps<TablePaginationButtonProps>(), {v-if="!text || underline":class="cn(- 'bg-primary group-hover:border-primary absolute bottom-0 -mx-px box-content h-px w-0 translate-y-px border-transparent duration-200 ease-out group-hover:left-0 group-hover:w-full group-hover:border-r group-hover:border-l',+ 'bg-primary group-hover:border-primary absolute bottom-0 -mx-px box-content h-px w-0 translate-y-px border-transparent duration-(--duration-input) ease-out group-hover:left-0 group-hover:w-full group-hover:border-r group-hover:border-l',{'left-0 w-full border-r border-l': currentPage === pageNumber,'left-1/2': currentPage !== pageNumber,diff --git a/resources/js/components/inputs/ToggleBase.vue b/resources/js/components/inputs/ToggleBase.vueindex 227e7b7a..fa522de8 100755--- a/resources/js/components/inputs/ToggleBase.vue+++ b/resources/js/components/inputs/ToggleBase.vue@@ -17,23 +17,26 @@ const props = withDefaults(defineProps<ToggleProps>(), { name: 'toggle', knobHor<label:class="cn(- 'group hover:bg-primary-dark-600 hover:has-[input:checked]:bg-primary-800 @container relative inline-flex h-8 w-16 cursor-pointer items-center rounded-lg border-2 border-zinc-800 bg-zinc-800 transition-colors duration-300 has-checked:bg-white',+ 'group hover:bg-primary-dark-600 hover:has-[input:checked]:bg-primary-800',+ 'focus-within:bg-primary-dark-600 focus-within:has-[input:checked]:bg-primary-800',+ '@container relative inline-flex h-8 w-16 cursor-pointer items-center rounded-lg',+ 'border-primary-dark-800 bg-primary-dark-800 border-2 transition-colors duration-(--duration-input) has-checked:bg-white',props.class,)"- :title="title ?? name"- :for="name"+ :title="title ?? props.name"+ :for="props.name":style="{'--knob-margin': knobHorizontalMargin,}">- <input type="checkbox" :id="name" :name="name" v-model="model" class="peer sr-only absolute" />+ <input type="checkbox" :id="props.name" :name="props.name" v-model="model" class="peer sr-only absolute" /><span:class="cn(- 'group-hover:bg-primary-dark-600 absolute top-1/4 left-[calc(var(--spacing)*var(--knob-margin))] aspect-square h-1/2 rounded-full bg-zinc-800 shadow-[inset_16px_0_0_0_#fff]',- 'transition-all duration-300',+ 'group-hover:bg-primary-dark-600 bg-primary-dark-800 absolute top-1/4 left-[calc(var(--spacing)*var(--knob-margin))] aspect-square h-1/2 rounded-full shadow-[inset_16px_0_0_0_#fff]',+ 'transition-all duration-(--duration-input)','peer-checked:translate-x-[calc(100cqw-100%-var(--spacing)*var(--knob-margin)*2)] peer-checked:overflow-hidden peer-checked:shadow-none',knobStyle,)diff --git a/resources/js/components/modals/GlobalModal.vue b/resources/js/components/modals/GlobalModal.vueindex d0ba8f9f..4584a600 100644--- a/resources/js/components/modals/GlobalModal.vue+++ b/resources/js/components/modals/GlobalModal.vue@@ -9,7 +9,7 @@ const modalStore = useModalStore();<Teleport to="body"><dialogv-show="modalStore.isOpen || modalStore.isAnimating"- class="modal fixed top-0 left-0 z-300 flex items-center justify-center w-screen h-screen text-gray-900 dark:text-neutral-200 bg-transparent"+ class="modal fixed top-0 left-0 z-300 flex h-screen w-screen items-center justify-center bg-transparent text-gray-900 dark:text-neutral-200"v-cloakaria-modal="true"aria-labelledby="modalTitle"@@ -23,21 +23,21 @@ const modalStore = useModalStore();leave-from-class="opacity-100"leave-to-class="opacity-0">- <div v-if="modalStore.isOpen" class="absolute inset-0 w-full h-full backdrop-blur-xs bg-opacity-70"></div>+ <div v-if="modalStore.isOpen" class="bg-opacity-70 absolute inset-0 h-full w-full backdrop-blur-xs"></div></Transition><Transitionenter-active-class="ease-out duration-300"enter-from-class="opacity-0 sm:scale-95"enter-to-class="opacity-100 sm:scale-100"- leave-active-class="ease-in duration-200"+ leave-active-class="ease-in duration-(--duration-input)"leave-from-class="opacity-100 sm:scale-100"leave-to-class="opacity-0 sm:scale-95">- <UseFocusTrap v-if="modalStore.isOpen" class="relative w-full px-6 py-10 sm:py-6 max-h-screen h-full overflow-y-scroll scrollbar-hide flex items-center">+ <UseFocusTrap v-if="modalStore.isOpen" class="scrollbar-hide relative flex h-full max-h-screen w-full items-center overflow-y-scroll px-6 py-10 sm:py-6"><OnClickOutside@trigger="modalStore.close"@keydown.esc="modalStore.close"- class="gap-4 flex flex-col drop-shadow-md m-auto w-full p-6 bg-white dark:bg-neutral-800/90 backdrop-blur-lg border shadow-lg border-neutral-200 dark:border-neutral-700 sm:max-w-lg xl:max-w-xl 3xl:max-w-2xl rounded-md sm:rounded-lg"+ class="3xl:max-w-2xl m-auto flex w-full flex-col gap-4 rounded-md border border-neutral-200 bg-white p-6 shadow-lg drop-shadow-md backdrop-blur-lg sm:max-w-lg sm:rounded-lg xl:max-w-xl dark:border-neutral-700 dark:bg-neutral-800/90"tabindex="-1"><component :is="modalStore.component" v-bind="modalStore.props" />diff --git a/resources/js/components/pinesUI/DropdownMenu.vue b/resources/js/components/pinesUI/DropdownMenu.vueindex ae104e5d..3999858c 100755--- a/resources/js/components/pinesUI/DropdownMenu.vue+++ b/resources/js/components/pinesUI/DropdownMenu.vue@@ -194,7 +194,7 @@ onUnmounted(() => {<OnClickOutside @trigger="$emit('toggleDropdown', false)"><slot name="trigger"></slot><Transition- enter-active-class="ease-out duration-200"+ enter-active-class="ease-out duration-(--duration-input)"enter-from-class="-translate-y-4"enter-to-class="translate-y-0"leave-active-class="ease-in duration-100"diff --git a/resources/js/components/pinesUI/ModalBase.vue b/resources/js/components/pinesUI/ModalBase.vueindex 9d257f85..b733788c 100755--- a/resources/js/components/pinesUI/ModalBase.vue+++ b/resources/js/components/pinesUI/ModalBase.vue@@ -68,7 +68,7 @@ watch(enter-active-class="ease-out duration-300"enter-from-class="opacity-0 sm:scale-95"enter-to-class="opacity-100 sm:scale-100"- leave-active-class="ease-in duration-200"+ leave-active-class="ease-in duration-(--duration-input)"leave-from-class="opacity-100 sm:scale-100"leave-to-class="opacity-0 sm:scale-95">diff --git a/resources/js/components/video/VideoHeatmap.vue b/resources/js/components/video/VideoHeatmap.vueindex 8c92fc16..23e08cfc 100644--- a/resources/js/components/video/VideoHeatmap.vue+++ b/resources/js/components/video/VideoHeatmap.vue@@ -98,7 +98,7 @@ const heatMap = computed(() => {<svg:class="[getScreenSize() === 'default' ? 'opacity-65' : 'opacity-0 peer-hover:opacity-65',- 'ytp-heat-map-svg pointer-events-none h-6 w-full fill-indigo-200/20 transition-opacity duration-200',+ 'ytp-heat-map-svg pointer-events-none h-6 w-full fill-indigo-200/20 transition-opacity duration-(--duration-input)',]"preserveAspectRatio="none"viewBox="0 0 1000 100"