diff --git a/apps/mana/apps/web/src/lib/components/PickerOverlay.svelte b/apps/mana/apps/web/src/lib/components/PickerOverlay.svelte new file mode 100644 index 000000000..0a93ff196 --- /dev/null +++ b/apps/mana/apps/web/src/lib/components/PickerOverlay.svelte @@ -0,0 +1,210 @@ + + + +
+
+

{title}

+ +
+
+ {#each items as entry, i} + {#if i > 0}
{/if} + {@render item(entry, i)} + {/each} + {#if footer} + {#if items.length > 0}
{/if} + {@render footer()} + {:else if items.length === 0} +

{emptyLabel}

+ {/if} +
+
+ + diff --git a/apps/mana/apps/web/src/lib/components/workbench/AppPagePicker.svelte b/apps/mana/apps/web/src/lib/components/workbench/AppPagePicker.svelte index 2b85e6711..e11a18e44 100644 --- a/apps/mana/apps/web/src/lib/components/workbench/AppPagePicker.svelte +++ b/apps/mana/apps/web/src/lib/components/workbench/AppPagePicker.svelte @@ -3,7 +3,7 @@ --> -
-
-

App hinzufügen

- -
-
- {#each availableApps as app, i (app.id)} - {#if i > 0}
{/if} - - {/each} - - {#if availableApps.length === 0} -

Alle Apps sind bereits geöffnet

- {/if} -
-
+ + {#snippet item(app)} + + {/snippet} + diff --git a/apps/mana/apps/web/src/lib/modules/contacts/components/pages/ContactPagePicker.svelte b/apps/mana/apps/web/src/lib/modules/contacts/components/pages/ContactPagePicker.svelte index 5c2ad32ac..87c769ec8 100644 --- a/apps/mana/apps/web/src/lib/modules/contacts/components/pages/ContactPagePicker.svelte +++ b/apps/mana/apps/web/src/lib/modules/contacts/components/pages/ContactPagePicker.svelte @@ -1,5 +1,5 @@ -
-
-

Neue Seite

- -
-
- {#each availableOptions as option, i (option.id)} - {#if i > 0}
{/if} - - {/each} - {#if availableOptions.length === 0} -

Alle Seiten sind bereits geöffnet

- {/if} -
-
- - + + {#snippet item(option)} + + {/snippet} + diff --git a/apps/mana/apps/web/src/lib/modules/todo/components/pages/PagePicker.svelte b/apps/mana/apps/web/src/lib/modules/todo/components/pages/PagePicker.svelte index fb4a566dd..138bf2dbb 100644 --- a/apps/mana/apps/web/src/lib/modules/todo/components/pages/PagePicker.svelte +++ b/apps/mana/apps/web/src/lib/modules/todo/components/pages/PagePicker.svelte @@ -1,5 +1,5 @@ -
-
-

Neue Seite

- -
-
- {#each availableOptions as option, i (option.id)} - {#if i > 0}
{/if} - - {/each} - {#if availableOptions.length > 0 && onCreateCustom}
{/if} + + {#snippet item(option)} + + {/snippet} + + {#snippet footer()} {#if onCreateCustom} - {/if} - {#if availableOptions.length === 0 && !onCreateCustom} -

Alle Seiten sind bereits geöffnet

- {/if} -
-
+ {/snippet} +