From 5bb35b278fcf09ea82197ef5caca576de15f4cbe Mon Sep 17 00:00:00 2001 From: hermes-explorigin Date: Sun, 30 Aug 2026 19:26:19 +0000 Subject: [PATCH] Remove swipe destination peek labels Drop the 'Hourly'/'Daily'/etc. peek chip shown at the edge while swiping. The live finger-tracking slide remains; only the label affordance is removed. --- dist/index.html | 124 +++++++++++++----------------------------------- src/App.svelte | 46 ------------------ 2 files changed, 33 insertions(+), 137 deletions(-) diff --git a/dist/index.html b/dist/index.html index ad7d694..4aa7e73 100644 --- a/dist/index.html +++ b/dist/index.html @@ -7188,7 +7188,7 @@ var root_4$3 = /* @__PURE__ */ from_html(``); var root_6$2 = /* @__PURE__ */ from_html(`
`, 1); var root_7$1 = /* @__PURE__ */ from_html(`
Loading radar...
`); -var root_8$1 = /* @__PURE__ */ from_html(`
`); +var root_8 = /* @__PURE__ */ from_html(`
`); var root_9 = /* @__PURE__ */ from_html(`
⏳ Loading lightning...
`); var root_10 = /* @__PURE__ */ from_html(`
`); var root_11 = /* @__PURE__ */ from_html(`
⚡ No recent strikes nearby
`); @@ -7536,7 +7536,7 @@ function PrecipitationRadar($$anchor, $$props) { }); var node_7 = sibling(node_6, 2); var consequent_6 = ($$anchor) => { - var div_8 = root_8$1(); + var div_8 = root_8(); var span_2 = child(div_8); var text_1 = child(span_2); reset(span_2); @@ -8250,10 +8250,9 @@ var root_1 = /* @__PURE__ */ from_html(` `); var root_3 = /* @__PURE__ */ from_html(`
🌍

Welcome to WeatherLens

`); var root_4 = /* @__PURE__ */ from_html(`

Loading weather data...

`); -var root_5 = /* @__PURE__ */ from_html(``); -var root_6 = /* @__PURE__ */ from_html(`
`); -var root_7 = /* @__PURE__ */ from_html(`
`, 1); -var root_8 = /* @__PURE__ */ from_html(`

`); +var root_5 = /* @__PURE__ */ from_html(`
`); +var root_6 = /* @__PURE__ */ from_html(`
`, 1); +var root_7 = /* @__PURE__ */ from_html(`

`); function App($$anchor, $$props) { push($$props, true); let viewMode = /* @__PURE__ */ state(proxy(parseHash(typeof window !== "undefined" ? window.location.hash : ""))); @@ -8274,13 +8273,6 @@ function App($$anchor, $$props) { const SWIPE_THRESHOLD = 70; const AXIS_THRESHOLD = 12; const SWIPE_TIMEOUT = 160; - const TAB_LABELS = { - current: "Now", - hourly: "Hourly", - daily: "Daily", - detail: "More", - radar: "Radar" - }; let contentEl = /* @__PURE__ */ state(null); let swiping = /* @__PURE__ */ state(false); let swipeAnchor = /* @__PURE__ */ state(null); @@ -8288,7 +8280,6 @@ function App($$anchor, $$props) { let swipeLock = /* @__PURE__ */ state(null); let settling = /* @__PURE__ */ state(false); const clampIdx = (i) => Math.min(Math.max(i, 0), VALID_VIEWS.length - 1); - const peekView = /* @__PURE__ */ user_derived(() => get(swiping) && get(swipeLock) === "x" && VALID_VIEWS.includes(get(viewMode)) ? VALID_VIEWS[clampIdx(VALID_VIEWS.indexOf(get(viewMode)) + (get(swipeDX) < 0 ? 1 : -1))] : null); function onSwipeStart(e) { if (get(viewMode) === "radar" || !e.touches || !e.touches[0]) return; const t = e.touches[0]; @@ -8430,7 +8421,7 @@ function App($$anchor, $$props) { const newest = updated[updated.length - 1]; if (newest) app$1.selectLocation(newest.id); } - var div = root_8(); + var div = root_7(); var div_1 = child(div); var button = child(div_1); var text = child(button, true); @@ -8510,8 +8501,8 @@ function App($$anchor, $$props) { if (app$1.loading && !app$1.forecastData) $$render(consequent_4); }); var node_8 = sibling(node_7, 2); - var consequent_11 = ($$anchor) => { - var fragment = root_7(); + var consequent_10 = ($$anchor) => { + var fragment = root_6(); var div_8 = first_child(fragment); var button_5 = child(div_8); let classes_1; @@ -8542,59 +8533,41 @@ function App($$anchor, $$props) { let classes_12; var node_9 = child(div_11); var consequent_5 = ($$anchor) => { - var span_3 = root_5(); - let classes_13; - var text_5 = child(span_3, true); - reset(span_3); - template_effect(() => { - classes_13 = set_class(span_3, 1, "swipe-peek svelte-1n46o8q", null, classes_13, { - "from-left": get(swipeDX) >= 0, - "from-right": get(swipeDX) < 0 - }); - set_text(text_5, TAB_LABELS[get(peekView)]); - }); - append($$anchor, span_3); - }; - if_block(node_9, ($$render) => { - if (get(peekView) && TAB_LABELS[get(peekView)]) $$render(consequent_5); - }); - var node_10 = sibling(node_9, 2); - var consequent_6 = ($$anchor) => { - var div_12 = root_6(); + var div_12 = root_5(); CurrentWeather(child(div_12), {}); reset(div_12); append($$anchor, div_12); }; - var consequent_7 = ($$anchor) => { - var div_13 = root_6(); + var consequent_6 = ($$anchor) => { + var div_13 = root_5(); HourlyForecast(child(div_13), {}); reset(div_13); append($$anchor, div_13); }; - var consequent_8 = ($$anchor) => { - var div_14 = root_6(); + var consequent_7 = ($$anchor) => { + var div_14 = root_5(); DailyForecast(child(div_14), {}); reset(div_14); append($$anchor, div_14); }; - var consequent_9 = ($$anchor) => { - var div_15 = root_6(); + var consequent_8 = ($$anchor) => { + var div_15 = root_5(); WeatherDetail(child(div_15), {}); reset(div_15); append($$anchor, div_15); }; - var consequent_10 = ($$anchor) => { - var div_16 = root_6(); + var consequent_9 = ($$anchor) => { + var div_16 = root_5(); PrecipitationRadar(child(div_16), {}); reset(div_16); append($$anchor, div_16); }; - if_block(node_10, ($$render) => { - if (get(viewMode) === "current") $$render(consequent_6); - else if (get(viewMode) === "hourly") $$render(consequent_7, 1); - else if (get(viewMode) === "daily") $$render(consequent_8, 2); - else if (get(viewMode) === "detail") $$render(consequent_9, 3); - else if (get(viewMode) === "radar") $$render(consequent_10, 4); + if_block(node_9, ($$render) => { + if (get(viewMode) === "current") $$render(consequent_5); + else if (get(viewMode) === "hourly") $$render(consequent_6, 1); + else if (get(viewMode) === "daily") $$render(consequent_7, 2); + else if (get(viewMode) === "detail") $$render(consequent_8, 3); + else if (get(viewMode) === "radar") $$render(consequent_9, 4); }); reset(div_11); reset(div_10); @@ -8631,18 +8604,18 @@ function App($$anchor, $$props) { append($$anchor, fragment); }; if_block(node_8, ($$render) => { - if (app$1.forecastData && app$1.selectedLocation) $$render(consequent_11); + if (app$1.forecastData && app$1.selectedLocation) $$render(consequent_10); }); reset(main); - var node_16 = sibling(main, 2); - var consequent_12 = ($$anchor) => { + var node_15 = sibling(main, 2); + var consequent_11 = ($$anchor) => { SettingsDialog($$anchor, { onClose: () => app$1.showSettings = false }); }; - if_block(node_16, ($$render) => { - if (app$1.showSettings) $$render(consequent_12); + if_block(node_15, ($$render) => { + if (app$1.showSettings) $$render(consequent_11); }); - var node_17 = sibling(node_16, 2); - var consequent_13 = ($$anchor) => { + var node_16 = sibling(node_15, 2); + var consequent_12 = ($$anchor) => { AddLocationDialog($$anchor, { onClose: () => { app$1.showAddLocation = false; @@ -8651,8 +8624,8 @@ function App($$anchor, $$props) { onAdd: handleAddLocation }); }; - if_block(node_17, ($$render) => { - if (app$1.showAddLocation) $$render(consequent_13); + if_block(node_16, ($$render) => { + if (app$1.showAddLocation) $$render(consequent_12); }); reset(div); template_effect(() => { @@ -8674,7 +8647,7 @@ delegate([ ]); //#endregion //#region src/main.js -console.info({ commit_hash: "09cea275b7ac2fd46d2184d84524ee1c3ddcbe60" }); +console.info({ commit_hash: "f5488eaa983eaef1a39ca585192aa9b7b450a2c4" }); mount(App, { target: document.getElementById("app") }); //#endregion