add action icons,

set action icons depending on instance status
This commit is contained in:
2022-12-15 18:28:12 -08:00
parent ea596b8258
commit f40e05fbf5
6 changed files with 46 additions and 3 deletions

View File

@@ -51,7 +51,10 @@ class Instance extends HTMLElement {
resourceDISK.innerText = (data.maxdisk / 1073741824).toFixed(3);
let powerButton = this.shadowElement.querySelector("#power-btn");
powerButton.innerText = data.status === "running" ? "Shutdown" : "Start"
powerButton.src = data.status === "running" ? "images/actions/stop.svg" : "images/actions/start.svg";
let configButton = this.shadowElement.querySelector("#configure-btn");
configButton.src = data.status === "running" ? "images/actions/config-inactive.svg" : "images/actions/config-active.svg";
}
}