mirror of
https://github.com/khoaliber/khoj.git
synced 2026-03-09 21:29:11 +00:00
Remove chat loading animation in login required state on Desktop app
This commit is contained in:
@@ -720,18 +720,14 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Add fade out animation to loading screen and remove it after the animation ends
|
// Add fade out animation to loading screen and remove it after the animation ends
|
||||||
let chatBodyWrapper = document.getElementById("chat-body-wrapper");
|
fadeOutLoadingAnimation(loadingScreen);
|
||||||
chatBodyWrapperHeight = chatBodyWrapper.clientHeight;
|
|
||||||
chatBody.style.height = chatBodyWrapperHeight;
|
|
||||||
setTimeout(() => {
|
|
||||||
loadingScreen.remove();
|
|
||||||
chatBody.classList.remove("relative-position");
|
|
||||||
}, 500);
|
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
// If the server returns a 500 error with detail, render a setup hint.
|
// If the server returns a 500 error with detail, render a setup hint.
|
||||||
if (!firstRunSetupMessageRendered)
|
if (!firstRunSetupMessageRendered) {
|
||||||
renderFirstRunSetupMessage();
|
renderFirstRunSetupMessage();
|
||||||
|
fadeOutLoadingAnimation(loadingScreen);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -782,6 +778,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function fadeOutLoadingAnimation(loadingScreen) {
|
||||||
|
let chatBody = document.getElementById("chat-body");
|
||||||
|
let chatBodyWrapper = document.getElementById("chat-body-wrapper");
|
||||||
|
chatBodyWrapperHeight = chatBodyWrapper.clientHeight;
|
||||||
|
chatBody.style.height = chatBodyWrapperHeight;
|
||||||
|
setTimeout(() => {
|
||||||
|
loadingScreen.remove();
|
||||||
|
chatBody.classList.remove("relative-position");
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
|
||||||
function renderFirstRunSetupMessage() {
|
function renderFirstRunSetupMessage() {
|
||||||
first_run_message = `Hi 👋🏾, to get started:
|
first_run_message = `Hi 👋🏾, to get started:
|
||||||
<ol>
|
<ol>
|
||||||
|
|||||||
Reference in New Issue
Block a user