small refactor modals
This commit is contained in:
1 parent
bd389473e5
commit
c69ab716f5
5 files changed
+25
-15
No files matched your search
@@ -10,6 +10,9 @@
|
||||
|
||||
export function close() {
|
||||
modal.close();
|
||||
}
|
||||
|
||||
function onClose() {
|
||||
accordionState = null;
|
||||
}
|
||||
|
||||
@@ -63,7 +66,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<dialog bind:this={modal} class="modal">
|
||||
<dialog bind:this={modal} class="modal" on:close={onClose}>
|
||||
<form method="dialog" class="modal-box bg-base-100">
|
||||
<div class="flex flex-col items-center">
|
||||
<div class="text-xl font-medium m-4">{$tr("Profiles")}</div>
|
||||
@@ -126,11 +129,11 @@
|
||||
<div class="text-xs font-light">{currentInstance}</div>
|
||||
</div>
|
||||
</button>
|
||||
<button class="btn m-6" on:click={close}>{$tr("Close")}</button>
|
||||
<button class="btn m-6">{$tr("Close")}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<form method="dialog" class="modal-backdrop">
|
||||
<button on:click={close}>{$tr("Close")}</button>
|
||||
<button>{$tr("Close")}</button>
|
||||
</form>
|
||||
</dialog>
|
||||
@@ -3,6 +3,14 @@
|
||||
|
||||
let modal;
|
||||
|
||||
export function show() {
|
||||
modal.showModal();
|
||||
}
|
||||
|
||||
export function close() {
|
||||
modal.close();
|
||||
}
|
||||
|
||||
export let label = $tr("Filters");
|
||||
|
||||
export const filters = {
|
||||
@@ -165,10 +173,6 @@
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
export function open() {
|
||||
modal.showModal();
|
||||
}
|
||||
</script>
|
||||
|
||||
<dialog bind:this={modal} id="modal_search_filters" class="modal">
|
||||
@@ -231,11 +235,7 @@
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end">
|
||||
<button
|
||||
class="btn btn-outline"
|
||||
type="button"
|
||||
on:click={() => modal.close()}>{$tr("Close")}</button
|
||||
>
|
||||
<button class="btn btn-outline">{$tr("Close")}</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -154,7 +154,7 @@
|
||||
</div>
|
||||
<button
|
||||
class="btn border border-neutral rounded-full mt-1"
|
||||
on:click={searchFiltersComponent.open()}
|
||||
on:click={searchFiltersComponent.show()}
|
||||
>
|
||||
<div class="h-6 w-8">
|
||||
<FiltersIcon />
|
||||
|
||||
@@ -56,6 +56,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
export function close() {
|
||||
modal.close();
|
||||
}
|
||||
|
||||
function onClose() {
|
||||
// Reset value to original value to avoid weird animation on show
|
||||
value = JSON.parse(JSON.stringify(originalValue));
|
||||
@@ -92,7 +96,7 @@
|
||||
>
|
||||
</div>
|
||||
|
||||
<dialog bind:this={modal} on:close={onClose} class="modal">
|
||||
<dialog bind:this={modal} class="modal" on:close={onClose}>
|
||||
<div class="modal-box bg-base-100">
|
||||
{#if value && homeLayout}
|
||||
<table class="w-full">
|
||||
|
||||
@@ -23,6 +23,9 @@
|
||||
|
||||
export function close() {
|
||||
modal.close();
|
||||
}
|
||||
|
||||
export function onClose() {
|
||||
videoStartAtChecked = false;
|
||||
videoStartAtTimestamp = 0;
|
||||
}
|
||||
@@ -83,7 +86,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<dialog bind:this={modal} class="modal">
|
||||
<dialog bind:this={modal} class="modal" on:close={onClose}>
|
||||
<form method="dialog" class="modal-box bg-base-100">
|
||||
<div class="flex flex-col items-center">
|
||||
<div class="w-64">
|
||||
|
||||
Reference in new issue
Block a user