Remove Update button from Khoj Search page on the Web interface

The settings page on the Khoj web interface already has a configure
button. Don't need the Update button on the search page as well
This commit is contained in:
Debanjum Singh Solanky 2023-07-07 12:49:58 -07:00
parent bf427cd8dd
commit 2ec8da89e8

View file

@ -133,17 +133,6 @@
}); });
} }
function updateIndex() {
type = document.getElementById("type").value;
fetch(`/api/update?t=${type}&client=web`)
.then(response => response.json())
.then(data => {
console.log(data);
document.getElementById("results").innerHTML =
render_results(data);
});
}
function incrementalSearch(event) { function incrementalSearch(event) {
type = document.getElementById("type").value; type = document.getElementById("type").value;
// Search with reranking on 'Enter' // Search with reranking on 'Enter'
@ -268,9 +257,6 @@
<!--Add Dropdown to Select Query Type --> <!--Add Dropdown to Select Query Type -->
<select id="type" class="option" onchange="setTypeFieldInUrl(this)"></select> <select id="type" class="option" onchange="setTypeFieldInUrl(this)"></select>
<!--Add Button To Regenerate -->
<button id="update" class="option" onclick="updateIndex()">Update</button>
<!--Add Results Count Input To Set Results Count --> <!--Add Results Count Input To Set Results Count -->
<input type="number" id="results-count" min="1" max="100" value="6" placeholder="results count" onchange="setCountFieldInUrl(this)"> <input type="number" id="results-count" min="1" max="100" value="6" placeholder="results count" onchange="setCountFieldInUrl(this)">
</div> </div>
@ -318,7 +304,7 @@
#options { #options {
padding: 0; padding: 0;
display: grid; display: grid;
grid-template-columns: 1fr 1fr minmax(70px, 0.5fr); grid-template-columns: 1fr minmax(70px, 0.5fr);
} }
#options > * { #options > * {
padding: 15px; padding: 15px;