diff --git a/src/lib/components/ui/MultiEntityPicker.svelte b/src/lib/components/ui/MultiEntityPicker.svelte new file mode 100644 index 0000000..8dd7d18 --- /dev/null +++ b/src/lib/components/ui/MultiEntityPicker.svelte @@ -0,0 +1,253 @@ + + +{#if name} + {#each values as v} + + {/each} +{/if} + + + +{#if open} + +
{}} + style="animation: mepFadeIn 0.15s ease-out" + > + +
+{/if} + + diff --git a/src/lib/components/widget/WidgetConfigPanel.svelte b/src/lib/components/widget/WidgetConfigPanel.svelte index d863703..56f812b 100644 --- a/src/lib/components/widget/WidgetConfigPanel.svelte +++ b/src/lib/components/widget/WidgetConfigPanel.svelte @@ -3,6 +3,7 @@ import { fade } from 'svelte/transition'; import { tick } from 'svelte'; import DynamicIcon from '$lib/components/ui/DynamicIcon.svelte'; + import MultiEntityPicker from '$lib/components/ui/MultiEntityPicker.svelte'; interface AppInfo { id: string; @@ -174,13 +175,14 @@ transition:fade={{ duration: 100 }} onkeydown={handleKeydown} role="dialog" + tabindex="-1" >

{mode === 'create' ? ($t('widget.add_widget') ?? 'Add Widget') : ($t('widget.edit_widget') ?? 'Edit Widget')} ({widgetType})

-
@@ -188,6 +190,7 @@
{#if widgetType === 'app'}
+
@@ -240,90 +243,90 @@ {:else if widgetType === 'bookmark'}
- +
- +
- +
- +
{:else if widgetType === 'note'}
- +
- +
{:else if widgetType === 'embed'}
- +
- +
- +
{:else if widgetType === 'status'}
- +
+ -
- {#each apps as app} - - {/each} -
+ ({ value: a.id, label: a.name, icon: a.icon, iconType: a.iconType }))} + bind:values={statusAppIds} + placeholder={$t('widget.select_apps') ?? 'Select apps...'} + searchPlaceholder={$t('common.search') ?? 'Search...'} + />
{:else if widgetType === 'clock'}
- +
- +