Files
haos-hacs-immich-album-watcher/frontend/src/lib/components/MdiIcon.svelte
alexei.dolgolyov 5a0b0b78f6
Some checks failed
Validate / Hassfest (push) Has been cancelled
Add MDI icon picker to all entity types
- 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>
2026-03-19 18:01:22 +03:00

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}