mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
feat(web,a11y): standardize base modal (#8388)
* consistent headings * remove escape key handler * add aria attributes
This commit is contained in:
parent
28e8e539f6
commit
f7afc0334e
10 changed files with 53 additions and 86 deletions
|
|
@ -143,20 +143,16 @@
|
|||
handleError(error, 'Failed to edit shared link');
|
||||
}
|
||||
};
|
||||
|
||||
const getTitle = () => {
|
||||
if (editingLink) {
|
||||
return 'Edit link';
|
||||
}
|
||||
return 'Create link to share';
|
||||
};
|
||||
</script>
|
||||
|
||||
<BaseModal on:close={() => dispatch('close')} on:escape={() => dispatch('escape')}>
|
||||
<svelte:fragment slot="title">
|
||||
<span class="flex place-items-center gap-2">
|
||||
<Icon path={mdiLink} size={24} />
|
||||
{#if editingLink}
|
||||
<p class="font-medium text-immich-fg dark:text-immich-dark-fg">Edit link</p>
|
||||
{:else}
|
||||
<p class="font-medium text-immich-fg dark:text-immich-dark-fg">Create link to share</p>
|
||||
{/if}
|
||||
</span>
|
||||
</svelte:fragment>
|
||||
|
||||
<BaseModal id="create-shared-link-modal" title={getTitle()} icon={mdiLink} on:close>
|
||||
<section class="mx-6 mb-6">
|
||||
{#if shareType === SharedLinkType.Album}
|
||||
{#if !editingLink}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue