Skip to content

A self-hosted media server and file management system

fix: video control wrapper always creates new context layer

aminnausin5e48e120ff60
diff --git a/resources/js/components/cards/data/ImageCard.vue b/resources/js/components/cards/data/ImageCard.vue
index e8b592c6..65f99a13 100644
--- a/resources/js/components/cards/data/ImageCard.vue
+++ b/resources/js/components/cards/data/ImageCard.vue
@@ -86,7 +86,7 @@ const emit = defineEmits({
<!-- Overlay -->
<div :class="cn('duration-input pointer-events-none absolute inset-0 z-3 flex items-start justify-between gap-1 p-2 transition-[translate,margin]')">
- <VideoControlWrapper :class="cn('w-fit opacity-0 transition-opacity duration-100', { 'opacity-100': isPrimary })">
+ <VideoControlWrapper :class="cn('w-fit opacity-0 transition-opacity duration-100', { 'opacity-100': isPrimary, 'backdrop-blur-none': !isPrimary })">
<p :class="cn('pointer-events-auto px-1 text-white text-shadow-lg')">Primary</p>
</VideoControlWrapper>
<div class="text-foreground-i dark:text-foreground-0 pointer-events-auto ms-auto flex gap-1" v-if="data.type !== 'preview'">
diff --git a/resources/js/components/video/VideoControlWrapper.vue b/resources/js/components/video/VideoControlWrapper.vue
index ad2446d0..3f671197 100644
--- a/resources/js/components/video/VideoControlWrapper.vue
+++ b/resources/js/components/video/VideoControlWrapper.vue
@@ -1,11 +1,12 @@
<script setup lang="ts">
import { useAppStore } from '@/stores/AppStore';
import { storeToRefs } from 'pinia';
+import { cn } from '@aminnausin/cedar-ui';
const { usingPlayerModernUI: isBackgroundEnabled } = storeToRefs(useAppStore());
</script>
<template>
- <div :class="['flex items-center gap-1 rounded-full transition-[padding]', { 'xsm:p-1 bg-neutral-900/60 p-0.5 backdrop-blur-xs': isBackgroundEnabled }]">
+ <div :class="cn('flex items-center gap-1 rounded-full transition-[padding]', { 'xsm:p-1 bg-neutral-900/60 p-0.5 backdrop-blur-xs': isBackgroundEnabled }, $attrs.class)">
<slot></slot>
</div>
</template>
diff --git a/resources/js/components/video/VideoPreview.vue b/resources/js/components/video/VideoPreview.vue
index 3cf6fdde..91b40d94 100644
--- a/resources/js/components/video/VideoPreview.vue
+++ b/resources/js/components/video/VideoPreview.vue
@@ -224,7 +224,9 @@ defineExpose({ hovered });
})
"
>
- <VideoControlWrapper :class="cn('ml-1 w-fit opacity-0 transition-opacity duration-150', { 'opacity-100': hovered, 'mb-2': !activeCue })">
+ <VideoControlWrapper
+ :class="cn('ml-1 w-fit opacity-0 transition-opacity duration-150', { 'opacity-100': hovered, 'mb-2': !activeCue, 'backdrop-blur-none': !hovered })"
+ >
<p :class="cn('font-figtree px-1 text-white tabular-nums text-shadow-lg')">
{{ activeCue ? timestamp : toFormattedDuration(data.duration, false, 'digital') }}
</p>