From 6814dadd219ed55818332ff5a2d883e8bb05a47b Mon Sep 17 00:00:00 2001 From: Debanjum Singh Solanky Date: Sun, 16 Jun 2024 13:10:51 +0530 Subject: [PATCH] Fix opening Web, Desktop setup links on first run from Desktop app Previous version failed to open the setup links --- src/interface/desktop/chat.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/interface/desktop/chat.html b/src/interface/desktop/chat.html index c8d02545f..88ce02aac 100644 --- a/src/interface/desktop/chat.html +++ b/src/interface/desktop/chat.html @@ -880,14 +880,18 @@ function renderFirstRunSetupMessage() { first_run_message = `

Hi 👋🏾, to get started:

    -
  1. Generate an API token Khoj Web settings
  2. -
  3. Paste it into the API Key field Khoj Desktop settings
  4. +
  5. Generate an API token Khoj Web settings
  6. +
  7. Paste it into the API Key field Khoj Desktop settings
` .trim() .replace(/(\r\n|\n|\r)/gm, ""); renderMessage(first_run_message, "khoj", null, null, true); + // Open relevant setup links + document.getElementById("first-run-web-config").addEventListener('click', (event) => window.navigateAPI.navigateToWebSettings('config')); + document.getElementById("first-run-desktop-config").addEventListener('click', (event) => window.navigateAPI.navigateToSettings('config.html')); + // Disable chat input field and update placeholder text document.getElementById("chat-input").setAttribute("disabled", "disabled"); document.getElementById("chat-input").setAttribute("placeholder", "Configure Khoj to enable chat");