mirror of
https://github.com/aleksilassila/reiverr.git
synced 2026-04-17 21:53:12 +02:00
feat: fix Sheet close behavior
This commit is contained in:
@@ -7,4 +7,6 @@
|
||||
./**/dist
|
||||
|
||||
backend/plugins
|
||||
wireguard
|
||||
wireguard
|
||||
|
||||
./**/torrent-stream-downloads
|
||||
@@ -5,6 +5,7 @@
|
||||
import IconButton from '../FloatingIconButton.svelte';
|
||||
import { Cross1 } from 'radix-icons-svelte';
|
||||
import classNames from 'classnames';
|
||||
import Container from '../Container.svelte';
|
||||
|
||||
export let size: 'sm' | 'md' | 'lg' = 'md';
|
||||
export let showCloseButton: boolean = true;
|
||||
@@ -18,13 +19,21 @@
|
||||
}
|
||||
|
||||
$: sizeClasses = {
|
||||
'sm': 'max-w-xs w-full',
|
||||
'md': 'max-w-sm w-full',
|
||||
'lg': 'max-w-md w-full'
|
||||
sm: 'max-w-xs w-full',
|
||||
md: 'max-w-sm w-full',
|
||||
lg: 'max-w-md w-full'
|
||||
}[size];
|
||||
</script>
|
||||
|
||||
<Modal on:close={handleClose} let:close>
|
||||
<Container
|
||||
trapFocus
|
||||
focusOnMount
|
||||
class={classNames('fixed inset-0', $$restProps.class)}
|
||||
on:back={({ detail: e }) => {
|
||||
handleClose();
|
||||
e.stopPropagation();
|
||||
}}
|
||||
>
|
||||
<!-- Backdrop -->
|
||||
<div
|
||||
class="fixed inset-0 bg-primary-900/75 flex justify-end"
|
||||
@@ -58,4 +67,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Modal>
|
||||
</Container>
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<Sheet on:close={handleClose} size="md" let:close>
|
||||
<Sheet on:close={handleClose} size="md">
|
||||
<div class="space-y-6">
|
||||
<div class="rounded-xl overflow-hidden">
|
||||
<LazyImg src={imgUrl} />
|
||||
@@ -112,7 +112,7 @@
|
||||
type="primary-dark"
|
||||
action={async () => {
|
||||
await handleStream();
|
||||
close();
|
||||
handleClose();
|
||||
}}
|
||||
let:loading
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user