mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Disable regenerate button while embeddings are being regenerated
This commit is contained in:
parent
5d50487d83
commit
112868962b
2 changed files with 13 additions and 1 deletions
|
@ -35,9 +35,16 @@ fetch("/config")
|
|||
var regenerateButton = document.getElementById("config-regenerate");
|
||||
regenerateButton.addEventListener("click", (event) => {
|
||||
event.preventDefault();
|
||||
regenerateButton.style.cursor = "progress";
|
||||
regenerateButton.disabled = true;
|
||||
fetch("/regenerate")
|
||||
.then(response => response.json())
|
||||
.then(data => console.log(data));
|
||||
.then(data => () =>
|
||||
{
|
||||
regenerateButton.style.cursor = "pointer";
|
||||
regenerateButton.disabled = false;
|
||||
console.log(data);
|
||||
});
|
||||
})
|
||||
|
||||
function processChildren(element, data) {
|
||||
|
|
|
@ -21,4 +21,9 @@ div.config-title {
|
|||
span.config-element-value {
|
||||
color: var(--complementary-color);
|
||||
font-weight: normal;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
}
|
Loading…
Reference in a new issue