added class to form and added section to prepare next commit

This commit is contained in:
RaffaelW 2024-12-19 17:26:05 +01:00
parent 4ac0681a9a
commit 90f8d7c07e
6 changed files with 157 additions and 151 deletions

View file

@ -1,11 +1,11 @@
const form = document.querySelector("form");
const content = document.querySelector("section.content");
const loadingScreen = document.querySelector(".loading-screen");
const loadingMsg = loadingScreen.querySelector("h2");
const spinner = loadingScreen.querySelector(".spinner");
const reloadBtn = loadingScreen.querySelector(".reload");
export function showLoadingScreen(msg) {
hide(form, reloadBtn);
hide(content, reloadBtn);
show(loadingScreen, spinner);
loadingMsg.classList.remove("error");
loadingMsg.textContent = msg;
@ -22,7 +22,7 @@ export function showError(msg) {
export function hideLoadingScreen() {
hide(loadingScreen, reloadBtn);
show(form);
show(content);
loadingMsg.classList.remove("error");
loadingMsg.textContent = "";
}