diff --git a/.gitignore b/.gitignore index 44d786e..1472f4a 100644 --- a/.gitignore +++ b/.gitignore @@ -81,4 +81,5 @@ Thumbs.db # ============================================ # Miscellaneous # ============================================ -.claude/ \ No newline at end of file +.claude/ +technotes/prompt-dms.md diff --git a/app/static/css/style.css b/app/static/css/style.css index 4b3b34b..1ab1720 100644 --- a/app/static/css/style.css +++ b/app/static/css/style.css @@ -151,6 +151,41 @@ main { background: #555; } +/* Channel selector and date selector - larger font size */ +#channelSelector, +#dateSelector { + font-size: 1rem; +} + +/* Offcanvas menu styling */ +.offcanvas { + width: 280px !important; +} + +.offcanvas-body .list-group-item { + padding: 1rem 0.75rem; + border: none; + border-bottom: 1px solid #dee2e6; + font-size: 1rem; +} + +.offcanvas-body .list-group-item:hover { + background-color: #f8f9fa; +} + +.offcanvas-body .list-group-item i { + color: #0d6efd; + min-width: 1.5rem; +} + +.offcanvas-body .list-group-item span { + font-weight: 500; +} + +.offcanvas-body .list-group-item .form-select { + font-size: 1rem; +} + /* Responsive Design */ @media (max-width: 768px) { .message { @@ -176,22 +211,15 @@ main { font-size: 0.7rem; } - /* Navbar: Hide "Refresh" text on mobile, show only icon */ - #refreshBtn .btn-text { - display: none; - } - /* Navbar: Reduce gap between elements */ .navbar .d-flex { gap: 0.25rem !important; } - /* Navbar: Smaller selectors on mobile */ - #channelSelector, - #dateSelector { - min-width: 80px !important; - font-size: 0.75rem; - padding: 0.25rem 0.5rem; + /* Navbar: Channel selector on mobile */ + #channelSelector { + min-width: 100px !important; + font-size: 0.9rem; } /* Navbar: Smaller buttons */ @@ -216,7 +244,7 @@ main { } /* Modal: Compact channel list */ - .list-group-item { + .modal .list-group-item { padding: 0.5rem; } diff --git a/app/static/js/app.js b/app/static/js/app.js index 18c4600..f660f18 100644 --- a/app/static/js/app.js +++ b/app/static/js/app.js @@ -74,12 +74,24 @@ function setupEventListeners() { document.getElementById('refreshBtn').addEventListener('click', async function() { await loadMessages(); await checkForUpdates(); + + // Close offcanvas menu after refresh + const offcanvas = bootstrap.Offcanvas.getInstance(document.getElementById('mainMenu')); + if (offcanvas) { + offcanvas.hide(); + } }); // Date selector (archive selection) document.getElementById('dateSelector').addEventListener('change', function(e) { currentArchiveDate = e.target.value || null; loadMessages(); + + // Close offcanvas menu after selecting date + const offcanvas = bootstrap.Offcanvas.getInstance(document.getElementById('mainMenu')); + if (offcanvas) { + offcanvas.hide(); + } }); // Cleanup contacts button @@ -536,7 +548,7 @@ function updateCharCounter() { // Count UTF-8 bytes, not Unicode characters const encoder = new TextEncoder(); const byteLength = encoder.encode(input.value).length; - const maxBytes = 200; + const maxBytes = 140; counter.textContent = `${byteLength} / ${maxBytes}`; @@ -1045,9 +1057,20 @@ async function shareChannel(index) { /** * Copy channel key to clipboard */ -function copyChannelKey() { +async function copyChannelKey() { const input = document.getElementById('shareChannelKey'); - input.select(); - document.execCommand('copy'); - showNotification('Channel key copied to clipboard!', 'success'); + try { + // Use modern Clipboard API + await navigator.clipboard.writeText(input.value); + showNotification('Channel key copied to clipboard!', 'success'); + } catch (error) { + // Fallback for older browsers + input.select(); + try { + document.execCommand('copy'); + showNotification('Channel key copied to clipboard!', 'success'); + } catch (fallbackError) { + showNotification('Failed to copy to clipboard', 'danger'); + } + } } diff --git a/app/templates/base.html b/app/templates/base.html index 8bc4cac..08ea4ba 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -29,34 +29,58 @@