You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-06-26 05:01:05 +02:00
feat(web): UI/UX improvement for date time edit form (#5505)
This commit is contained in:
@ -15,8 +15,12 @@
|
||||
import { fly } from 'svelte/transition';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
let className = '';
|
||||
export { className as class };
|
||||
|
||||
const dispatch = createEventDispatcher<{
|
||||
select: T;
|
||||
'click-outside': void;
|
||||
}>();
|
||||
|
||||
export let options: T[];
|
||||
@ -36,6 +40,8 @@
|
||||
if (!controlable) {
|
||||
showMenu = false;
|
||||
}
|
||||
|
||||
dispatch('click-outside');
|
||||
};
|
||||
|
||||
const handleSelectOption = (option: T) => {
|
||||
@ -76,7 +82,7 @@
|
||||
{#if showMenu}
|
||||
<div
|
||||
transition:fly={{ y: -30, x: 30, duration: 100 }}
|
||||
class="text-md fixed z-50 flex min-w-[250px] max-h-[70vh] overflow-y-scroll immich-scrollbar flex-col rounded-2xl bg-gray-100 py-2 text-black shadow-lg dark:bg-gray-700 dark:text-white"
|
||||
class="text-md fixed z-50 flex min-w-[250px] max-h-[70vh] overflow-y-scroll immich-scrollbar flex-col rounded-2xl bg-gray-100 py-2 text-black shadow-lg dark:bg-gray-700 dark:text-white {className}"
|
||||
>
|
||||
{#each options as option (option)}
|
||||
{@const renderedOption = renderOption(option)}
|
||||
|
Reference in New Issue
Block a user