Web: Clients: Fixed applying single cursor on loading

This commit is contained in:
Alexey Safronov 2020-10-13 16:20:49 +03:00
parent 3dd9f71dda
commit 746ecc7f40
4 changed files with 52 additions and 43 deletions

View File

@ -1,24 +1,27 @@
// Override default variables before the import
$font-family-base: 'Open Sans', sans-serif;
$font-family-base: "Open Sans", sans-serif;
html, body {
height: 100%;
html,
body {
height: 100%;
}
#root {
min-height: 100%;
position: relative;
min-height: 100%;
position: relative;
.pageLoader {
position: fixed;
left: calc(50% - 20px);
top: 35%;
}
.pageLoader {
position: fixed;
left: calc(50% - 20px);
top: 35%;
}
}
body {
margin: 0;
overflow: hidden;
margin: 0;
overflow: hidden;
}
body.loading * {
cursor: wait !important;
}

View File

@ -1,24 +1,27 @@
// Override default variables before the import
$font-family-base: 'Open Sans', sans-serif;
$font-family-base: "Open Sans", sans-serif;
html, body {
height: 100%;
html,
body {
height: 100%;
}
#root {
min-height: 100%;
position: relative;
min-height: 100%;
position: relative;
.pageLoader {
position: absolute;
left: calc(50% - 20px);
top: 35%;
}
.pageLoader {
position: absolute;
left: calc(50% - 20px);
top: 35%;
}
}
body {
margin: 0;
overflow: hidden;
margin: 0;
overflow: hidden;
}
body.loading * {
cursor: wait !important;
}

View File

@ -1,22 +1,25 @@
// Override default variables before the import
$font-family-base: 'Open Sans', sans-serif;
$font-family-base: "Open Sans", sans-serif;
html, body {
height: 100%;
html,
body {
height: 100%;
}
#root {
min-height: 100%;
min-height: 100%;
.pageLoader {
position: fixed;
left: calc(50% - 20px);
top: 35%;
}
.pageLoader {
position: fixed;
left: calc(50% - 20px);
top: 35%;
}
}
body {
margin: 0;
overflow: hidden;
margin: 0;
overflow: hidden;
}
body.loading * {
cursor: wait !important;
}

View File

@ -97,13 +97,13 @@ export function hideLoader() {
window.loadingTimeout = null;
}
document.body.style.cursor = "";
document.body.classList.remove("loading");
}
export function showLoader() {
if (isMobile) return;
window.loadingTimeout = setTimeout(() => {
document.body.style.cursor = "wait !important";
document.body.classList.add("loading");
}, 1000);
}