Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jrasm91 committed Apr 29, 2024
1 parent 2bb3bdd commit 37eb0f5
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 35 deletions.
60 changes: 29 additions & 31 deletions web/src/lib/components/shared-components/change-date.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -55,35 +55,33 @@
};
</script>

<div role="presentation">
<ConfirmDialogue
id="edit-date-time-modal"
confirmColor="primary"
title="Edit date and time"
prompt="Please select a new date:"
disabled={!date.isValid}
onConfirm={handleConfirm}
onClose={handleCancel}
>
<div class="flex flex-col text-md px-4 text-center gap-2" slot="prompt">
<div class="flex flex-col">
<label for="datetime">Date and Time</label>
<DateInput
class="immich-form-input text-sm my-4 w-full"
id="datetime"
type="datetime-local"
bind:value={selectedDate}
/>
</div>
<div class="flex flex-col w-full mt-2">
<Combobox
bind:selectedOption
id="settings-timezone"
label="Timezone"
options={timezones}
placeholder="Search timezone..."
/>
</div>
<ConfirmDialogue
id="edit-date-time-modal"
confirmColor="primary"
title="Edit date and time"
prompt="Please select a new date:"
disabled={!date.isValid}
onConfirm={handleConfirm}
onClose={handleCancel}
>
<div class="flex flex-col text-md px-4 text-center gap-2" slot="prompt">
<div class="flex flex-col">
<label for="datetime">Date and Time</label>
<DateInput
class="immich-form-input text-sm my-4 w-full"
id="datetime"
type="datetime-local"
bind:value={selectedDate}
/>
</div>
</ConfirmDialogue>
</div>
<div class="flex flex-col w-full mt-2">
<Combobox
bind:selectedOption
id="settings-timezone"
label="Timezone"
options={timezones}
placeholder="Search timezone..."
/>
</div>
</div>
</ConfirmDialogue>
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@
in:fade={{ duration: 100 }}
out:fade={{ duration: 100 }}
class="fixed left-0 top-0 z-[9990] flex h-screen w-screen place-content-center place-items-center bg-black/40"
on:keydown={(event) => {
event.stopPropagation();
}}
>
<div
class="z-[9999] max-w-[95vw] max-h-[95vh] {modalWidth} overflow-y-auto rounded-3xl bg-immich-bg shadow-md dark:bg-immich-dark-gray dark:text-immich-dark-fg immich-scrollbar"
Expand Down
2 changes: 1 addition & 1 deletion web/src/lib/utils/shortcut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const shouldIgnoreShortcut = (event: KeyboardEvent): boolean => {
return false;
}
const type = (event.target as HTMLInputElement).type;
return ['textarea', 'text'].includes(type);
return ['textarea', 'text', 'date', 'datetime-local'].includes(type);
};

export const matchesShortcut = (event: KeyboardEvent, shortcut: Shortcut) => {
Expand Down

0 comments on commit 37eb0f5

Please sign in to comment.