mirror of
https://github.com/immich-app/immich.git
synced 2025-05-30 19:54:52 -04:00
fix(web): sizing of fullscreen modal (#9850)
This commit is contained in:
parent
9fc0a0d935
commit
371a5ce0aa
@ -22,9 +22,9 @@
|
|||||||
/**
|
/**
|
||||||
* Sets the width of the modal.
|
* Sets the width of the modal.
|
||||||
*
|
*
|
||||||
* - `wide`: 750px
|
* - `wide`: 48rem
|
||||||
* - `narrow`: 450px
|
* - `narrow`: 28rem
|
||||||
* - `auto`: fits the width of the modal content, up to a maximum of 550px
|
* - `auto`: fits the width of the modal content, up to a maximum of 32rem
|
||||||
*/
|
*/
|
||||||
export let width: 'wide' | 'narrow' | 'auto' = 'narrow';
|
export let width: 'wide' | 'narrow' | 'auto' = 'narrow';
|
||||||
|
|
||||||
@ -34,11 +34,11 @@
|
|||||||
let modalWidth: string;
|
let modalWidth: string;
|
||||||
$: {
|
$: {
|
||||||
if (width === 'wide') {
|
if (width === 'wide') {
|
||||||
modalWidth = 'w-[750px]';
|
modalWidth = 'w-[48rem]';
|
||||||
} else if (width === 'narrow') {
|
} else if (width === 'narrow') {
|
||||||
modalWidth = 'w-[450px]';
|
modalWidth = 'w-[28rem]';
|
||||||
} else {
|
} else {
|
||||||
modalWidth = 'sm:max-w-[550px]';
|
modalWidth = 'sm:max-w-lg';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@ -47,15 +47,14 @@
|
|||||||
role="presentation"
|
role="presentation"
|
||||||
in:fade={{ duration: 100 }}
|
in:fade={{ duration: 100 }}
|
||||||
out:fade={{ duration: 100 }}
|
out:fade={{ duration: 100 }}
|
||||||
class="fixed left-0 top-0 z-[9999] flex h-screen w-screen place-content-center place-items-center bg-black/40"
|
class="fixed left-0 top-0 z-[9999] flex h-dvh w-screen place-content-center place-items-center bg-black/40"
|
||||||
on:keydown={(event) => {
|
on:keydown={(event) => {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<FocusTrap>
|
<FocusTrap>
|
||||||
<div
|
<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"
|
class="z-[9999] max-w-[95vw] max-h-[min(95dvh,56rem)] {modalWidth} overflow-y-auto rounded-3xl bg-immich-bg shadow-md dark:bg-immich-dark-gray dark:text-immich-dark-fg immich-scrollbar"
|
||||||
style="max-height: min(95vh, 900px);"
|
|
||||||
use:clickOutside={{ onOutclick: onClose, onEscape: onClose }}
|
use:clickOutside={{ onOutclick: onClose, onEscape: onClose }}
|
||||||
tabindex="-1"
|
tabindex="-1"
|
||||||
aria-modal="true"
|
aria-modal="true"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user