Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve nav pane, chat session UI on Desktop, Web app #693

Merged
merged 17 commits into from Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
76cb543
Show title bar in Khoj desktop app on Windows
debanjum Apr 7, 2024
8159d1a
Fix showing Search navigation tab from Agent pages on web client
debanjum Apr 7, 2024
93edd54
Add Chat navigation tab back to top pane on web client
debanjum Apr 7, 2024
e45edbb
Collapse navigation tabs into icons on mobile. Add spacing to them
debanjum Apr 7, 2024
3b63084
s/aget_all_filenames_by_source/get_all_filenames_by_source as sync func
debanjum Apr 7, 2024
913dcdf
Only render first run setup message once if error or server not running
debanjum Apr 7, 2024
377e979
Make current chat expand to full width when session panel collapsed
debanjum Apr 7, 2024
94c69eb
Create API endpoint to get authenticated user information
debanjum Apr 7, 2024
8ff3890
Dynamically generate navigation menu based on user info from server
debanjum Apr 7, 2024
f56522c
Improve copy button's icon, hover color & click animation in Web UI
debanjum Apr 9, 2024
1848732
Add button to copy chat messages on Web client
debanjum Apr 9, 2024
0a5a916
Improve copy button's icon, hover color & click animation in Desktop UI
debanjum Apr 9, 2024
1c3d129
Add button to copy chat messages on Desktop client
debanjum Apr 9, 2024
cadeaac
Align conversation sessions side panel on Desktop app with Web app
debanjum Apr 10, 2024
804c04f
Do not render copy message button on every Khoj thinking step
debanjum Apr 10, 2024
60f6a1c
Use svg icons in nav pane to standardize styling on Web, Desktop apps
debanjum Apr 10, 2024
48d249d
Center the nav item text and user profile initial icons
debanjum Apr 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions src/interface/desktop/assets/icons/chat.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/interface/desktop/assets/icons/copy-button-success.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/interface/desktop/assets/icons/copy-button.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions src/interface/desktop/assets/icons/search.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 106 additions & 1 deletion src/interface/desktop/assets/khoj.css
Expand Up @@ -71,14 +71,19 @@ div.khoj-header {
gap: 20px;
padding: 24px 16px 0px 0px;
margin: 0 0 16px 0;
align-items: center;
user-select: none;
-webkit-user-select: none;
-webkit-app-region: drag;
}

/* Keeps the navigation menu clickable */
a.khoj-nav {
-webkit-app-region: no-drag;
}

div.khoj-nav {
-webkit-app-region: no-drag;
}
nav.khoj-nav {
display: grid;
grid-auto-flow: column;
Expand Down Expand Up @@ -112,12 +117,106 @@ a.khoj-logo {
a.khoj-nav-selected {
background-color: var(--primary);
}
.nav-icon {
width: 24px;
height: 24px;
}
#agents-icon {
width: 30px;
height: 30px;
}
span.khoj-nav-item-text {
padding-top: 6px;
padding-left: 8px;
}
img.khoj-logo {
width: min(60vw, 90px);
max-width: 100%;
justify-self: center;
}

/* Dropdown in navigation menu*/
#khoj-nav-menu-container {
display: flex;
align-items: center;
}
.khoj-nav-dropdown-content {
display: block;
grid-auto-flow: row;
position: absolute;
background-color: var(--background-color);
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
right: 5vw;
top: 64px;
z-index: 1;
opacity: 0;
transition: opacity 0.1s ease-in-out;
pointer-events: none;
text-align: left;
}
.khoj-nav-dropdown-content.show {
opacity: 1;
pointer-events: auto;
}
.khoj-nav-dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.khoj-nav-dropdown-content a:hover {
background-color: var(--primary-hover);
}
.khoj-nav-username {
padding: 12px 16px;
text-decoration: none;
display: block;
font-weight: bold;
}
.circle {
border-radius: 50%;
border: 3px dotted var(--main-text-color);
width: 32px;
height: 32px;
padding: 3px;
cursor: pointer;
}
.circle:hover {
background-color: var(--primary-hover);
}
.user-initial {
background-color: var(--background-color);
color: black;
display: grid;
justify-content: center;
align-items: center;
font-size: 20px;
box-sizing: unset;
width: 40px;
height: 35px;
padding-top: 8px;
}
.subscribed {
border: 3px solid var(--primary-hover);
}

@media screen and (max-width: 600px) {
.khoj-nav-dropdown-content {
display: block;
grid-auto-flow: row;
position: absolute;
background-color: var(--background-color);
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
right: 10px;
z-index: 1;
opacity: 0;
transition: opacity 0.1s ease-in-out;
pointer-events: none;
}
}

@media only screen and (max-width: 600px) {
div.khoj-header {
display: grid;
Expand All @@ -131,4 +230,10 @@ img.khoj-logo {
grid-gap: 0px;
justify-content: space-between;
}
a.khoj-nav {
padding: 0 16px;
}
span.khoj-nav-item-text {
display: none;
}
}