add power button html and css

This commit is contained in:
Arthur Lu 2022-12-15 18:04:20 -08:00
parent c45c9df406
commit 10526d1a67
2 changed files with 6 additions and 2 deletions

View File

@ -45,8 +45,9 @@
</div>
</div>
<hr>
<div>
<div class="btn-group">
<button type="button" id="power-btn"></button>
<button type="button" id="configure-btn">Config</button>
</div>
</article>
</template>

View File

@ -49,6 +49,9 @@ class Instance extends HTMLElement {
let resourceDISK = this.shadowElement.querySelector("#resource-disk");
resourceDISK.innerText = (data.maxdisk / 1073741824).toFixed(3);
let powerButton = this.shadowElement.querySelector("#power-btn");
powerButton.innerText = data.status === "running" ? "Shutdown" : "Start"
}
}