Align UI with web_template TDS v1.2 standards
- Replace lt-chip priority badges with lt-badge lt-badge-p[1-4] across DashboardView, TemplatesView (matches web_template sticky table pattern) - Add lt-theme-btn theme toggle to header-right; wire lt.theme.toggle() - Replace ASCII art empty state with lt-empty-state component in dashboard - Standardize tab wrapper lt-tabs → lt-tab-bar in Dashboard and TicketView - Add missing lt-keys-help modal to layout_footer (fixes ? key doing nothing) - Add lt-cmd-overlay command palette container + lt.cmdPalette.init() nav - Add .lt-timeline-action CSS rule (used in TicketView, was undefined) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -55,6 +55,63 @@
|
||||
<span aria-label="Application version">TINKER TICKETS — TDS v1.2</span>
|
||||
</footer>
|
||||
|
||||
<!-- ================================================================
|
||||
KEYBOARD SHORTCUTS HELP MODAL — opened by ? key or footer [?] hint
|
||||
================================================================ -->
|
||||
<div id="lt-keys-help" class="lt-modal-overlay" aria-hidden="true">
|
||||
<div class="lt-modal" role="dialog" aria-modal="true" aria-labelledby="keys-help-title">
|
||||
<div class="lt-modal-header">
|
||||
<span class="lt-modal-title" id="keys-help-title">Keyboard Shortcuts</span>
|
||||
<button type="button" class="lt-modal-close" data-modal-close aria-label="Close">✕</button>
|
||||
</div>
|
||||
<div class="lt-modal-body">
|
||||
<table class="lt-data-table" style="width:100%">
|
||||
<thead>
|
||||
<tr><th scope="col">Shortcut</th><th scope="col">Action</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>Ctrl / ⌘ + K</td><td>Focus search box</td></tr>
|
||||
<tr><td>Ctrl / ⌘ + E</td><td>Toggle edit mode (ticket page)</td></tr>
|
||||
<tr><td>Ctrl / ⌘ + S</td><td>Save changes (ticket page)</td></tr>
|
||||
<tr><td>j / ↓</td><td>Select next row</td></tr>
|
||||
<tr><td>k / ↑</td><td>Select previous row</td></tr>
|
||||
<tr><td>Enter</td><td>Open selected ticket</td></tr>
|
||||
<tr><td>n</td><td>New ticket</td></tr>
|
||||
<tr><td>1–4</td><td>Change ticket status (ticket page)</td></tr>
|
||||
<tr><td>c</td><td>Jump to comment box (ticket page)</td></tr>
|
||||
<tr><td>?</td><td>Show this help</td></tr>
|
||||
<tr><td>ESC</td><td>Close modal / cancel</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="lt-modal-footer">
|
||||
<button type="button" class="lt-btn" data-modal-close>Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ================================================================
|
||||
COMMAND PALETTE — Ctrl+K opens when no search input focused
|
||||
================================================================ -->
|
||||
<div id="lt-cmd-overlay" class="lt-cmd-overlay" role="dialog" aria-modal="true" aria-label="Command palette" aria-hidden="true">
|
||||
<div class="lt-cmd-palette" id="lt-cmd-palette">
|
||||
<div class="lt-cmd-input-wrap">
|
||||
<span class="lt-cmd-prompt">></span>
|
||||
<input id="lt-cmd-input" class="lt-cmd-input" type="text"
|
||||
placeholder="Search commands…" autocomplete="off"
|
||||
spellcheck="false" aria-label="Search commands">
|
||||
</div>
|
||||
<div class="lt-cmd-results" id="lt-cmd-results">
|
||||
<div class="lt-cmd-empty">Start typing to search…</div>
|
||||
</div>
|
||||
<div class="lt-cmd-footer">
|
||||
<span><kbd>↑</kbd><kbd>↓</kbd> Navigate</span>
|
||||
<span><kbd>Enter</kbd> Select</span>
|
||||
<span><kbd>Esc</kbd> Close</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- base.js + utils.js + globals already loaded in <head> via layout_header.php -->
|
||||
|
||||
<?php if (!empty($pageScripts)): ?>
|
||||
@@ -75,6 +132,27 @@
|
||||
<script nonce="<?= htmlspecialchars($nonce, ENT_QUOTES, 'UTF-8') ?>">
|
||||
if (window.lt) {
|
||||
lt.init({ bootName: 'TINKER TICKETS' });
|
||||
|
||||
// Theme toggle button
|
||||
var themeBtn = document.getElementById('lt-theme-btn');
|
||||
if (themeBtn) themeBtn.addEventListener('click', function() { lt.theme.toggle(); });
|
||||
|
||||
// Command palette — global navigation commands available on all pages
|
||||
lt.cmdPalette.init([
|
||||
{
|
||||
group: 'Navigation',
|
||||
items: [
|
||||
{ icon: '~', label: 'Dashboard', kbd: 'G D', action: function() { window.location.href = '/'; } },
|
||||
{ icon: '+', label: 'New Ticket', kbd: 'N', action: function() { window.location.href = '/ticket/create'; } },
|
||||
]
|
||||
},
|
||||
{
|
||||
group: 'Help',
|
||||
items: [
|
||||
{ icon: '?', label: 'Keyboard Shortcuts', kbd: '?', action: function() { lt.modal.open('lt-keys-help'); } },
|
||||
]
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
// Footer hint bar actions (keyboard help + settings — work on all pages)
|
||||
|
||||
Reference in New Issue
Block a user