App.toggleNightMode: add some fadein/fadeout

This commit is contained in:
Andrew Dolgov 2018-12-13 10:20:05 +03:00
parent a3dae9382e
commit d3885c5883
1 changed files with 3 additions and 2 deletions

View File

@ -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});
});
}});
}
},