Fix template variable docs to match actual notifier output
All checks were successful
Validate / Hassfest (push) Successful in 3s
All checks were successful
Validate / Hassfest (push) Successful in 3s
Audit and fix all template variable references: - template_vars.py: Add missing fields (album_id, old_shared, new_shared, latitude, longitude, owner_id, people per asset) - _SAMPLE_CONTEXT: Use proper structured data matching build_asset_detail() output (id, owner_id, latitude, longitude, people per asset, playback_url for videos) - i18n: Fix all variable descriptions for accuracy, add missing fields, mark scheduler-dependent slots as "not yet implemented" - Variables modal: Add album_fields section for periodic_summary - Shared _ASSET_FIELDS and _ALBUM_FIELDS dicts in template_vars.py to keep scheduled/memory slots DRY Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -274,10 +274,10 @@
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{#if varsRef[showVarsFor].asset_fields}
|
||||
{#if varsRef[showVarsFor].asset_fields && typeof varsRef[showVarsFor].asset_fields === 'object'}
|
||||
<div class="mt-3 pt-3 border-t border-[var(--color-border)]">
|
||||
<p class="text-xs font-medium mb-1">{t('templateConfig.assetFields')}:</p>
|
||||
{#each Object.entries(varsRef[showVarsFor].asset_fields || {}) as [name, desc]}
|
||||
{#each Object.entries(varsRef[showVarsFor].asset_fields) as [name, desc]}
|
||||
<div class="flex items-start gap-2 text-sm">
|
||||
<code class="text-xs bg-[var(--color-muted)] px-1 py-0.5 rounded font-mono whitespace-nowrap">{'{{ asset.' + name + ' }}'}</code>
|
||||
<span class="text-xs text-[var(--color-muted-foreground)]">{t(`templateVars.asset_${name}`, desc as string)}</span>
|
||||
@@ -285,5 +285,16 @@
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
{#if varsRef[showVarsFor].album_fields && typeof varsRef[showVarsFor].album_fields === 'object'}
|
||||
<div class="mt-3 pt-3 border-t border-[var(--color-border)]">
|
||||
<p class="text-xs font-medium mb-1">{t('templateConfig.albumFields')}:</p>
|
||||
{#each Object.entries(varsRef[showVarsFor].album_fields) as [name, desc]}
|
||||
<div class="flex items-start gap-2 text-sm">
|
||||
<code class="text-xs bg-[var(--color-muted)] px-1 py-0.5 rounded font-mono whitespace-nowrap">{'{{ album.' + name + ' }}'}</code>
|
||||
<span class="text-xs text-[var(--color-muted-foreground)]">{t(`templateVars.album_${name}`, desc as string)}</span>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
</Modal>
|
||||
|
||||
Reference in New Issue
Block a user