Skip to content

A self-hosted media server and file management system

fix: video popover style changes

aminnausin7b245ecb3c38
diff --git a/resources/js/components/video/VideoPopover.vue b/resources/js/components/video/VideoPopover.vue
index c0910755..df596f8c 100644
--- a/resources/js/components/video/VideoPopover.vue
+++ b/resources/js/components/video/VideoPopover.vue
@@ -157,7 +157,7 @@ onUnmounted(() => {
:class="`absolute left-1/2 inline-block w-5 -translate-x-2 overflow-hidden ${popoverPosition === 'bottom' ? 'top-0 mt-px -translate-y-2.5' : 'bottom-0 mb-px translate-y-2.5'}`"
>
<div
- :class="`h-2.5 w-2.5 transform rounded-xs border-l border-neutral-700/10 bg-neutral-900/80 ${popoverPosition === 'bottom' ? 'origin-bottom-left rotate-45 border-t' : 'origin-top-left -rotate-45 border-b'} `"
+ :class="`size-2.5 transform rounded-xs border-l border-neutral-700/10 bg-neutral-900/80 ${popoverPosition === 'bottom' ? 'origin-bottom-left rotate-45 border-t' : 'origin-top-left -rotate-45 border-b'} `"
></div>
</div>
<slot name="content">
diff --git a/resources/js/components/video/VideoPopoverItem.vue b/resources/js/components/video/VideoPopoverItem.vue
index 86e545c2..facbf08e 100644
--- a/resources/js/components/video/VideoPopoverItem.vue
+++ b/resources/js/components/video/VideoPopoverItem.vue
@@ -1,24 +1,30 @@
<script setup lang="ts">
import type { PopoverItem } from '@/types/types';
+import { cn } from '@aminnausin/cedar-ui';
+
const props = withDefaults(defineProps<PopoverItem>(), {});
</script>
<template>
<button
:title="title ?? 'Popover Item'"
- :class="`${selected ? (selectedStyle ?? '') : ''}${disabled ? ' hidden' : ''} cursor-pointer relative w-full flex select-none hover:bg-neutral-900 items-center rounded-sm px-2 py-1.5 text-xs outline-hidden transition-colors data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 ${style ?? ''}`"
- :onclick="
- () => {
- if (action) action();
- }
+ :class="
+ cn(
+ 'disabled:button-disabled transition-input relative flex w-full cursor-pointer items-center rounded-sm px-2 py-1.5 text-xs outline-hidden ease-in-out select-none hover:bg-neutral-900',
+ { selectedStyle: selected },
+ { hidden: disabled },
+ style,
+ )
"
+ :onclick="action"
+ :data="disabled"
>
- <component v-if="icon" :is="icon" :class="['w-4 h-4 mr-2 shrink-0', iconStyle ?? '']" />
+ <component v-if="icon" :is="icon" :class="['mr-2 size-4 shrink-0', iconStyle ?? '']" />
<span class="text-nowrap">{{ text }}</span>
<span class="ml-auto text-xs tracking-widest opacity-60">{{ shortcut ?? '' }}</span>
<slot name="selectedIcon">
- <component v-if="selectedIcon" :is="selectedIcon" :class="`w-4 h-4 shrink-0 ${selected ? selectedIconStyle : 'invisible'}`" />
+ <component v-if="selectedIcon" :is="selectedIcon" :class="`size-4 shrink-0 ${selected ? selectedIconStyle : 'invisible'}`" />
<span
v-else
width="24"
@@ -29,7 +35,7 @@ const props = withDefaults(defineProps<PopoverItem>(), {});
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
- class="w-4 h-4 shrink-0"
+ class="size-4 shrink-0"
>
</span>
</slot>