{mode === 'create' ? ($t('widget.add_widget') ?? 'Add Widget') : ($t('widget.edit_widget') ?? 'Edit Widget')}
({widgetType})
{#if widgetType === 'app'}
{$t('widget.app') ?? 'App'}
{#if filteredApps.length === 0}
{$t('common.no_results') ?? 'No apps found'}
{:else}
{#each filteredApps as app (app.id)}
{ appId = app.id; }} class="flex items-center gap-2 rounded-lg px-2.5 py-2 text-left text-sm transition-colors {appId === app.id ? 'bg-primary/10 text-primary ring-1 ring-primary/30' : 'text-foreground hover:bg-accent'}" > {#if app.icon && app.iconType === 'lucide'}
{:else if app.icon && app.iconType === 'url'}
{:else if app.icon && app.iconType === 'simple'}
{:else if app.icon && app.iconType === 'emoji'}
{app.icon}
{:else}
{/if}
{app.name}
{/each}
{/if}
{:else if widgetType === 'bookmark'}
URL
{$t('common.label') ?? 'Label'}
{$t('app.icon') ?? 'Icon'}
{$t('common.description') ?? 'Description'}
{:else if widgetType === 'note'}
{$t('widget.content') ?? 'Content'}
{$t('widget.format') ?? 'Format'}
Markdown
Plain Text
HTML
{:else if widgetType === 'embed'}
URL
{$t('widget.height') ?? 'Height'} ({embedHeight}px)
Sandbox
{:else if widgetType === 'status'}
{$t('common.label') ?? 'Label'}
{$t('widget.apps') ?? 'Apps'}
({ 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'}
{$t('widget.timezone') ?? 'Timezone'}
{$t('widget.style') ?? 'Style'}
Digital
Analog
24h
{$t('widget.show_weather') ?? 'Show Weather'}
{#if clockShowWeather}
Latitude
Longitude
{/if} {:else if widgetType === 'system_stats'}
Source URL
Source Type
Glances
Prometheus
Custom
Refresh ({sysStatsRefreshInterval}s)
{:else if widgetType === 'rss'}
Feed URL
Max Items ({rssMaxItems})
Show Summary
{:else if widgetType === 'calendar'}
iCal URLs
{#each calendarUrlsRaw as cal, i (i)}
{#if calendarUrlsRaw.length > 1}
removeCalendarUrl(i)} class="text-destructive hover:text-destructive/80">×
{/if}
{/each}
+ Add URL
Days Ahead ({calendarDaysAhead})
{:else if widgetType === 'markdown'}
{$t('widget.content') ?? 'Content'}
{:else if widgetType === 'metric'}
{$t('common.label') ?? 'Label'}
Source
Static
JSON Endpoint
Prometheus
{#if metricSource === 'static'}
Value
{:else if metricSource === 'json'}
URL
JSON Path
{:else if metricSource === 'prometheus'}
URL
PromQL Query
{/if}
Unit
Refresh ({metricRefreshInterval}s)
{:else if widgetType === 'link_group'}
Links
{#each linkGroupLinks as link, i (i)}
{#if linkGroupLinks.length > 1}
removeLinkGroupLink(i)} class="text-destructive hover:text-destructive/80">×
{/if}
{/each}
+ Add Link
Collapsible
{:else if widgetType === 'camera'}
Stream URL
Type
Image
MJPEG
HLS
Refresh ({cameraRefreshInterval}s)
Aspect Ratio
16:9
4:3
1:1
{:else if widgetType === 'integration'}
{$t('widget.app') ?? 'App'}
Select app...
{#each apps as app (app.id)}
{app.name}
{/each}
Endpoint ID
Refresh ({integrationRefreshInterval}s)
{/if}
{$t('common.cancel') ?? 'Cancel'}
{mode === 'create' ? ($t('common.add') ?? 'Add') : ($t('common.save') ?? 'Save')}