feat(ext): static 'esc to cancel' subtitle in fullscreen form headers
All seven type forms plus the type-selection screen now show a small
'esc to cancel' subtitle under the heading when rendered in the
fullscreen vault tab (isInTab() === true). The subtitle is suppressed
in the popup, where esc has the more general meaning of closing the
popup. .form-subtitle class is shared between popup and vault
stylesheets so future hooks can reuse it.
Dynamic dirty-state ('unsaved · esc to cancel') wiring is deferred to
Phase 3 (unsaved-changes guard).
Plan 2026-04-30 fullscreen UX phase 1 task 8.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -54,12 +54,13 @@ export function renderItemForm(app: HTMLElement, mode: 'add' | 'edit'): void {
|
||||
function renderTypeSelection(app: HTMLElement): void {
|
||||
app.innerHTML = `
|
||||
<div class="pad">
|
||||
<div style="display:flex; align-items:center; gap:12px; margin-bottom:16px;">
|
||||
<div style="display:flex; align-items:center; gap:12px;">
|
||||
<button class="btn" id="back-btn">← back</button>
|
||||
<h3 style="margin:0;">new item</h3>
|
||||
<span style="flex:1;"></span>
|
||||
${isInTab() ? '' : '<button class="btn" id="popout-btn" title="Open in tab">⤴</button>'}
|
||||
</div>
|
||||
${isInTab() ? '<div class="form-subtitle">esc to cancel</div>' : '<div style="margin-bottom:16px;"></div>'}
|
||||
<div class="type-select-list">
|
||||
${TYPE_OPTIONS.map((opt) => `
|
||||
<button class="type-select-row" data-type="${opt.type}">
|
||||
|
||||
Reference in New Issue
Block a user