diff options
Diffstat (limited to 'docs/prototypes/desktop-settings-shared.js')
| -rw-r--r-- | docs/prototypes/desktop-settings-shared.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/docs/prototypes/desktop-settings-shared.js b/docs/prototypes/desktop-settings-shared.js index 39bc76a..f96a03a 100644 --- a/docs/prototypes/desktop-settings-shared.js +++ b/docs/prototypes/desktop-settings-shared.js @@ -16,6 +16,7 @@ const DS = (() => { airplane: false, nightlight: false, dnd: false, + weathergeo: false, brightness: 70, kbd: 40, powerprofile: "balanced", // performance | balanced | saver @@ -38,6 +39,7 @@ const DS = (() => { airplane: { glyph: "\u{f001d}", name: "Airplane", on: "on", off: "off" }, nightlight:{ glyph: "\u{f0594}", name: "Night light", on: "warm", off: "off" }, dnd: { glyph: "\u{f009b}", name: "Do Not Disturb",on:"silenced",off: "notifying" }, + weathergeo:{ glyph: "\u{f034e}", name: "Weather geo", on: "whereami",off: "pinned" }, }; const SLIDERS = { brightness: { glyph: "\u{f00df}", name: "Brightness", floor: 5 }, @@ -161,7 +163,13 @@ const DS = (() => { const inp = h("input"); inp.type = "range"; inp.min = meta.floor; inp.max = 100; inp.value = state[key]; const pct = h("span", "s-pct", state[key] + "%"); - inp.oninput = () => { pct.textContent = inp.value + "%"; }; + // Gold fill left of the knob, painted as a gradient (no shadow hack). + const paint = () => { + const p = ((inp.value - meta.floor) / (100 - meta.floor)) * 100; + inp.style.background = `linear-gradient(90deg, var(--gold) ${p}%, var(--well) ${p}%)`; + }; + paint(); + inp.oninput = () => { pct.textContent = inp.value + "%"; paint(); }; inp.onchange = () => setSlider(key, +inp.value, row); row.appendChild(inp); row.appendChild(pct); return row; @@ -202,7 +210,11 @@ const DS = (() => { "linear-gradient(135deg,#5c5030,#2e2810)", ]; function wallpaperSubview(closeCb) { - const sv = h("div", "ds-subview"); + // plain flow container: the CALLER's #subview owns the ds-subview + // overlay styling — carrying the class here left the content + // display:none inside an open overlay (empty wallpaper view, found + // testing prototype 12) + const sv = h("div", "ds-col"); const head = h("div", "ds-sub-head"); head.innerHTML = `<span class="back">‹ Back</span><span class="title">Wallpaper</span>`; head.querySelector(".back").onclick = closeCb; |
