From 896163d7961d86b4e023a50ce4f6e19a30006a3f Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 13 Nov 2026 20:49:56 +0100 Subject: 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 --- static/modules/windows.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'static/modules/windows.js') 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()); -- cgit v1.2.3