Move default templates to .jinja2 files + add live preview + update CLAUDE.md
Some checks failed
Validate / Hassfest (push) Has been cancelled
Some checks failed
Validate / Hassfest (push) Has been cancelled
Templates:
- Default EN/RU templates moved from inline Python strings to
14 .jinja2 files in templates/{en,ru}/ directory
- Properly formatted with readable indentation and Jinja2
whitespace control ({%- -%})
- load_default_templates(locale) loads from files on first access
- Seed function uses file loader instead of inline dicts
Preview:
- New POST /api/template-configs/preview-raw endpoint: renders
arbitrary Jinja2 text with sample data (for live editing preview)
- Route ordering fixed: /variables before /{config_id}
CLAUDE.md:
- Added Frontend Architecture Notes (i18n, Svelte 5 runes, auth
flow, Tailwind v4 quirks)
- Added Backend Architecture Notes (SQLAlchemy+aiohttp greenlet
issue, SandboxedEnvironment import, system-owned entities,
FastAPI route ordering, __pycache__)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
🗑️ Album "{{ album_name }}" was deleted.
|
||||
@@ -0,0 +1 @@
|
||||
✏️ Album "{{ old_name }}" renamed to "{{ new_name }}".
|
||||
@@ -0,0 +1,12 @@
|
||||
📷 {{ added_count }} new photo(s) added to album "{{ album_name }}".
|
||||
{%- if people %}
|
||||
👤 {{ people | join(", ") }}
|
||||
{%- endif %}
|
||||
{%- if added_assets %}
|
||||
{%- for asset in added_assets %}
|
||||
• {%- if asset.type == "VIDEO" %} 🎬{% else %} 🖼️{% endif %} {{ asset.filename }}
|
||||
{%- if asset.city %} 📍 {{ asset.city }}{% if asset.country %}, {{ asset.country }}{% endif %}{% endif %}
|
||||
{%- if asset.is_favorite %} ❤️{% endif %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{{ video_warning }}
|
||||
@@ -0,0 +1 @@
|
||||
🗑️ {{ removed_count }} photo(s) removed from album "{{ album_name }}".
|
||||
@@ -0,0 +1,4 @@
|
||||
📅 On this day:
|
||||
{%- for asset in assets %}
|
||||
• {%- if asset.type == "VIDEO" %} 🎬{% else %} 🖼️{% endif %} {{ asset.filename }} ({{ asset.created_at[:4] }})
|
||||
{%- endfor %}
|
||||
@@ -0,0 +1,5 @@
|
||||
📋 Tracked Albums Summary ({{ albums | length }} albums):
|
||||
{%- for album in albums %}
|
||||
• {{ album.name }}: {{ album.asset_count }} assets
|
||||
{%- if album.url %} — {{ album.url }}{% endif %}
|
||||
{%- endfor %}
|
||||
@@ -0,0 +1,4 @@
|
||||
📸 Photos from "{{ album_name }}":
|
||||
{%- for asset in assets %}
|
||||
• {%- if asset.type == "VIDEO" %} 🎬{% else %} 🖼️{% endif %} {{ asset.filename }}
|
||||
{%- endfor %}
|
||||
Reference in New Issue
Block a user