From 946af0889d195d483ca044698e0f6ac856ceb983 Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Sat, 24 Jun 2023 00:49:57 -0700 Subject: [PATCH] Improve showing status message on saving config via web interface - Show success/failure status message much closer to the save button Previously status message was shown on top of the page, which wasn't always in view and wasn't easily seen - Improve the status message to more clearly show next steps on success --- src/khoj/interface/web/content_type_github_input.html | 4 ++-- src/khoj/interface/web/content_type_input.html | 8 +++++--- src/khoj/interface/web/processor_conversation_input.html | 8 +++++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/khoj/interface/web/content_type_github_input.html b/src/khoj/interface/web/content_type_github_input.html index 6c715b82..8ab3a91b 100644 --- a/src/khoj/interface/web/content_type_github_input.html +++ b/src/khoj/interface/web/content_type_github_input.html @@ -7,7 +7,6 @@ Github
-
@@ -63,6 +62,7 @@
+
@@ -96,7 +96,7 @@ .then(response => response.json()) .then(data => { if (data["status"] == "ok") { - document.getElementById("success").innerHTML = "✅ Successfully updated. Go to your settings to regenerate your index."; + document.getElementById("success").innerHTML = "✅ Successfully updated. Click Configure on your settings page to complete your Khoj setup."; document.getElementById("success").style.display = "block"; } else { document.getElementById("success").innerHTML = "⚠️ Failed to update settings."; diff --git a/src/khoj/interface/web/content_type_input.html b/src/khoj/interface/web/content_type_input.html index e06ab9f4..f13f0f14 100644 --- a/src/khoj/interface/web/content_type_input.html +++ b/src/khoj/interface/web/content_type_input.html @@ -72,8 +72,10 @@ - - +
+ + +
@@ -145,7 +147,7 @@ .then(response => response.json()) .then(data => { if (data["status"] == "ok") { - document.getElementById("success").innerHTML = "✅ Successfully updated. Go to your settings to regenerate your index."; + document.getElementById("success").innerHTML = "✅ Successfully updated. Click Configure on your settings page to complete your Khoj setup."; document.getElementById("success").style.display = "block"; } else { document.getElementById("success").innerHTML = "⚠️ Failed to update settings."; diff --git a/src/khoj/interface/web/processor_conversation_input.html b/src/khoj/interface/web/processor_conversation_input.html index fa5885a5..0397bbce 100644 --- a/src/khoj/interface/web/processor_conversation_input.html +++ b/src/khoj/interface/web/processor_conversation_input.html @@ -7,7 +7,6 @@ Chat
-
@@ -47,7 +46,10 @@
- +
+ + +
@@ -74,7 +76,7 @@ .then(response => response.json()) .then(data => { if (data["status"] == "ok") { - document.getElementById("success").innerHTML = "✅ Successfully updated. Go to your settings to regenerate your index."; + document.getElementById("success").innerHTML = "✅ Successfully updated. Click Configure on your settings page to complete your Khoj setup."; document.getElementById("success").style.display = "block"; } else { document.getElementById("success").innerHTML = "⚠️ Failed to update settings.";