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