aboutsummaryrefslogtreecommitdiffstats
path: root/static/modules/windows.js
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-13 20:49:56 +0100
committerDanilo M. <danix@danix.xyz>2026-11-13 20:49:56 +0100
commit896163d7961d86b4e023a50ce4f6e19a30006a3f (patch)
tree9a2266a1120f8913616991d9350fa6667c248f0e /static/modules/windows.js
parent69e6ce2bf7272797cf08ee4fbe0ff9fe0fc3b1f4 (diff)
downloaddeck-it-896163d7961d86b4e023a50ce4f6e19a30006a3f.tar.gz
deck-it-896163d7961d86b4e023a50ce4f6e19a30006a3f.zip
feat(vm): tablet tiles with screen, trends and a power button
Each VM is a tile: its screen from virsh screenshot (JPEG through ffmpeg, every 5s while the tab shows), booting until sshd answers at the ssh -G host and port, CPU and RAM trends, and a big power button, tap for the gentle action and hold to force off. A tap on the tile opens a sheet with every action as an icon and the snapshots as a timeline with their age. hold.js is now the one press and hold, K1C's stop included, and vibrates the tablet when it fires; the Windows long-press buzzes too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'static/modules/windows.js')
-rw-r--r--static/modules/windows.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/static/modules/windows.js b/static/modules/windows.js
index 0657a16..639137e 100644
--- a/static/modules/windows.js
+++ b/static/modules/windows.js
@@ -14,6 +14,8 @@
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+import { buzz } from "../hold.js";
+
async function post(action, body = {}) {
try {
await fetch(`/api/windows/${action}`, {
@@ -120,7 +122,7 @@ function card(w, workspaces, wsIcons) {
if (e.target.closest(".wx")) return;
long = false;
const at = { left: e.clientX, bottom: e.clientY };
- timer = setTimeout(() => { long = true; openMenu(at, w, workspaces, wsIcons); }, 600);
+ timer = setTimeout(() => { long = true; buzz(); openMenu(at, w, workspaces, wsIcons); }, 600);
});
// Chrome's own long-press menu (copy or share the image) is not wanted here.
c.addEventListener("contextmenu", (e) => e.preventDefault());