From d3885c58831caa3e7cf75e12c2f46eb49c4054f8 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 13 Dec 2018 10:20:05 +0300 Subject: [PATCH] App.toggleNightMode: add some fadein/fadeout --- js/AppBase.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/AppBase.js b/js/AppBase.js index a9efbfecb..c7e221094 100644 --- a/js/AppBase.js +++ b/js/AppBase.js @@ -379,10 +379,11 @@ define(["dojo/_base/declare"], function (declare) { user_css = "css/default.css?" + Date.now(); } - fetch(user_css).then(() => { + $("main").fade({duration: 0.5, afterFinish: () => { link.setAttribute("href", user_css); + $("main").appear({duration: 0.5}); xhrPost("backend.php", {op: "rpc", method: "setpref", key: "USER_CSS_THEME", value: user_theme}); - }); + }}); } },