mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-27 17:35:07 +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");
|
var regenerateButton = document.getElementById("config-regenerate");
|
||||||
regenerateButton.addEventListener("click", (event) => {
|
regenerateButton.addEventListener("click", (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
regenerateButton.style.cursor = "progress";
|
||||||
|
regenerateButton.disabled = true;
|
||||||
fetch("/regenerate")
|
fetch("/regenerate")
|
||||||
.then(response => response.json())
|
.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) {
|
function processChildren(element, data) {
|
||||||
|
|
|
@ -21,4 +21,9 @@ div.config-title {
|
||||||
span.config-element-value {
|
span.config-element-value {
|
||||||
color: var(--complementary-color);
|
color: var(--complementary-color);
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
Loading…
Reference in a new issue