more file refactoring

This commit is contained in:
Miodec 2021-03-12 18:50:07 +00:00
parent 84a4beb2ed
commit ea0b1e4113
4 changed files with 14 additions and 1 deletions

View file

@ -98,7 +98,7 @@ const refactoredSrc = [
"./src/js/sound.js",
"./src/js/custom-text.js",
"./src/js/shift-tracker.js",
"./src/js/test-stats.js",
"./src/js/test/test-stats.js",
"./src/js/theme-colors.js",
];

View file

@ -6,6 +6,18 @@ export function hideBackgroundLoader() {
$("#backgroundLoader").stop(true, true).fadeOut(125);
}
function accountIconLoading(truefalse) {
if (truefalse) {
$("#top #menu .account .icon").html(
'<i class="fas fa-fw fa-spin fa-circle-notch"></i>'
);
$("#top #menu .account").css("opacity", 1).css("pointer-events", "none");
} else {
$("#top #menu .account .icon").html('<i class="fas fa-fw fa-user"></i>');
$("#top #menu .account").css("opacity", 1).css("pointer-events", "auto");
}
}
export function swapElements(
el1,
el2,

View file

@ -24,6 +24,7 @@ import {
showBackgroundLoader,
hideBackgroundLoader,
swapElements,
accountIconLoading,
} from "./dom-util";
import * as Misc from "./misc";
import * as CloudFunctions from "./cloud-functions";