fix: restore UI to phase 5.4 (terrain, scale bar, zoom controls)
All checks were successful
CI / lint (push) Successful in 5s
CI / test (push) Successful in 9s
CI / build (push) Successful in 18s
CI / lint (pull_request) Successful in 5s
CI / test (pull_request) Successful in 9s
CI / build (pull_request) Successful in 2s

This commit is contained in:
2026-05-16 22:17:10 +03:00
parent 0d57e470a1
commit 8d36f38be6
3 changed files with 546 additions and 21 deletions

View File

@@ -247,7 +247,8 @@ body.has-map-mode #sheet-backdrop.visible { pointer-events: none; }
#waypoints-list { display: flex; flex-direction: column; margin-bottom: 10px; }
.wl-item {
display: flex; align-items: center; gap: 8px;
padding: 6px 0;
padding: 8px 4px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
border-bottom: 1px solid var(--border);
position: relative;
}
@@ -769,3 +770,262 @@ body.has-map-mode #sheet-backdrop.visible { pointer-events: none; }
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
/* ═══════════════════════════════════════════
Terrain Layer (Phase 5.4)
═══════════════════════════════════════════ */
/* Terrain toggle button active state */
#terrain-toggle.active {
color: var(--accent, #4CAF50);
background: rgba(76, 175, 80, 0.15);
}
/* Terrain popup */
.terrain-popup {
position: fixed;
z-index: 500;
background: var(--surface, #1e1e1e);
border: 1px solid var(--border, rgba(255,255,255,0.12));
border-radius: 12px;
padding: 12px 14px;
min-width: 160px;
box-shadow: 0 4px 20px rgba(0,0,0,0.4);
user-select: none;
}
.terrain-popup-title {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--text2, rgba(255,255,255,0.5));
margin-bottom: 10px;
}
.terrain-checkbox {
display: flex;
align-items: center;
gap: 10px;
padding: 8px 4px;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
cursor: pointer;
font-size: 15px;
color: var(--text, #fff);
border-radius: 6px;
}
.terrain-checkbox span {
font-size: 15px;
line-height: 1.3;
}
.terrain-checkbox:hover {
color: var(--accent, #4CAF50);
}
.terrain-checkbox input[type="checkbox"] {
width: 18px;
height: 18px;
accent-color: var(--accent, #4CAF50);
cursor: pointer;
flex-shrink: 0;
}
/* Light theme overrides */
.theme-light .terrain-popup {
background: var(--surface, #fff);
border-color: var(--border, rgba(0,0,0,0.12));
box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.theme-light .terrain-popup-title {
color: var(--text2, rgba(0,0,0,0.5));
}
.theme-light .terrain-checkbox {
color: var(--text, #111);
}
/* Terrain hillshade hint & disabled state */
.terrain-hint {
display: block;
font-size: 11px;
color: var(--accent, #4CAF50);
font-style: italic;
padding: 4px 0 2px 28px;
line-height: 1.2;
}
.terrain-checkbox.disabled {
opacity: 0.45;
pointer-events: none;
cursor: not-allowed;
}
.terrain-checkbox.disabled input[type="checkbox"] {
cursor: not-allowed;
}
/* ── Scale + Zoom bar (one line, top-right) ───────── */
#scale-zoom-bar {
position: absolute;
top: calc(max(env(safe-area-inset-top, 0px), 8px) + 4px);
right: 12px;
display: flex;
align-items: center;
gap: 6px;
z-index: 10;
pointer-events: none;
}
.szb-scale {
height: 16px;
border: 1.5px solid rgba(255,255,255,0.8);
border-top: none;
display: flex;
align-items: center;
justify-content: center;
min-width: 40px;
}
.szb-label {
font-size: 10px;
font-weight: 500;
color: rgba(255,255,255,0.9);
text-shadow: 0 0 3px rgba(0,0,0,0.8), 0 1px 2px rgba(0,0,0,0.6);
white-space: nowrap;
padding: 0 4px;
}
.szb-zoom {
font-size: 11px;
font-weight: 600;
color: rgba(255,255,255,0.85);
text-shadow: 0 0 3px rgba(0,0,0,0.8), 0 1px 2px rgba(0,0,0,0.6);
white-space: nowrap;
}
/* ── Search panel ───────────────────────────── */
#search-panel {
position: fixed;
bottom: calc(68px + env(safe-area-inset-bottom, 0px));
left: 0; right: 0;
background: var(--surface);
border-top: 1px solid var(--border);
z-index: 350;
padding: 12px 16px;
box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
}
.search-panel-inner {
display: flex;
gap: 8px;
align-items: center;
}
#standalone-search-input {
flex: 1;
background: var(--surface2);
border: 1px solid var(--border);
border-radius: 8px;
padding: 10px 14px;
font-size: 15px;
color: var(--text1);
outline: none;
}
#standalone-search-input:focus {
border-color: var(--accent);
}
#search-close-btn {
background: none;
border: none;
color: var(--text3);
font-size: 20px;
cursor: pointer;
padding: 4px 8px;
}
#standalone-search-results {
max-height: 240px;
overflow-y: auto;
margin-top: 8px;
}
#standalone-search-results .search-result-item {
padding: 10px 12px;
border-radius: 8px;
cursor: pointer;
transition: background 0.15s;
}
#standalone-search-results .search-result-item:hover,
#standalone-search-results .search-result-item:active {
background: var(--surface2);
}
#standalone-search-results .search-result-name {
font-size: 14px;
font-weight: 500;
color: var(--text1);
}
#standalone-search-results .search-result-sub {
font-size: 12px;
color: var(--text3);
margin-top: 2px;
}
/* ─── Zoom controls ──────────────────────────────────────────────────────── */
#zoom-controls {
position: fixed;
left: 12px;
top: 12px;
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
z-index: 400;
}
#zoom-controls .map-btn {
width: 40px;
height: 40px;
font-size: 20px;
font-weight: 700;
line-height: 1;
}
#zoom-level {
background: var(--surface, #1e1e1e);
color: var(--text, #fff);
border-radius: 6px;
padding: 4px 8px;
font-size: 13px;
font-weight: 600;
min-width: 32px;
text-align: center;
border: 1px solid rgba(255,255,255,0.1);
}
/* ─── Scale bar ──────────────────────────────────────────────────────────── */
#scale-bar {
position: fixed;
bottom: calc(80px + env(safe-area-inset-bottom, 0px) + 16px);
left: 12px;
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 3px;
z-index: 400;
pointer-events: none;
}
#scale-line {
height: 4px;
width: 100px;
background: #fff;
border: 1px solid rgba(0,0,0,0.6);
border-top: none;
border-left: 2px solid #fff;
border-right: 2px solid #fff;
box-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
#scale-label {
font-size: 11px;
color: #fff;
text-shadow: 0 1px 3px rgba(0,0,0,0.9), 0 0 4px rgba(0,0,0,0.7);
font-weight: 700;
letter-spacing: 0.3px;
}