Some checks failed
Validate / Hassfest (push) Has been cancelled
- Install @mdi/js (~7000 Material Design Icons) - IconPicker component: dropdown with search, popular icons grid, clear option. Stores icon name as string (e.g. "mdiCamera") - MdiIcon component: renders SVG from icon name - Backend: add `icon` field to ImmichServer, TelegramBot, TrackingConfig, TemplateConfig, NotificationTarget, AlbumTracker - All 6 entity pages: icon picker next to name input in create/edit forms, icon displayed on entity cards Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
14 lines
368 B
Svelte
14 lines
368 B
Svelte
<script lang="ts">
|
|
import * as mdi from '@mdi/js';
|
|
|
|
let { name = '', size = 18 } = $props<{ name: string; size?: number }>();
|
|
|
|
function getPath(iconName: string): string {
|
|
return (mdi as any)[iconName] || '';
|
|
}
|
|
</script>
|
|
|
|
{#if name && getPath(name)}
|
|
<svg viewBox="0 0 24 24" width={size} height={size} fill="currentColor"><path d={getPath(name)} /></svg>
|
|
{/if}
|