diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-09 20:31:56 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-09 20:31:56 +0100 |
| commit | 6b323fc06ec255153e86eafa4dffa67ad8c21f8c (patch) | |
| tree | bc361deaf28cf590f678f31f3fd4c31879688ef7 /static/modules | |
| parent | f59efbd2df7b33ea8d8320b6cd29792986ea8023 (diff) | |
| download | deck-it-6b323fc06ec255153e86eafa4dffa67ad8c21f8c.tar.gz deck-it-6b323fc06ec255153e86eafa4dffa67ad8c21f8c.zip | |
feat: Windows tab shows all workspaces and icon-only launchers
Diffstat (limited to 'static/modules')
| -rw-r--r-- | static/modules/windows.js | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/static/modules/windows.js b/static/modules/windows.js index 7d2d8c8..018cc6a 100644 --- a/static/modules/windows.js +++ b/static/modules/windows.js @@ -61,9 +61,21 @@ export default { const launches = el.querySelector(".launches"); launches.textContent = ""; - for (const key of st.launches ?? []) { - const b = tile(key, () => post("launch", { key })); - b.classList.add("launch"); + for (const item of st.launches ?? []) { + const b = document.createElement("button"); + b.className = "wtile launch"; + b.setAttribute("aria-label", item.label || item.key); + b.title = item.label || item.key; + if (item.icon) { + const icon = document.createElement("span"); + icon.className = "laticon"; + icon.style.webkitMaskImage = `url(/logos/${item.icon}.svg)`; + icon.style.maskImage = `url(/logos/${item.icon}.svg)`; + b.append(icon); + } else { + b.textContent = item.label || item.key; + } + b.onclick = () => post("launch", { key: item.key }); launches.append(b); } }, |
