From 9da38ba19ae4fea9246817f58b1fff222b5b9622 Mon Sep 17 00:00:00 2001 From: Jack Date: Tue, 6 Oct 2020 17:16:47 +0100 Subject: [PATCH] changing the icon and removing the preloader if download failed --- public/js/account.js | 3 +++ public/js/script.js | 2 ++ 2 files changed, 5 insertions(+) diff --git a/public/js/account.js b/public/js/account.js index 77f1a580f..63fd06a35 100644 --- a/public/js/account.js +++ b/public/js/account.js @@ -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(''); + $("#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) { diff --git a/public/js/script.js b/public/js/script.js index 24786fa9e..f89e546b4 100644 --- a/public/js/script.js +++ b/public/js/script.js @@ -3055,8 +3055,10 @@ function accountIconLoading(truefalse) { $("#top #menu .account .icon").html( '' ); + $("#top #menu .account").css('opacity',1); } else { $("#top #menu .account .icon").html(''); + $("#top #menu .account").css('opacity',1); } }