diff --git a/server/app/main.py b/server/app/main.py index 46b2cc5..c9414fd 100644 --- a/server/app/main.py +++ b/server/app/main.py @@ -61,16 +61,16 @@ def api_albums(): @app.post("/api/config") def api_config_save( - immich_url: str = Form(""), - immich_api_key: str = Form(""), album_id: str = Form(""), order: str = Form("sequential"), refresh_interval_s: int = Form(3600), smart_crop_faces: bool = Form(True), ): + # Immich URL/API key are env-var only (IMMICH_URL/IMMICH_API_KEY, see + # docker-compose.yml.example) -- config.load() already applies them, + # and this handler doesn't touch cfg.immich_url/immich_api_key at all, + # so there's nothing here that could overwrite or clear them. cfg = config.load() - cfg.immich_url = immich_url.strip() - cfg.immich_api_key = immich_api_key.strip() if album_id != cfg.album_id: cfg.cursor = 0 # restart from the top of a newly selected album cfg.album_id = album_id diff --git a/server/app/templates/index.html b/server/app/templates/index.html index c6d6025..c470f0e 100644 --- a/server/app/templates/index.html +++ b/server/app/templates/index.html @@ -19,6 +19,8 @@ .status { margin-top: 16px; padding: 10px; border-radius: 4px; font-size: 14px; } .status.ok { background: #dcfce7; color: #166534; } .status.err { background: #fee2e2; color: #991b1b; } + .info-box { margin-top: 16px; padding: 10px; border-radius: 4px; font-size: 13px; background: #f3f4f6; color: #444; } + .info-box.warn { background: #fef9c3; color: #854d0e; } code { background: #f3f4f6; padding: 2px 5px; border-radius: 3px; } @@ -26,13 +28,17 @@

ESPresso Frame

Point your frame's "Tools Server" field at this server's host:port.

+ {% if cfg.immich_url %} +
Immich: {{ cfg.immich_url }} (API key configured). Set via + IMMICH_URL/IMMICH_API_KEY in docker-compose.yml -- see + docker-compose.yml.example.
+ {% else %} +
Immich isn't configured yet. Set IMMICH_URL and + IMMICH_API_KEY in docker-compose.yml (copy + docker-compose.yml.example) and restart the server.
+ {% endif %} +
- -