Files
appServerPortalUI/public/app.js
2026-02-02 18:38:32 +01:00

36 lines
825 B
JavaScript
Executable File

const services = [
{
id: "abc",
name: "Control GamePad",
url: "https://thinkcentre.local:10010/"
},
{
id: "xyz",
name: "Guacamole",
url: "http://thinkcentre.local:8080/"
}
];
const nav = document.getElementById("services");
const grid = document.getElementById("service-grid");
services.forEach(svc => {
// Header Button
const btn = document.createElement("button");
btn.textContent = svc.name;
btn.onclick = () => go(svc);
nav.appendChild(btn);
// Card
const card = document.createElement("div");
card.className = "service-card";
card.textContent = svc.name;
card.onclick = () => go(svc);
grid.appendChild(card);
});
function go(service) {
localStorage.setItem("lastService", service.id);
window.location.href = service.url;
}