diff --git a/views/TicketView.php b/views/TicketView.php index 888018f..381cba0 100644 --- a/views/TicketView.php +++ b/views/TicketView.php @@ -120,6 +120,16 @@ window.ticketData = { }; window.ticketData.id = window.ticketData.ticket_id; if (window.lt) lt.keys.initDefaults(); +// Track recently viewed tickets for command palette +(function() { + try { + var tid = String(window.ticketData.ticket_id); + var key = 'lt_recent_tickets'; + var r = JSON.parse(localStorage.getItem(key) || '[]'); + r = [tid].concat(r.filter(function(x){ return x !== tid; })).slice(0, 5); + localStorage.setItem(key, JSON.stringify(r)); + } catch(_) {} +})(); JS; include __DIR__ . '/layout_header.php'; diff --git a/views/layout_header.php b/views/layout_header.php index 07334dc..bfa2036 100644 --- a/views/layout_header.php +++ b/views/layout_header.php @@ -206,4 +206,60 @@ $_lt_assetVer = $GLOBALS['config']['ASSET_VERSION'] ?? '20260329'; + +
+ +