add server
This commit is contained in:
parent
01369bcf90
commit
7d01dcda30
2
gst.html
2
gst.html
@ -54,6 +54,8 @@
|
|||||||
<br>
|
<br>
|
||||||
<button class="btn btn-lg m-1 mt-2" id="btnDesktop" style="background-color: #3CC3FA;" onclick="btnClick(0)">Desktop</button>
|
<button class="btn btn-lg m-1 mt-2" id="btnDesktop" style="background-color: #3CC3FA;" onclick="btnClick(0)">Desktop</button>
|
||||||
<br>
|
<br>
|
||||||
|
<button class="btn btn-lg m-1" id="btnServer" style="background-color: #3CC3FA;" onclick="btnClick(3)">Server</button>
|
||||||
|
<br>
|
||||||
<button class="btn btn-lg m-1" id="btnLaptop" style="background-color: #3CC3FA;" onclick="btnClick(1)">Laptop</button>
|
<button class="btn btn-lg m-1" id="btnLaptop" style="background-color: #3CC3FA;" onclick="btnClick(1)">Laptop</button>
|
||||||
<br>
|
<br>
|
||||||
<button class="btn btn-lg m-1" id="btnMobile" style="background-color: #3CC3FA;" onclick="btnClick(2)">Mobile/Embedded</button>
|
<button class="btn btn-lg m-1" id="btnMobile" style="background-color: #3CC3FA;" onclick="btnClick(2)">Mobile/Embedded</button>
|
||||||
|
12
gst.js
12
gst.js
@ -42,14 +42,14 @@ export async function btnClick(typ) {
|
|||||||
// 0 -> Desktop
|
// 0 -> Desktop
|
||||||
// 1 -> Laptop
|
// 1 -> Laptop
|
||||||
// 2 -> Mobile/Embedded
|
// 2 -> Mobile/Embedded
|
||||||
|
// 3 -> Server
|
||||||
console.log("Button clicked: typ: " + typ + "cpu type: " + currentCpu.type);
|
|
||||||
|
|
||||||
let btnDesktop = document.getElementById("btnDesktop");
|
let btnDesktop = document.getElementById("btnDesktop");
|
||||||
let btnLaptop = document.getElementById("btnLaptop");
|
let btnLaptop = document.getElementById("btnLaptop");
|
||||||
let btnMobile = document.getElementById("btnMobile");
|
let btnMobile = document.getElementById("btnMobile");
|
||||||
|
let btnServer = document.getElementById("btnServer");
|
||||||
|
|
||||||
let btns = [btnDesktop, btnLaptop, btnMobile];
|
let btns = [btnDesktop, btnLaptop, btnMobile, btnServer];
|
||||||
|
|
||||||
switch (typ) {
|
switch (typ) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -61,6 +61,9 @@ export async function btnClick(typ) {
|
|||||||
case 2:
|
case 2:
|
||||||
btnMobile.style.backgroundColor = "#FF4444";
|
btnMobile.style.backgroundColor = "#FF4444";
|
||||||
break;
|
break;
|
||||||
|
case 3:
|
||||||
|
btnServer.style.backgroundColor = "#FF4444";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (currentCpu.type) {
|
switch (currentCpu.type) {
|
||||||
@ -73,6 +76,9 @@ export async function btnClick(typ) {
|
|||||||
case "Mobile/Embedded":
|
case "Mobile/Embedded":
|
||||||
btnMobile.style.backgroundColor = "lightgreen";
|
btnMobile.style.backgroundColor = "lightgreen";
|
||||||
break;
|
break;
|
||||||
|
case "Server":
|
||||||
|
btnServer.style.backgroundColor = "lightgreen";
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
await delay(2000);
|
await delay(2000);
|
||||||
|
Loading…
Reference in New Issue
Block a user