From abf6f963eaf2ec0ad94c63ce3b804223790f001c Mon Sep 17 00:00:00 2001 From: AjaySDwivedi1 <126500563+AjaySDwivedi1@users.noreply.github.com> Date: Tue, 23 Apr 2024 07:12:11 -0400 Subject: [PATCH] =?UTF-8?q?Replaced=20reinitialize=20and=20save=20all=20bu?= =?UTF-8?q?tton=20to=20a=20sync=20button=20in=20config.=E2=80=A6=20(#701)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaced reinitialize and save all button to a sync button in config --- src/khoj/interface/web/assets/icons/sync.svg | 4 +++ src/khoj/interface/web/config.html | 36 +++++++------------- 2 files changed, 17 insertions(+), 23 deletions(-) create mode 100644 src/khoj/interface/web/assets/icons/sync.svg diff --git a/src/khoj/interface/web/assets/icons/sync.svg b/src/khoj/interface/web/assets/icons/sync.svg new file mode 100644 index 00000000..19319be8 --- /dev/null +++ b/src/khoj/interface/web/assets/icons/sync.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/khoj/interface/web/config.html b/src/khoj/interface/web/config.html index 2e310ce6..f0537a2a 100644 --- a/src/khoj/interface/web/config.html +++ b/src/khoj/interface/web/config.html @@ -162,10 +162,12 @@
- -
-
- +
@@ -478,28 +480,16 @@ }) } - var configure = document.getElementById("configure"); - configure.addEventListener("click", function(event) { - event.preventDefault(); - updateIndex( - force=false, - successText="Saved!", - errorText="Unable to configure. Raise issue on Khoj Github or Discord.", - button=configure, - loadingText="Saving...", - emoji="💾"); - }); - - var reinitialize = document.getElementById("reinitialize"); - reinitialize.addEventListener("click", function(event) { + var sync = document.getElementById("sync"); + sync.addEventListener("click", function(event) { event.preventDefault(); updateIndex( force=true, - successText="Reinitialized!", - errorText="Unable to reinitialize. Raise issue on Khoj Github or Discord.", - button=reinitialize, - loadingText="Reinitializing...", - emoji="🔄"); + successText="Synced!", + errorText="Unable to sync. Raise issue on Khoj Github or Discord.", + button=sync, + loadingText="Syncing...", + emoji=""); }); function updateIndex(force, successText, errorText, button, loadingText, emoji) {