From ec9fafc36227ca7c2ce5fcc3ff96776bfeddf5f5 Mon Sep 17 00:00:00 2001 From: pablorevilla-meshtastic Date: Wed, 28 Oct 2026 10:10:17 -0700 Subject: [PATCH] change icon on light mode --- meshview/static/api-chat.html | 6 +++++- meshview/static/api.html | 6 +++++- meshview/static/heatmap.html | 6 +++++- meshview/static/kiosk.html | 6 +++++- meshview/static/theme.js | 1 - meshview/templates/base.html | 2 +- meshview/templates/theme-styles.html | 4 ++++ 7 files changed, 25 insertions(+), 6 deletions(-) diff --git a/meshview/static/api-chat.html b/meshview/static/api-chat.html index d00af2b..26747ec 100644 --- a/meshview/static/api-chat.html +++ b/meshview/static/api-chat.html @@ -63,6 +63,10 @@ body { background:var(--mesh-page); color:var(--mesh-text); } .mesh-theme-toggle { flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border:1px solid #ffffff70; border-radius:6px; background:transparent; color:white; font:22px/1 system-ui,sans-serif; cursor:pointer; } .mesh-header .mesh-theme-toggle { margin-left:auto; } .mesh-theme-toggle:hover { background:#ffffff20; } +.mesh-theme-toggle .theme-icon { width:22px; height:22px; flex-shrink:0; } +.mesh-theme-toggle .theme-icon--sun { display:none; } +[data-bs-theme="dark"] .mesh-theme-toggle .theme-icon--sun { display:block; } +[data-bs-theme="dark"] .mesh-theme-toggle .theme-icon--moon { display:none; } .mesh-theme-toggle:focus-visible { outline:2px solid white; outline-offset:3px; } @media(max-width:1000px) { .mesh-header .mesh-menu-toggle { margin-left:auto; } .mesh-header .mesh-theme-toggle { margin-left:12px; } .mesh-header #site-menu { order:4; } } [data-bs-theme="dark"] :is(.chat-status,.chat-details,.chat-channel,.chat-status[data-state="paused"],.chat-status[data-state="loading"],.good-x) { background:var(--mesh-soft); color:var(--mesh-primary); border-color:var(--mesh-border); } @@ -88,7 +92,7 @@ body { background:var(--mesh-page); color:var(--mesh-text); } -
+

Chat messages API

Chat uses GET /api/packets?portnum=1. There is no separate /api/chat endpoint.

Use limit and since for incremental polling. Direct port-1 text messages are returned as <redacted>.

diff --git a/meshview/static/api.html b/meshview/static/api.html index c8a5b53..26054ef 100644 --- a/meshview/static/api.html +++ b/meshview/static/api.html @@ -87,6 +87,10 @@ body { background:var(--mesh-page); color:var(--mesh-text); } .mesh-theme-toggle { flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border:1px solid #ffffff70; border-radius:6px; background:transparent; color:white; font:22px/1 system-ui,sans-serif; cursor:pointer; } .mesh-header .mesh-theme-toggle { margin-left:auto; } .mesh-theme-toggle:hover { background:#ffffff20; } +.mesh-theme-toggle .theme-icon { width:22px; height:22px; flex-shrink:0; } +.mesh-theme-toggle .theme-icon--sun { display:none; } +[data-bs-theme="dark"] .mesh-theme-toggle .theme-icon--sun { display:block; } +[data-bs-theme="dark"] .mesh-theme-toggle .theme-icon--moon { display:none; } .mesh-theme-toggle:focus-visible { outline:2px solid white; outline-offset:3px; } @media(max-width:1000px) { .mesh-header .mesh-menu-toggle { margin-left:auto; } .mesh-header .mesh-theme-toggle { margin-left:12px; } .mesh-header #site-menu { order:4; } } [data-bs-theme="dark"] :is(.chat-status,.chat-details,.chat-channel,.chat-status[data-state="paused"],.chat-status[data-state="loading"],.good-x) { background:var(--mesh-soft); color:var(--mesh-primary); border-color:var(--mesh-border); } @@ -111,7 +115,7 @@ body { background:var(--mesh-page); color:var(--mesh-text); } -
MeshviewAPI referenceHome ↗
+
MeshviewAPI referenceHome ↗
Browse all 16 endpoints

API Documentation

diff --git a/meshview/static/heatmap.html b/meshview/static/heatmap.html index 75d9fe0..a6de43b 100644 --- a/meshview/static/heatmap.html +++ b/meshview/static/heatmap.html @@ -70,6 +70,10 @@ body { background:var(--mesh-page); color:var(--mesh-text); } .mesh-theme-toggle { flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border:1px solid #ffffff70; border-radius:6px; background:transparent; color:white; font:22px/1 system-ui,sans-serif; cursor:pointer; } .mesh-header .mesh-theme-toggle { margin-left:auto; } .mesh-theme-toggle:hover { background:#ffffff20; } +.mesh-theme-toggle .theme-icon { width:22px; height:22px; flex-shrink:0; } +.mesh-theme-toggle .theme-icon--sun { display:none; } +[data-bs-theme="dark"] .mesh-theme-toggle .theme-icon--sun { display:block; } +[data-bs-theme="dark"] .mesh-theme-toggle .theme-icon--moon { display:none; } .mesh-theme-toggle:focus-visible { outline:2px solid white; outline-offset:3px; } @media(max-width:1000px) { .mesh-header .mesh-menu-toggle { margin-left:auto; } .mesh-header .mesh-theme-toggle { margin-left:12px; } .mesh-header #site-menu { order:4; } } [data-bs-theme="dark"] :is(.chat-status,.chat-details,.chat-channel,.chat-status[data-state="paused"],.chat-status[data-state="loading"],.good-x) { background:var(--mesh-soft); color:var(--mesh-primary); border-color:var(--mesh-border); } @@ -95,7 +99,7 @@ body { background:var(--mesh-page); color:var(--mesh-text); } - +
diff --git a/meshview/static/kiosk.html b/meshview/static/kiosk.html index 729d741..1912a39 100644 --- a/meshview/static/kiosk.html +++ b/meshview/static/kiosk.html @@ -84,6 +84,10 @@ body { background:var(--mesh-page); color:var(--mesh-text); } .mesh-theme-toggle { flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border:1px solid #ffffff70; border-radius:6px; background:transparent; color:white; font:22px/1 system-ui,sans-serif; cursor:pointer; } .mesh-header .mesh-theme-toggle { margin-left:auto; } .mesh-theme-toggle:hover { background:#ffffff20; } +.mesh-theme-toggle .theme-icon { width:22px; height:22px; flex-shrink:0; } +.mesh-theme-toggle .theme-icon--sun { display:none; } +[data-bs-theme="dark"] .mesh-theme-toggle .theme-icon--sun { display:block; } +[data-bs-theme="dark"] .mesh-theme-toggle .theme-icon--moon { display:none; } .mesh-theme-toggle:focus-visible { outline:2px solid white; outline-offset:3px; } @media(max-width:1000px) { .mesh-header .mesh-menu-toggle { margin-left:auto; } .mesh-header .mesh-theme-toggle { margin-left:12px; } .mesh-header #site-menu { order:4; } } [data-bs-theme="dark"] :is(.chat-status,.chat-details,.chat-channel,.chat-status[data-state="paused"],.chat-status[data-state="loading"],.good-x) { background:var(--mesh-soft); color:var(--mesh-primary); border-color:var(--mesh-border); } @@ -109,7 +113,7 @@ body { background:var(--mesh-page); color:var(--mesh-text); } - +
diff --git a/meshview/static/theme.js b/meshview/static/theme.js index 8fd5c3d..0dc044a 100644 --- a/meshview/static/theme.js +++ b/meshview/static/theme.js @@ -57,7 +57,6 @@ function updateButton() { document.querySelectorAll('[data-theme-toggle]').forEach(button => { const dark = root.dataset.bsTheme === 'dark'; - button.textContent = dark ? '☀' : '☾'; button.setAttribute('aria-label',dark ? 'Switch to day mode' : 'Switch to night mode'); button.setAttribute('aria-pressed',String(dark)); button.title = dark ? 'Day mode' : 'Night mode'; diff --git a/meshview/templates/base.html b/meshview/templates/base.html index 9d55da7..7e8eef2 100644 --- a/meshview/templates/base.html +++ b/meshview/templates/base.html @@ -166,7 +166,7 @@ input[type="checkbox"],input[type="radio"] { accent-color:var(--mesh-primary); } Meshview - +
diff --git a/meshview/templates/theme-styles.html b/meshview/templates/theme-styles.html index 69391da..607de3e 100644 --- a/meshview/templates/theme-styles.html +++ b/meshview/templates/theme-styles.html @@ -47,6 +47,10 @@ body { background:var(--mesh-page); color:var(--mesh-text); } .mesh-theme-toggle { flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border:1px solid #ffffff70; border-radius:6px; background:transparent; color:white; font:22px/1 system-ui,sans-serif; cursor:pointer; } .mesh-header .mesh-theme-toggle { margin-left:auto; } .mesh-theme-toggle:hover { background:#ffffff20; } +.mesh-theme-toggle .theme-icon { width:22px; height:22px; flex-shrink:0; } +.mesh-theme-toggle .theme-icon--sun { display:none; } +[data-bs-theme="dark"] .mesh-theme-toggle .theme-icon--sun { display:block; } +[data-bs-theme="dark"] .mesh-theme-toggle .theme-icon--moon { display:none; } .mesh-theme-toggle:focus-visible { outline:2px solid white; outline-offset:3px; } @media(max-width:1000px) { .mesh-header .mesh-menu-toggle { margin-left:auto; } .mesh-header .mesh-theme-toggle { margin-left:12px; } .mesh-header #site-menu { order:4; } } [data-bs-theme="dark"] :is(.chat-status,.chat-details,.chat-channel,.chat-status[data-state="paused"],.chat-status[data-state="loading"],.good-x) { background:var(--mesh-soft); color:var(--mesh-primary); border-color:var(--mesh-border); }