diff --git a/.reasonix/desktop-topic-created-at.json b/.reasonix/desktop-topic-created-at.json new file mode 100644 index 0000000..dead4bb --- /dev/null +++ b/.reasonix/desktop-topic-created-at.json @@ -0,0 +1,3 @@ +{ + "topic_20260629-150638_cda0606c7e7a865d": 1782745598290 +} \ No newline at end of file diff --git a/.reasonix/desktop-topic-title-sources.json b/.reasonix/desktop-topic-title-sources.json new file mode 100644 index 0000000..5ac49c0 --- /dev/null +++ b/.reasonix/desktop-topic-title-sources.json @@ -0,0 +1,3 @@ +{ + "topic_20260629-150638_cda0606c7e7a865d": "auto" +} \ No newline at end of file diff --git a/.reasonix/desktop-topic-titles.json b/.reasonix/desktop-topic-titles.json new file mode 100644 index 0000000..716f05b --- /dev/null +++ b/.reasonix/desktop-topic-titles.json @@ -0,0 +1,3 @@ +{ + "topic_20260629-150638_cda0606c7e7a865d": "新的会话" +} \ No newline at end of file diff --git a/assets/css/ui.css b/assets/css/ui.css index b3a184b..ca52c82 100644 --- a/assets/css/ui.css +++ b/assets/css/ui.css @@ -1122,6 +1122,57 @@ line-height: 1; } +/* Recent locations — quick-click stacked list beneath the last-update line. */ +.utci-recent-locs { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 3px; + margin-top: 0.5rem; +} +.utci-recent-label { + font-family: Manrope, sans-serif; + font-size: 9px; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.08em; + color: #b09870; + margin-bottom: 1px; +} +.utci-recent-chip { + display: flex; + align-items: center; + gap: 5px; + width: 100%; + max-width: 220px; + padding: 4px 10px 4px 8px; + font-family: Manrope, sans-serif; + font-size: 0.74rem; + font-weight: 600; + text-align: left; + color: #7a5e2a; + background: #fdf8ee; + border: 1.5px solid #d9c39b; + border-radius: 8px; + cursor: pointer; + transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease; +} +.utci-recent-chip:hover { + background: #f6ecd6; + border-color: #c8922a; + color: #6a4f1e; +} +/* Keep long names on one line with an ellipsis rather than wrapping. */ +.utci-recent-name { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.utci-recent-pin { + flex-shrink: 0; + color: #c8922a; +} + /* ── 10. LEGEND (thermal-stress band colours at the bottom) ────────── */ .utci-legend { @@ -1306,6 +1357,13 @@ text-align: center; } + .utci-recent-locs { + align-items: center; + } + .utci-recent-chip { + max-width: 260px; + } + .utci-search-wrap { width: 100%; } diff --git a/assets/js/app.js b/assets/js/app.js index c5cd41f..510bf9e 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -175,7 +175,7 @@ export function UTCIForecast() { // All useState, useEffect, useCallback and useRef logic lives in // useAppState. See hooks/useAppState.js for the full reading order. const { - location, setLocationAndSave, + location, setLocationAndSave, recentLocations, forecast, airQuality, loading, error, now, fetchedAt, searchQuery, setSearchQuery, searchResults, setSearchResults, searching, selectedDay, setSelectedDay, @@ -675,6 +675,35 @@ export function UTCIForecast() {