From 3c3b9d0a614c721ae57350b1dea7fc0faec59292 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Fri, 20 Mar 2026 10:52:59 -0400 Subject: [PATCH] Integrate lt.time.ago() for dashboard timestamps, update README - Add data-ts attributes to table and card view date cells so JS can convert them to relative time ("2h ago") while keeping the full date in the title attribute for hover tooltips - Add initRelativeTimes() in dashboard.js using lt.time.ago(); runs on DOMContentLoaded and refreshes every 60s so times stay current - Fix table sort for date columns to read data-ts attribute instead of text content (which is now relative and not sortable as a date) - Update README: add base.css/base.js/utils.js to project structure, fix ascii-banner.js description, expand keyboard shortcuts table, add developer notes for lt.time and boot sequence behavior Co-Authored-By: Claude Sonnet 4.6 --- README.md | 16 +++++++++++++--- assets/js/dashboard.js | 26 +++++++++++++++++++++++--- views/DashboardView.php | 6 +++--- 3 files changed, 39 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 02fb2c9..baff03f 100644 --- a/README.md +++ b/README.md @@ -126,6 +126,11 @@ Access all admin pages via the **Admin dropdown** in the dashboard header. | `Ctrl/Cmd + E` | Toggle edit mode (ticket page) | | `Ctrl/Cmd + S` | Save changes (ticket page) | | `Ctrl/Cmd + K` | Focus search box (dashboard) | +| `N` | New ticket (dashboard) | +| `J` / `K` | Next / previous row (dashboard table) | +| `Enter` | Open selected ticket (dashboard) | +| `G` then `D` | Go to dashboard | +| `1`–`4` | Quick status change (ticket page) | | `ESC` | Cancel edit / close modal | | `?` | Show keyboard shortcuts help | @@ -242,17 +247,20 @@ tinker_tickets/ │ └── upload_attachment.php # GET/POST: List or upload attachments ├── assets/ │ ├── css/ +│ │ ├── base.css # LotusGuild Terminal Design System (symlinked from web_template) │ │ ├── dashboard.css # Dashboard + terminal styling │ │ └── ticket.css # Ticket view styling │ ├── js/ │ │ ├── advanced-search.js # Advanced search modal -│ │ ├── ascii-banner.js # ASCII art banner +│ │ ├── ascii-banner.js # ASCII art banner (rendered in boot overlay on first visit) +│ │ ├── base.js # LotusGuild JS utilities — window.lt (symlinked from web_template) │ │ ├── dashboard.js # Dashboard + bulk actions + kanban + sidebar -│ │ ├── keyboard-shortcuts.js # Keyboard shortcuts +│ │ ├── keyboard-shortcuts.js # Keyboard shortcuts (uses lt.keys) │ │ ├── markdown.js # Markdown rendering + ticket linking (XSS-safe) │ │ ├── settings.js # User preferences │ │ ├── ticket.js # Ticket + comments + visibility -│ │ └── toast.js # Toast notifications +│ │ ├── toast.js # Backwards-compat shim → delegates to lt.toast +│ │ └── utils.js # escapeHtml (→ lt.escHtml) + getTicketIdFromUrl │ └── images/ │ └── favicon.png ├── config/ @@ -387,6 +395,8 @@ Key conventions and gotchas for working with this codebase: 15. **CSP nonces**: All inline `