+
+
-
-
+
+
-
-
@@ -855,15 +1103,86 @@
font-weight: 300;
line-height: 1.5em;
}
+
body > * {
padding: 10px;
margin: 10px;
}
+
+ input.conversation-title-input {
+ font-family: var(--font-family);
+ font-size: 14px;
+ font-weight: 300;
+ line-height: 1.5em;
+ padding: 5px;
+ border: 1px solid var(--main-text-color);
+ border-radius: 5px;
+ margin: 4px;
+ }
+
+ input.conversation-title-input:focus {
+ outline: none;
+ }
+
+ #chat-section-wrapper {
+ display: grid;
+ grid-template-columns: auto auto;
+ grid-column-gap: 10px;
+ grid-row-gap: 10px;
+ padding: 10px;
+ margin: 10px;
+ overflow-y: scroll;
+ }
+
+ #chat-section-wrapper.mobile-friendly {
+ grid-template-columns: auto auto;
+ }
+
+ #chat-body-wrapper {
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+ }
+
+ #side-panel {
+ padding: 10px;
+ background: var(--background-color);
+ border-radius: 5px;
+ box-shadow: 0 0 11px #aaa;
+ overflow-y: scroll;
+ text-align: left;
+ transition: width 0.3s ease-in-out;
+ width: 250px;
+ }
+
+ div#side-panel.collapsed {
+ width: 1px;
+ display: block;
+ overflow: hidden;
+ }
+
+ div#collapse-side-panel {
+ align-self: center;
+ padding: 8px;
+ }
+
+ div#conversation-list-body {
+ display: grid;
+ grid-template-columns: 1fr;
+ grid-gap: 8px;
+ }
+
+ div#side-panel-wrapper {
+ display: flex
+ }
+
+
#chat-body {
font-size: small;
margin: 0px;
line-height: 20px;
- overflow-y: scroll; /* Make chat body scroll to see history */
+ overflow-y: scroll;
+ overflow-x: hidden;
}
/* add chat metatdata to bottom of bubble */
.chat-message::after {
@@ -871,7 +1190,7 @@
display: block;
font-size: x-small;
color: #475569;
- margin: -8px 4px 0 -5px;
+ margin: -8px 4px 0px 0px;
}
/* move message by khoj to left */
.chat-message.khoj {
@@ -962,6 +1281,7 @@
grid-row-gap: 10px;
background: #f9fafc;
align-items: center;
+ background-color: var(--background-color);
}
.option:hover {
box-shadow: 0 0 11px #aaa;
@@ -998,9 +1318,33 @@
margin-top: -2px;
margin-left: -5px;
}
+
+ .side-panel-button {
+ background: var(--background-color);
+ border: none;
+ box-shadow: none;
+ font-size: 14px;
+ font-weight: 300;
+ line-height: 1.5em;
+ cursor: pointer;
+ transition: background 0.3s ease-in-out;
+ border-radius: 5%;;
+ font-family: var(--font-family);
+ padding: 8px;
+ font-size: large;
+ }
+
+ svg.side-panel-collapse {
+ width: 30px;
+ height: 30px;
+ }
+
+ .side-panel-button:hover,
.input-row-button:hover {
background: var(--primary-hover);
}
+
+ .side-panel-button:active,
.input-row-button:active {
background: var(--primary-active);
}
@@ -1236,10 +1580,36 @@
#clear-chat-button {
margin-left: 0;
}
+
+ div#side-panel.collapsed {
+ width: 0px;
+ display: block;
+ overflow: hidden;
+ padding: 0;
+ }
+
+ svg.side-panel-collapse {
+ width: 24px;
+ height: 24px;
+ }
+
+ #chat-body-wrapper {
+ min-width: 0;
+ }
+
+ div#chat-section-wrapper {
+ padding: 4px;
+ margin: 4px;
+ grid-column-gap: 4px;
+ }
+ div#collapse-side-panel {
+ align-self: center;
+ padding: 0px;
+ }
}
@media only screen and (min-width: 600px) {
body {
- grid-template-columns: auto min(70vw, 100%) auto;
+ grid-template-columns: auto min(90vw, 100%) auto;
grid-template-rows: auto auto minmax(80px, 100%) auto;
}
body > * {
@@ -1252,6 +1622,110 @@
font-size: medium;
}
+ svg.new-convo-button {
+ width: 20px;
+ margin-left: 5px;
+ }
+
+ div#new-conversation {
+ text-align: left;
+ border-bottom: 1px solid var(--main-text-color);
+ margin-bottom: 8px;
+ }
+
+ button#new-conversation-button {
+ display: inline-flex;
+ align-items: center;
+ }
+
+ div.conversation-button {
+ background: var(--background-color);
+ color: var(--main-text-color);
+ border: 1px solid var(--main-text-color);
+ border-radius: 5px;
+ padding: 5px;
+ font-size: 14px;
+ font-weight: 300;
+ line-height: 1.5em;
+ cursor: pointer;
+ transition: background 0.2s ease-in-out;
+ text-align: left;
+ display: flex;
+ position: relative;
+ }
+
+ .three-dot-menu {
+ display: none;
+ /* background: var(--background-color); */
+ /* border: 1px solid var(--main-text-color); */
+ border-radius: 5px;
+ /* position: relative; */
+ position: absolute;
+ right: 4;
+ top: 4;
+ }
+
+ button.three-dot-menu-button-item {
+ background: var(--background-color);
+ color: var(--main-text-color);
+ border: none;
+ box-shadow: none;
+ font-size: 14px;
+ font-weight: 300;
+ line-height: 1.5em;
+ cursor: pointer;
+ transition: background 0.3s ease-in-out;
+ font-family: var(--font-family);
+ border-radius: 4px;
+ right: 0;
+ }
+
+ button.three-dot-menu-button-item:hover {
+ background: var(--primary-hover);
+ color: var(--primary-inverse);
+ }
+
+ .three-dot-menu-button {
+ background: var(--background-color);
+ border: none;
+ box-shadow: none;
+ font-size: 14px;
+ font-weight: 300;
+ line-height: 1.5em;
+ cursor: pointer;
+ transition: background 0.3s ease-in-out;
+ font-family: var(--font-family);
+ border-radius: 4px;
+ right: 0;
+ }
+
+ .conversation-button:hover .three-dot-menu {
+ display: block;
+ }
+
+ div.conversation-menu {
+ position: absolute;
+ z-index: 1;
+ top: 100%;
+ right: 0;
+ text-align: right;
+ background-color: var(--background-color);
+ border: 1px solid var(--main-text-color);
+ border-radius: 5px;
+ padding: 5px;
+ box-shadow: 0 0 11px #aaa;
+ }
+
+ div.conversation-button:hover {
+ background: var(--primary-hover);
+ color: var(--primary-inverse);
+ }
+
+ div.selected-conversation {
+ background: var(--primary-hover) !important;
+ color: var(--primary-inverse) !important;
+ }
+
@keyframes gradient {
0% {
background-position: 0% 50%;
diff --git a/src/interface/desktop/main.js b/src/interface/desktop/main.js
index a98b15c8..c4839956 100644
--- a/src/interface/desktop/main.js
+++ b/src/interface/desktop/main.js
@@ -225,7 +225,8 @@ function pushDataToKhoj (regenerate = false) {
.finally(() => {
// Syncing complete
syncing = false;
- if (win = BrowserWindow.getAllWindows()[0]) {
+ const win = BrowserWindow.getAllWindows().find(win => win.webContents.getURL().includes('config'));
+ if (win) {
win.webContents.send('update-state', state);
}
});
diff --git a/src/interface/desktop/package.json b/src/interface/desktop/package.json
index 676776b9..296afec2 100644
--- a/src/interface/desktop/package.json
+++ b/src/interface/desktop/package.json
@@ -10,7 +10,7 @@
"main": "main.js",
"private": false,
"devDependencies": {
- "electron": "25.8.4"
+ "electron": "28.2.1"
},
"scripts": {
"start": "yarn electron ."
diff --git a/src/interface/desktop/yarn.lock b/src/interface/desktop/yarn.lock
index 12929646..539bfa97 100644
--- a/src/interface/desktop/yarn.lock
+++ b/src/interface/desktop/yarn.lock
@@ -379,10 +379,10 @@ electron-updater@^4.6.1:
lodash.isequal "^4.5.0"
semver "^7.3.5"
-electron@25.8.4:
- version "25.8.4"
- resolved "https://registry.yarnpkg.com/electron/-/electron-25.8.4.tgz#b50877aac7d96323920437baf309ad86382cb455"
- integrity sha512-hUYS3RGdaa6E1UWnzeGnsdsBYOggwMMg4WGxNGvAoWtmRrr6J1BsjFW/yRq4WsJHJce2HdzQXtz4OGXV6yUCLg==
+electron@28.2.1:
+ version "28.2.1"
+ resolved "https://registry.yarnpkg.com/electron/-/electron-28.2.1.tgz#8edf2be24d97160b7eb52b7ce9a2424cf14c0791"
+ integrity sha512-wlzXf+OvOiVlBf9dcSeMMf7Q+N6DG+wtgFbMK0sA/JpIJcdosRbLMQwLg/LTwNVKIbmayqFLDp4FmmFkEMhbYA==
dependencies:
"@electron/get" "^2.0.0"
"@types/node" "^18.11.18"