15 lines
349 B
JavaScript
15 lines
349 B
JavaScript
import {statusElement} from "/scripts/interface/game/html.js"
|
|
|
|
export function updateConnectionStatus(connection) {
|
|
statusElement.textContent = `Server Connection: ${connection}`
|
|
switch (connection) {
|
|
case "connected":
|
|
statusElement.style.color = "green";
|
|
break;
|
|
case "disconnected":
|
|
statusElement.style.color = "red";
|
|
break;
|
|
|
|
}
|
|
}
|