Skip to content

A self-hosted media server and file management system

fix: vertical offset on video tooltip is not configurable

aminnausin5c6f207feb17
diff --git a/resources/js/components/video/VideoTooltipBase.vue b/resources/js/components/video/VideoTooltipBase.vue
index caaff00d..75f5233f 100644
--- a/resources/js/components/video/VideoTooltipBase.vue
+++ b/resources/js/components/video/VideoTooltipBase.vue
@@ -7,7 +7,7 @@ const props = withDefaults(
tooltipArrow?: boolean;
tooltipPosition?: 'top' | 'bottom';
offset?: number;
- className?: string;
+ verticalOffset?: string;
style?: string;
targetElement?: HTMLElement;
}>(),
@@ -16,7 +16,7 @@ const props = withDefaults(
tooltipArrow: false,
tooltipPosition: 'top',
offset: 8,
- className: '',
+ verticalOffset: '-3rem',
style: '',
},
);
@@ -137,7 +137,7 @@ watch(
leave-from-class="scale-100 opacity-100"
leave-to-class="scale-[0.1] opacity-50"
>
- <div ref="tooltip" v-show="tooltipVisible" :class="`absolute !text-white ${className ? className : '-top-12'}`" style="z-index: 35">
+ <div ref="tooltip" v-show="tooltipVisible" :class="`absolute !text-white`" style="z-index: 35" :style="{ top: verticalOffset }">
<slot name="content">
<p
class="flex min-h-4 flex-shrink-0 items-center justify-center whitespace-nowrap rounded-md bg-neutral-800 bg-opacity-90 px-2 py-1 font-mono text-xs shadow-sm backdrop-blur-sm"