mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
hide loader only once the initial note is loaded
This commit is contained in:
parent
0869caa03c
commit
43a6a52ead
@ -91,16 +91,23 @@ function isElectron() {
|
||||
return window && window.process && window.process.type;
|
||||
}
|
||||
|
||||
$(document).ready(() => {
|
||||
$("#container").show();
|
||||
let appShown = false;
|
||||
|
||||
// Get a reference to the loader's div
|
||||
const loaderDiv = document.getElementById("loader-wrapper");
|
||||
// When the transition ends remove loader's div from display
|
||||
// so that we can access the map with gestures or clicks
|
||||
loaderDiv.addEventListener("transitionend", function(){
|
||||
loaderDiv.style.display = "none";
|
||||
}, true);
|
||||
// Kick off the CSS transition
|
||||
loaderDiv.style.opacity = 0.0;
|
||||
});
|
||||
function showAppIfHidden() {
|
||||
if (!appShown) {
|
||||
appShown = true;
|
||||
|
||||
$("#container").show();
|
||||
|
||||
// Get a reference to the loader's div
|
||||
const loaderDiv = document.getElementById("loader-wrapper");
|
||||
// When the transition ends remove loader's div from display
|
||||
// so that we can access the map with gestures or clicks
|
||||
loaderDiv.addEventListener("transitionend", function(){
|
||||
loaderDiv.style.display = "none";
|
||||
}, true);
|
||||
|
||||
// Kick off the CSS transition
|
||||
loaderDiv.style.opacity = 0.0;
|
||||
}
|
||||
}
|
@ -227,6 +227,8 @@ const noteEditor = (function() {
|
||||
noteChangeDisabled = false;
|
||||
|
||||
setNoteBackgroundIfEncrypted(currentNote);
|
||||
|
||||
showAppIfHidden();
|
||||
}
|
||||
|
||||
async function loadNote(noteId) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user