diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b3c57b8..f53c3b3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,9 +11,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - A long error in Admin now stays on screen long enough to read, up to fifteen seconds. + - Backup placeholder no longer moves or reshuffles when a card is hovered or tapped. +- The App, Widget and Folder tiles under Add New show their names instead of + their internal keys. + ## [1.6.0] - 2026-08-13 ### Added diff --git a/ui/js/admin.js b/ui/js/admin.js index 627476a5..977e4073 100644 --- a/ui/js/admin.js +++ b/ui/js/admin.js @@ -596,7 +596,8 @@ const TYPE_ICONS = { folder: '', }; -const TYPE_LABELS = { app: t('type.app'), widget: t('type.widget'), folder: t('type.folder') }; +/* Read at draw time. The catalog is not loaded when this module evaluates. */ +const typeLabels = () => ({ app: t('type.app'), widget: t('type.widget'), folder: t('type.folder') }); function buildAddNewCard() { const grp = document.createElement('div'); @@ -606,20 +607,22 @@ function buildAddNewCard() { setHtml(row, html`${t('type.addNew')}`); const grpTiles = document.createElement('div'); grpTiles.className = 'tile-grp'; - ['app', 'widget', 'folder'].forEach(t => { + const labels = typeLabels(); + ['app', 'widget', 'folder'].forEach(kind => { + const label = labels[kind]; const b = document.createElement('button'); b.type = 'button'; - b.className = 'tile-opt' + (t === state.ctype ? ' on' : ''); - b.dataset.ctype = t; - b.setAttribute('aria-pressed', String(t === state.ctype)); - b.setAttribute('aria-label', 'Add ' + TYPE_LABELS[t]); + b.className = 'tile-opt' + (kind === state.ctype ? ' on' : ''); + b.dataset.ctype = kind; + b.setAttribute('aria-pressed', String(kind === state.ctype)); + b.setAttribute('aria-label', t('type.addNew') + ': ' + label); setHtml( b, - html`${TYPE_LABELS[t]}`, + html`${label}`, ); b.onclick = () => { - if (state.ctype === t) return; - state.ctype = t; + if (state.ctype === kind) return; + state.ctype = kind; _renderEditBody(); }; grpTiles.appendChild(b);