mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-03 04:19:06 +08:00
changing the icon and removing the preloader if download failed
This commit is contained in:
parent
5c6036a028
commit
9da38ba19a
2 changed files with 5 additions and 0 deletions
|
@ -335,6 +335,8 @@ function getAccountDataAndInit() {
|
|||
accountIconLoading(false);
|
||||
console.error(e);
|
||||
showNotification("Error downloading user data. Refresh to try again. If error persists contact Miodec.", 5000);
|
||||
$("#top #menu .account .icon").html('<i class="fas fa-fw fa-times"></i>');
|
||||
$("#top #menu .account").css('opacity', 1);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -2332,6 +2334,7 @@ function refreshAccountPage() {
|
|||
}
|
||||
if (dbSnapshot === null) {
|
||||
showNotification(`Missing account data. Please refresh.`, 5000);
|
||||
$('.pageAccount .preloader').html('Missing account data. Please refresh.');
|
||||
}else if (dbSnapshot.results === undefined) {
|
||||
db_getUserResults().then((d) => {
|
||||
if (d) {
|
||||
|
|
|
@ -3055,8 +3055,10 @@ function accountIconLoading(truefalse) {
|
|||
$("#top #menu .account .icon").html(
|
||||
'<i class="fas fa-fw fa-spin fa-circle-notch"></i>'
|
||||
);
|
||||
$("#top #menu .account").css('opacity',1);
|
||||
} else {
|
||||
$("#top #menu .account .icon").html('<i class="fas fa-fw fa-user"></i>');
|
||||
$("#top #menu .account").css('opacity',1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue