fix(meshcore): restyle to strip layout, fix map tiles

Replaced inner-sidebar layout (which collided with the generic app
sidebar) with a Meshtastic-style top connection strip + body row.
Contacts/nodes panel sits left of the tabbed content area, matching
the established pattern. Map now uses Settings.createTileLayer() with
a dark CartoDB fallback instead of plain OSM light tiles.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
James Smith
2026-05-13 10:23:31 +01:00
parent c4d6d50687
commit 7940728b30
3 changed files with 334 additions and 169 deletions
+193 -52
View File
@@ -1,58 +1,95 @@
/* Meshcore mode — scoped styles */
/* Override the shared mesh-visuals-container column layout */
/* ── Container overrides ── */
#meshcoreVisuals {
flex-direction: row;
flex-direction: column;
padding: 0;
gap: 0;
}
#meshcoreMode {
display: flex;
flex-direction: row;
flex-direction: column;
flex: 1;
min-height: 0;
overflow: hidden;
gap: 0;
}
/* ── Sidebar ── */
.meshcore-sidebar {
width: 220px;
min-width: 220px;
background: var(--bg-card);
border-right: 1px solid var(--border-color);
/* ── Connection strip ── */
.meshcore-strip {
display: flex;
flex-direction: column;
overflow-y: auto;
flex-shrink: 0;
}
.meshcore-sidebar-section {
padding: 10px;
align-items: center;
gap: 8px;
padding: 6px 12px;
background: var(--bg-card);
border-bottom: 1px solid var(--border-color);
flex-shrink: 0;
flex-wrap: wrap;
}
.meshcore-sidebar-section h4 {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.08em;
.meshcore-strip-group {
display: flex;
align-items: center;
gap: 6px;
}
.meshcore-strip-divider {
width: 1px;
height: 20px;
background: var(--border-color);
margin: 0 4px;
}
.meshcore-strip-status-text {
font-size: 12px;
color: var(--text-muted);
margin: 0 0 8px;
}
/* ── Connection panel ── */
.meshcore-strip-select {
background: var(--bg-input);
border: 1px solid var(--border-color);
color: var(--text-primary);
padding: 4px 6px;
font-size: 12px;
border-radius: 3px;
}
.meshcore-strip-input {
background: var(--bg-input);
border: 1px solid var(--border-color);
color: var(--text-primary);
padding: 4px 6px;
font-size: 12px;
border-radius: 3px;
font-family: var(--font-mono);
}
.meshcore-strip-btn {
padding: 4px 10px;
font-size: 12px;
border-radius: 3px;
cursor: pointer;
border: 1px solid var(--border-color);
background: var(--bg-input);
color: var(--text-primary);
transition: background 0.15s;
}
.meshcore-strip-btn:hover { opacity: 0.85; }
.meshcore-strip-btn.connect { background: var(--accent-cyan); color: #000; border-color: var(--accent-cyan); }
.meshcore-strip-btn.disconnect { border-color: #f44336; color: #f44336; }
.meshcore-strip-btn:disabled { opacity: 0.4; cursor: not-allowed; }
/* Transport tabs in strip */
.meshcore-transport-tabs {
display: flex;
gap: 4px;
margin-bottom: 8px;
gap: 2px;
}
.meshcore-transport-tab {
flex: 1;
padding: 4px 0;
padding: 3px 8px;
font-size: 11px;
text-align: center;
background: var(--bg-input);
border: 1px solid var(--border-color);
border-radius: 3px;
@@ -67,23 +104,84 @@
border-color: var(--accent-cyan);
}
/* ── Status indicator ── */
/* Strip stats */
.meshcore-strip-stat {
display: flex;
flex-direction: column;
align-items: center;
min-width: 40px;
}
.meshcore-strip-value {
font-size: 14px;
font-weight: 600;
color: var(--accent-cyan);
font-family: var(--font-mono);
line-height: 1;
}
.meshcore-strip-label {
font-size: 9px;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-muted);
}
/* ── Status dot ── */
.meshcore-status-dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
margin-right: 6px;
background: var(--text-muted);
flex-shrink: 0;
}
.meshcore-status-dot.connected { background: #4caf50; box-shadow: 0 0 5px #4caf50; }
.meshcore-status-dot.connecting { background: #ff9800; animation: meshcore-pulse 1s infinite; }
.meshcore-status-dot.error { background: #f44336; }
.meshcore-status-dot.connected { background: #4caf50; box-shadow: 0 0 5px #4caf50; }
.meshcore-status-dot.connecting { background: #ff9800; animation: meshcore-pulse 1s infinite; }
.meshcore-status-dot.error { background: #f44336; }
@keyframes meshcore-pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.3; }
50% { opacity: 0.3; }
}
/* ── Body (panel + content) ── */
.meshcore-body {
display: flex;
flex: 1;
min-height: 0;
overflow: hidden;
}
/* ── Left contacts/nodes panel ── */
.meshcore-panel {
width: 200px;
min-width: 200px;
background: var(--bg-card);
border-right: 1px solid var(--border-color);
display: flex;
flex-direction: column;
overflow: hidden;
flex-shrink: 0;
}
.meshcore-panel-section {
padding: 10px;
border-bottom: 1px solid var(--border-color);
overflow-y: auto;
}
.meshcore-panel-section--grow {
flex: 1;
}
.meshcore-panel-title {
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.08em;
color: var(--text-muted);
margin-bottom: 8px;
}
/* ── Node / contact list items ── */
@@ -116,18 +214,28 @@
.meshcore-node-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meshcore-node-meta { font-size: 10px; color: var(--text-muted); }
/* ── Main content area ── */
.meshcore-main {
.meshcore-empty {
font-size: 11px;
color: var(--text-muted);
}
.meshcore-label {
font-size: 12px;
color: var(--text-muted);
}
/* ── Right content ── */
.meshcore-content {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
overflow: hidden;
}
/* ── Tab bar ── */
.meshcore-tabs {
display: flex;
gap: 0;
border-bottom: 1px solid var(--border-color);
background: var(--bg-card);
flex-shrink: 0;
@@ -147,6 +255,17 @@
border-bottom-color: var(--accent-cyan);
}
/* ── Tab panels ── */
.meshcore-tab-panel {
display: none;
flex: 1;
flex-direction: column;
min-height: 0;
overflow: hidden;
}
.meshcore-tab-panel.active { display: flex; }
/* ── Message feed ── */
.meshcore-messages {
flex: 1;
@@ -166,7 +285,7 @@
}
.meshcore-message.pending { opacity: 0.6; border-style: dashed; }
.meshcore-message.direct { border-left: 3px solid var(--accent-cyan); }
.meshcore-message.direct { border-left: 3px solid var(--accent-cyan); }
.meshcore-message-header {
display: flex;
@@ -177,7 +296,7 @@
}
.meshcore-message-sender { color: var(--accent-cyan); font-weight: 600; }
.meshcore-message-text { color: var(--text-primary); }
.meshcore-message-text { color: var(--text-primary); }
/* ── Compose bar ── */
.meshcore-compose {
@@ -189,7 +308,17 @@
flex-shrink: 0;
}
.meshcore-compose input {
.meshcore-compose-select {
background: var(--bg-input);
border: 1px solid var(--border-color);
border-radius: 4px;
padding: 6px 8px;
color: var(--text-primary);
font-size: 12px;
width: 140px;
}
.meshcore-compose-input {
flex: 1;
background: var(--bg-input);
border: 1px solid var(--border-color);
@@ -200,19 +329,39 @@
font-family: var(--font-mono);
}
.meshcore-compose input:focus {
.meshcore-compose-input:focus {
outline: none;
border-color: var(--accent-cyan);
}
/* ── Repeaters tab table ── */
.meshcore-repeater-table {
.meshcore-compose-btn {
padding: 6px 16px;
background: var(--accent-cyan);
color: #000;
border: none;
border-radius: 4px;
font-size: 12px;
cursor: pointer;
white-space: nowrap;
}
/* ── Map tab ── */
#meshcoreTabMap { overflow: hidden; }
#meshcoreMap {
width: 100%;
height: 100%;
min-height: 300px;
}
/* ── Repeaters table ── */
.meshcore-table {
width: 100%;
border-collapse: collapse;
font-size: 12px;
}
.meshcore-repeater-table th {
.meshcore-table th {
text-align: left;
padding: 6px 10px;
font-size: 10px;
@@ -222,7 +371,7 @@
border-bottom: 1px solid var(--border-color);
}
.meshcore-repeater-table td {
.meshcore-table td {
padding: 6px 10px;
border-bottom: 1px solid var(--border-color);
color: var(--text-primary);
@@ -232,7 +381,6 @@
.meshcore-traceroute-hops {
display: flex;
align-items: center;
gap: 0;
flex-wrap: wrap;
padding: 16px 0;
}
@@ -261,10 +409,3 @@
font-size: 10px;
color: var(--text-muted);
}
/* ── Map tab ── */
#meshcoreMap {
width: 100%;
height: 100%;
min-height: 300px;
}