Move preview button to per-slot in edit form, remove card dropdown
All checks were successful
Validate / Hassfest (push) Successful in 3s
All checks were successful
Validate / Hassfest (push) Successful in 3s
- Preview button always visible next to Variables for each template slot
- Remove \n\n prefix from video_warning default value
- Use conditional {% if video_warning %} with blank line in templates
- Fix all .jinja2 files and inline defaults to match
- Add SVG favicon (camera + notification dot)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -67,7 +67,7 @@ _SAMPLE_CONTEXT = {
|
||||
"removed_assets": ["asset-id-1", "asset-id-2"],
|
||||
"people": ["Alice", "Bob"],
|
||||
"shared": True,
|
||||
"video_warning": "\n\n⚠️ Note: Videos may not be sent due to Telegram's 50 MB file size limit.",
|
||||
"video_warning": "⚠️ Note: Videos may not be sent due to Telegram's 50 MB file size limit.",
|
||||
# Rename fields (always present, empty for non-rename events)
|
||||
"old_name": "Old Album",
|
||||
"new_name": "New Album",
|
||||
|
||||
@@ -136,7 +136,7 @@ class TemplateConfig(SQLModel, table=True):
|
||||
# Settings
|
||||
date_format: str = Field(default="%d.%m.%Y, %H:%M UTC")
|
||||
video_warning: str = Field(
|
||||
default="\n\n⚠️ Note: Videos may not be sent due to Telegram's 50 MB file size limit."
|
||||
default="⚠️ Note: Videos may not be sent due to Telegram's 50 MB file size limit."
|
||||
)
|
||||
|
||||
created_at: datetime = Field(default_factory=_utcnow)
|
||||
@@ -204,7 +204,7 @@ _INLINE_TEMPLATES_REMOVED = {
|
||||
'{%- if asset.is_favorite %} ❤️{% endif %}\n'
|
||||
'{%- endfor %}'
|
||||
'{%- endif %}'
|
||||
'{{ video_warning }}'
|
||||
'{%- if video_warning %}\n\n{{ video_warning }}{%- endif %}'
|
||||
),
|
||||
|
||||
"message_assets_removed": '🗑️ {{ removed_count }} photo(s) removed from album "{{ album_name }}".',
|
||||
@@ -254,7 +254,7 @@ DEFAULT_TEMPLATE_RU = {
|
||||
'{%- if asset.is_favorite %} ❤️{% endif %}\n'
|
||||
'{%- endfor %}'
|
||||
'{%- endif %}'
|
||||
'{{ video_warning }}'
|
||||
'{%- if video_warning %}\n\n{{ video_warning }}{%- endif %}'
|
||||
),
|
||||
|
||||
"message_assets_removed": '🗑️ {{ removed_count }} фото удалено из альбома "{{ album_name }}".',
|
||||
|
||||
@@ -9,4 +9,7 @@
|
||||
{%- if asset.is_favorite %} ❤️{% endif %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{%- if video_warning %}
|
||||
|
||||
{{ video_warning }}
|
||||
{%- endif %}
|
||||
|
||||
@@ -9,4 +9,7 @@
|
||||
{%- if asset.is_favorite %} ❤️{% endif %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{%- if video_warning %}
|
||||
|
||||
{{ video_warning }}
|
||||
{%- endif %}
|
||||
|
||||
Reference in New Issue
Block a user