mirror of
https://github.com/Art051/immich.git
synced 2025-08-11 19:29:00 +00:00
feat: Edit metadata (#5066)
* chore: rebase and clean-up * feat: sync description, add e2e tests * feat: simplify web code * chore: unit tests * fix: linting * Bug fix with the arrows key * timezone typeahead filter timezone typeahead filter * small stlying * format fix * Bug fix in the map selection Bug fix in the map selection * Websocket basic Websocket basic * Update metadata visualisation through the websocket * Update timeline * fix merge * fix web * fix web * maplibre system * format fix * format fix * refactor: clean up * Fix small bug in the hour/timezone * Don't diplay modify for readOnly asset * Add log in case of failure * Formater + try/catch error * Remove everything related to websocket * Revert "Remove everything related to websocket" This reverts commit 14bcb9e1e4398e8211adfe6c14348ef8f3f5fce4. * remove notification * fix test --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com> Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
@@ -7,8 +7,9 @@
|
||||
|
||||
export let color: Color = 'transparent-gray';
|
||||
export let disabled = false;
|
||||
export let fullwidth = false;
|
||||
</script>
|
||||
|
||||
<Button size="link" {color} shadow={false} rounded="lg" {disabled} on:click>
|
||||
<Button size="link" {color} shadow={false} rounded="lg" {disabled} on:click {fullwidth}>
|
||||
<slot />
|
||||
</Button>
|
||||
|
||||
@@ -29,10 +29,13 @@
|
||||
icon?: string;
|
||||
};
|
||||
|
||||
let showMenu = false;
|
||||
export let showMenu = false;
|
||||
export let controlable = false;
|
||||
|
||||
const handleClickOutside = () => {
|
||||
showMenu = false;
|
||||
if (!controlable) {
|
||||
showMenu = false;
|
||||
}
|
||||
};
|
||||
|
||||
const handleSelectOption = (option: T) => {
|
||||
@@ -60,7 +63,7 @@
|
||||
|
||||
<div id="dropdown-button" use:clickOutside on:outclick={handleClickOutside} on:escape={handleClickOutside}>
|
||||
<!-- BUTTON TITLE -->
|
||||
<LinkButton on:click={() => (showMenu = true)}>
|
||||
<LinkButton on:click={() => (showMenu = true)} fullwidth>
|
||||
<div class="flex place-items-center gap-2 text-sm">
|
||||
{#if renderedSelectedOption?.icon}
|
||||
<Icon path={renderedSelectedOption.icon} size="18" />
|
||||
@@ -72,13 +75,13 @@
|
||||
<!-- DROP DOWN MENU -->
|
||||
{#if showMenu}
|
||||
<div
|
||||
transition:fly={{ y: -30, x: 30, duration: 200 }}
|
||||
class="text-md absolute right-0 top-5 z-50 flex min-w-[250px] flex-col rounded-2xl bg-gray-100 py-4 text-black shadow-lg dark:bg-gray-700 dark:text-white"
|
||||
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"
|
||||
>
|
||||
{#each options as option (option)}
|
||||
{@const renderedOption = renderOption(option)}
|
||||
<button
|
||||
class="grid grid-cols-[20px,1fr] place-items-center gap-2 p-4 transition-all hover:bg-gray-300 dark:hover:bg-gray-800"
|
||||
class="grid grid-cols-[20px,1fr] place-items-center p-2 transition-all hover:bg-gray-300 dark:hover:bg-gray-800"
|
||||
on:click={() => handleSelectOption(option)}
|
||||
>
|
||||
{#if _.isEqual(selectedOption, option)}
|
||||
|
||||
Reference in New Issue
Block a user