Add MDI icon picker to all entity types
Some checks failed
Validate / Hassfest (push) Has been cancelled
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>
This commit is contained in:
@@ -33,6 +33,7 @@ class ImmichServer(SQLModel, table=True):
|
||||
url: str
|
||||
api_key: str
|
||||
external_domain: str | None = None
|
||||
icon: str = Field(default="") # MDI icon name (e.g. "mdiServer")
|
||||
created_at: datetime = Field(default_factory=_utcnow)
|
||||
|
||||
|
||||
@@ -45,6 +46,7 @@ class TelegramBot(SQLModel, table=True):
|
||||
user_id: int = Field(foreign_key="user.id")
|
||||
name: str # User-given display name
|
||||
token: str # Bot API token
|
||||
icon: str = Field(default="") # MDI icon name
|
||||
bot_username: str = Field(default="") # @username from getMe
|
||||
bot_id: int = Field(default=0) # Numeric bot ID from getMe
|
||||
created_at: datetime = Field(default_factory=_utcnow)
|
||||
@@ -58,6 +60,7 @@ class TrackingConfig(SQLModel, table=True):
|
||||
id: int | None = Field(default=None, primary_key=True)
|
||||
user_id: int = Field(foreign_key="user.id")
|
||||
name: str
|
||||
icon: str = Field(default="")
|
||||
|
||||
# Event-driven tracking
|
||||
track_assets_added: bool = Field(default=True)
|
||||
@@ -112,6 +115,7 @@ class TemplateConfig(SQLModel, table=True):
|
||||
id: int | None = Field(default=None, primary_key=True)
|
||||
user_id: int = Field(foreign_key="user.id")
|
||||
name: str # e.g. "Default EN", "Default RU"
|
||||
icon: str = Field(default="")
|
||||
|
||||
# Event messages
|
||||
message_assets_added: str = Field(
|
||||
@@ -172,6 +176,7 @@ class NotificationTarget(SQLModel, table=True):
|
||||
user_id: int = Field(foreign_key="user.id")
|
||||
type: str # "telegram" or "webhook"
|
||||
name: str
|
||||
icon: str = Field(default="")
|
||||
config: dict[str, Any] = Field(default_factory=dict, sa_column=Column(JSON))
|
||||
tracking_config_id: int | None = Field(default=None, foreign_key="tracking_config.id")
|
||||
template_config_id: int | None = Field(default=None, foreign_key="template_config.id")
|
||||
@@ -187,6 +192,7 @@ class AlbumTracker(SQLModel, table=True):
|
||||
user_id: int = Field(foreign_key="user.id")
|
||||
server_id: int = Field(foreign_key="immich_server.id")
|
||||
name: str
|
||||
icon: str = Field(default="")
|
||||
album_ids: list[str] = Field(default_factory=list, sa_column=Column(JSON))
|
||||
target_ids: list[int] = Field(default_factory=list, sa_column=Column(JSON))
|
||||
scan_interval: int = Field(default=60)
|
||||
|
||||
Reference in New Issue
Block a user