Fixed dropdown menu where if window small and parts of menu hidden no scroll appeared and user was stuck, also fixed time js which showed +1h, enabled image copying documents

This commit is contained in:
Simon Pocrnjič 2026-03-18 21:09:30 +01:00
parent 9c773be3ec
commit d80c99c6c0
3 changed files with 4 additions and 5 deletions

View File

@ -329,7 +329,8 @@ watch(
ref="imageRef" ref="imageRef"
:src="props.src" :src="props.src"
:alt="props.title" :alt="props.title"
class="absolute top-0 left-0 max-w-none pointer-events-none" draggable="false"
class="absolute top-0 left-0 max-w-none"
:style="{ :style="{
transformOrigin: '0 0', transformOrigin: '0 0',
transform: `translate(${translateX}px, ${translateY}px) scale(${imageScale})`, transform: `translate(${translateX}px, ${translateY}px) scale(${imageScale})`,

View File

@ -26,7 +26,7 @@ const forwarded = useForwardPropsEmits(delegatedProps, emits)
<DropdownMenuPortal> <DropdownMenuPortal>
<DropdownMenuContent <DropdownMenuContent
v-bind="forwarded" v-bind="forwarded"
:class="cn('z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', props.class)" :class="cn('z-50 min-w-32 overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md max-h-[var(--reka-dropdown-menu-content-available-height)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2', props.class)"
> >
<slot /> <slot />
</DropdownMenuContent> </DropdownMenuContent>

View File

@ -1,4 +1,4 @@
export function fmtDateTime(d) { export const fmtDateTime = (d) => {
if (!d) return ""; if (!d) return "";
try { try {
const dt = new Date(d); const dt = new Date(d);
@ -6,13 +6,11 @@ export function fmtDateTime(d) {
year: "numeric", year: "numeric",
month: "2-digit", month: "2-digit",
day: "2-digit", day: "2-digit",
timeZone: "UTC",
}); });
const timePart = dt.toLocaleTimeString("sl-SI", { const timePart = dt.toLocaleTimeString("sl-SI", {
hour: "2-digit", hour: "2-digit",
minute: "2-digit", minute: "2-digit",
hour12: false, hour12: false,
timeZone: "UTC",
}); });
return `${datePart} ${timePart}`; return `${datePart} ${timePart}`;
} catch (e) { } catch (e) {