2023-09-06 19:04:18 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0 maximum-scale=1.0">
|
2023-11-01 00:59:53 +00:00
|
|
|
<title>Khoj - Settings</title>
|
2023-09-06 19:04:18 +00:00
|
|
|
|
|
|
|
<link rel="icon" type="image/png" sizes="128x128" href="./assets/icons/favicon-128x128.png">
|
|
|
|
<link rel="manifest" href="./khoj.webmanifest">
|
|
|
|
<link rel="stylesheet" href="./assets/khoj.css">
|
|
|
|
</head>
|
2023-11-04 01:13:37 +00:00
|
|
|
<script src="./utils.js"></script>
|
2023-09-06 19:04:18 +00:00
|
|
|
|
|
|
|
<body>
|
2023-10-26 19:33:03 +00:00
|
|
|
<!--Add Header Logo and Nav Pane-->
|
|
|
|
<div class="khoj-header">
|
2023-11-03 03:40:35 +00:00
|
|
|
<a class="khoj-logo" href="./chat.html">
|
2023-10-26 19:33:03 +00:00
|
|
|
<img class="khoj-logo" src="./assets/icons/khoj-logo-sideways-500.png" alt="Khoj"></img>
|
|
|
|
</a>
|
|
|
|
<nav class="khoj-nav">
|
|
|
|
<a class="khoj-nav" href="./chat.html">💬 Chat</a>
|
2023-11-03 03:40:35 +00:00
|
|
|
<a class="khoj-nav" href="./search.html">🔎 Search</a>
|
2023-10-26 19:33:03 +00:00
|
|
|
<a class="khoj-nav khoj-nav-selected" href="./config.html">⚙️ Settings</a>
|
|
|
|
</nav>
|
2023-09-06 19:04:18 +00:00
|
|
|
</div>
|
|
|
|
<div class="section-cards">
|
2023-10-26 19:33:03 +00:00
|
|
|
<div class="card-description-row">
|
|
|
|
<div class="card configuration">
|
|
|
|
<div class="card-title-row">
|
|
|
|
<img class="card-icon" src="./assets/icons/link.svg" alt="Khoj Server URL">
|
|
|
|
<h3 class="card-title">
|
|
|
|
Server URL
|
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
<div class="card-description-row">
|
|
|
|
<input id="khoj-host-url" class="card-input" type="text">
|
|
|
|
</div>
|
|
|
|
<div class="card-title-row">
|
|
|
|
<img class="card-icon" src="./assets/icons/key.svg" alt="Khoj Access Key">
|
|
|
|
<h3 class="card-title">
|
2023-11-03 07:14:07 +00:00
|
|
|
API Key
|
2023-10-26 19:33:03 +00:00
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
<div class="card-description-row">
|
2023-11-03 07:14:07 +00:00
|
|
|
<input id="khoj-access-key" class="card-input" type="text" placeholder="Enter API key to access your Khoj">
|
2023-10-26 19:33:03 +00:00
|
|
|
</div>
|
2023-09-06 19:04:18 +00:00
|
|
|
</div>
|
2023-10-26 19:33:03 +00:00
|
|
|
</div>
|
|
|
|
<div class="card-description-row">
|
|
|
|
<div class="card configuration">
|
|
|
|
<div class="card-title-row">
|
|
|
|
<img class="card-icon" src="./assets/icons/plaintext.svg" alt="File">
|
|
|
|
<h3 class="card-title">
|
|
|
|
Files
|
|
|
|
<button id="toggle-files" class="card-button">
|
|
|
|
<svg id="toggle-files-svg" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5v14M5 12l7 7 7-7"></path></svg>
|
|
|
|
</button>
|
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
<div class="card-description-row">
|
|
|
|
<div id="current-files"></div>
|
|
|
|
</div>
|
|
|
|
<div class="card-action-row">
|
|
|
|
<button id="update-file" class="card-button">
|
|
|
|
Add
|
|
|
|
<img class="add-files-icon" src="./assets/icons/circular-add.svg" alt="Add">
|
2023-09-06 19:04:18 +00:00
|
|
|
</button>
|
2023-10-26 19:33:03 +00:00
|
|
|
</div>
|
2023-10-03 18:43:19 +00:00
|
|
|
</div>
|
2023-10-26 19:33:03 +00:00
|
|
|
</div>
|
|
|
|
<div class="card-description-row">
|
|
|
|
<div class="card configuration">
|
|
|
|
<div class="card-title-row">
|
|
|
|
<img class="card-icon" src="./assets/icons/folder.svg" alt="Folder">
|
|
|
|
<h3 class="card-title">
|
|
|
|
Folders
|
|
|
|
<button id="toggle-folders" class="card-button">
|
|
|
|
<svg id="toggle-folders-svg" xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5v14M5 12l7 7 7-7"></path></svg>
|
|
|
|
</button>
|
|
|
|
</h3>
|
|
|
|
</div>
|
|
|
|
<div class="card-description-row">
|
|
|
|
<div id="current-folders"></div>
|
|
|
|
</div>
|
|
|
|
<div class="card-action-row">
|
|
|
|
<button id="update-folder" class="card-button">
|
|
|
|
Add
|
|
|
|
<img class="add-files-icon" src="./assets/icons/circular-add.svg" alt="Add">
|
2023-09-06 19:04:18 +00:00
|
|
|
</button>
|
2023-10-26 19:33:03 +00:00
|
|
|
</div>
|
2023-09-06 19:04:18 +00:00
|
|
|
</div>
|
2023-10-26 19:33:03 +00:00
|
|
|
</div>
|
|
|
|
<div class="section-action-row">
|
2023-09-06 19:04:18 +00:00
|
|
|
<div class="card-description-row">
|
2023-11-09 21:34:27 +00:00
|
|
|
<button id="sync-force" class="sync-data">💾 Save</button>
|
2023-09-12 23:35:07 +00:00
|
|
|
</div>
|
2023-11-07 11:37:16 +00:00
|
|
|
<div class="card-description-row">
|
|
|
|
<button id="delete-all" class="sync-data">🗑️ Delete All</button>
|
|
|
|
</div>
|
2023-10-26 19:33:03 +00:00
|
|
|
</div>
|
|
|
|
<div id="loading-bar" style="display: none;"></div>
|
|
|
|
<div class="card-description-row">
|
|
|
|
<div id="sync-status"></div>
|
2023-09-06 19:04:18 +00:00
|
|
|
</div>
|
2023-11-26 06:31:23 +00:00
|
|
|
<div id="needs-subscription" style="display: none;">
|
|
|
|
Looks like you're out of space to sync your files. <a href="https://app.khoj.dev/config">Upgrade your plan</a> to unlock more space.
|
|
|
|
</div>
|
2023-09-06 19:04:18 +00:00
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
@media only screen and (max-width: 600px) {
|
|
|
|
body {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: 1fr;
|
2023-10-26 19:33:03 +00:00
|
|
|
grid-template-rows: 1fr auto;
|
2023-09-06 19:04:18 +00:00
|
|
|
font-size: small!important;
|
|
|
|
}
|
|
|
|
body > * {
|
|
|
|
grid-column: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@media only screen and (min-width: 600px) {
|
|
|
|
body {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: 1fr min(70vw, 100%) 1fr;
|
2023-10-26 19:33:03 +00:00
|
|
|
grid-template-rows: 80px auto;
|
2023-09-06 19:04:18 +00:00
|
|
|
}
|
|
|
|
body > * {
|
|
|
|
grid-column: 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
body, input {
|
|
|
|
padding: 0px;
|
|
|
|
margin: 0px;
|
2023-11-03 07:14:07 +00:00
|
|
|
background: var(--background-color);
|
2023-09-06 19:04:18 +00:00
|
|
|
color: #475569;
|
|
|
|
font-family: roboto, karma, segoe ui, sans-serif;
|
|
|
|
font-size: small;
|
|
|
|
font-weight: 300;
|
|
|
|
line-height: 1.5em;
|
|
|
|
}
|
|
|
|
body > * {
|
|
|
|
padding: 10px;
|
|
|
|
margin: 10px;
|
|
|
|
}
|
|
|
|
|
|
|
|
svg {
|
|
|
|
transition: transform 0.3s ease-in-out;
|
|
|
|
}
|
|
|
|
|
|
|
|
a.khoj-logo {
|
|
|
|
text-align: center;
|
|
|
|
}
|
2023-10-03 18:43:19 +00:00
|
|
|
|
|
|
|
#loading-bar {
|
|
|
|
height: 10px;
|
|
|
|
width: 100%;
|
|
|
|
background-color: #ddd;
|
|
|
|
position: relative;
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
#loading-bar:before {
|
|
|
|
content: "";
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
left: -200px;
|
|
|
|
width: 200px;
|
|
|
|
height: 100%;
|
|
|
|
background-color: #2980b9;
|
|
|
|
animation: loading-bar 2s linear infinite;
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes loading-bar {
|
|
|
|
0% {
|
|
|
|
left: -200px;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
left: 100%;
|
|
|
|
}
|
|
|
|
}
|
2023-09-06 19:04:18 +00:00
|
|
|
|
2023-10-26 19:33:03 +00:00
|
|
|
.card-input {
|
2023-09-06 19:04:18 +00:00
|
|
|
padding: 4px;
|
2023-11-03 07:16:11 +00:00
|
|
|
box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.3);
|
2023-09-06 19:04:18 +00:00
|
|
|
border: none;
|
2023-10-26 19:33:03 +00:00
|
|
|
width: 450px;
|
2023-09-06 19:04:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.card {
|
|
|
|
display: grid;
|
|
|
|
gap: 8px;
|
|
|
|
padding: 24px 16px;
|
2023-10-26 19:33:03 +00:00
|
|
|
width: 450px;
|
2023-11-03 07:14:07 +00:00
|
|
|
background: var(--background-color);
|
2023-09-06 19:04:18 +00:00
|
|
|
border: 1px solid rgb(229, 229, 229);
|
|
|
|
border-radius: 4px;
|
|
|
|
box-shadow: 0px 1px 3px 0px rgba(0,0,0,0.1),0px 1px 2px -1px rgba(0,0,0,0.1);
|
|
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
.section-cards {
|
|
|
|
display: grid;
|
|
|
|
gap: 16px;
|
2023-10-26 19:33:03 +00:00
|
|
|
justify-items: center;
|
2023-09-06 19:04:18 +00:00
|
|
|
margin: 0;
|
|
|
|
}
|
2023-10-26 19:33:03 +00:00
|
|
|
.section-action-row {
|
|
|
|
display: grid;
|
|
|
|
grid-auto-flow: column;
|
|
|
|
gap: 16px;
|
|
|
|
height: fit-content;
|
2023-09-06 19:04:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.card-title-row {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: auto 1fr;
|
|
|
|
padding: 0;
|
|
|
|
gap: 12px;
|
|
|
|
}
|
|
|
|
.card-icon {
|
|
|
|
width: 28px;
|
|
|
|
height: 28px;
|
|
|
|
}
|
|
|
|
.add-files-icon {
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
}
|
|
|
|
.card-title {
|
|
|
|
font-size: medium;
|
|
|
|
font-weight: normal;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
align-self: center;
|
|
|
|
}
|
|
|
|
.card-title-text {
|
|
|
|
vertical-align: middle;
|
|
|
|
}
|
|
|
|
.card-description {
|
|
|
|
margin: 0;
|
|
|
|
color: grey;
|
|
|
|
font-size: small;
|
|
|
|
}
|
|
|
|
.card-button-row {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: auto;
|
|
|
|
text-align: right;
|
|
|
|
}
|
|
|
|
.card-button {
|
|
|
|
border: none;
|
|
|
|
font-weight: bold;
|
|
|
|
color: rgb(64,64,64);
|
|
|
|
background: transparent;
|
|
|
|
font-size: small;
|
|
|
|
cursor: pointer;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
height: 32px;
|
|
|
|
text-align: right;
|
|
|
|
}
|
|
|
|
.primary-button {
|
|
|
|
border: none;
|
2023-11-03 07:14:07 +00:00
|
|
|
color: var(--background-color);
|
2023-09-06 19:04:18 +00:00
|
|
|
padding: 15px 32px;
|
|
|
|
text-align: center;
|
|
|
|
text-decoration: none;
|
|
|
|
display: inline-block;
|
|
|
|
font-size: small;
|
|
|
|
}
|
|
|
|
|
|
|
|
button.card-button.disabled {
|
2023-11-03 07:14:07 +00:00
|
|
|
color: var(--flower);
|
2023-09-06 19:04:18 +00:00
|
|
|
background: transparent;
|
|
|
|
font-size: small;
|
|
|
|
cursor: pointer;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
height: 32px;
|
|
|
|
text-align: right;
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
|
|
|
|
button.card-button.happy {
|
2023-11-03 07:14:07 +00:00
|
|
|
color: var(--leaf);
|
2023-09-06 19:04:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
img.configured-icon {
|
|
|
|
max-width: 16px;
|
|
|
|
}
|
|
|
|
|
|
|
|
div.card-action-row.enabled{
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
|
|
|
img.configured-icon.enabled {
|
|
|
|
display: inline;
|
|
|
|
}
|
|
|
|
|
|
|
|
div.card-action-row.disabled,
|
|
|
|
img.configured-icon.disabled {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
div.file-element,
|
|
|
|
div.folder-element {
|
|
|
|
display: grid;
|
2023-11-04 07:13:10 +00:00
|
|
|
grid-template-columns: auto 1fr;
|
2023-11-03 07:14:07 +00:00
|
|
|
border: 1px solid rgb(229, 229, 229);
|
|
|
|
border-radius: 4px;
|
|
|
|
box-shadow: 0px 1px 3px 0px rgba(0,0,0,0.1),0px 1px 2px -1px rgba(0,0,0,0.8);
|
2023-09-06 19:04:18 +00:00
|
|
|
padding: 4px;
|
|
|
|
margin-bottom: 8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
div.content-name {
|
|
|
|
overflow-wrap: break-word;
|
|
|
|
}
|
|
|
|
|
|
|
|
div.remove-button-container {
|
|
|
|
text-align: right;
|
|
|
|
}
|
|
|
|
|
|
|
|
button.remove-folder-button,
|
|
|
|
button.remove-file-button {
|
|
|
|
background-color: rgb(253 214 214);
|
|
|
|
border-radius: 3px;
|
|
|
|
border: none;
|
2023-11-03 07:14:07 +00:00
|
|
|
color: var(--flower);
|
2023-09-06 19:04:18 +00:00
|
|
|
padding: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
button.remove-folder-button:hover,
|
|
|
|
button.remove-file-button:hover {
|
|
|
|
background-color: rgb(255 235 235);
|
|
|
|
border-radius: 3px;
|
|
|
|
border: none;
|
2023-11-03 07:14:07 +00:00
|
|
|
color: var(--flower);
|
2023-09-06 19:04:18 +00:00
|
|
|
padding: 4px;
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
2023-11-07 05:57:37 +00:00
|
|
|
button.sync-data {
|
2023-11-29 03:51:17 +00:00
|
|
|
background-color: var(--primary-hover);
|
2023-09-06 19:04:18 +00:00
|
|
|
border: none;
|
2023-11-03 07:14:07 +00:00
|
|
|
color: var(--main-text-color);
|
2023-09-06 19:04:18 +00:00
|
|
|
padding: 12px;
|
|
|
|
text-align: center;
|
|
|
|
text-decoration: none;
|
|
|
|
display: inline-block;
|
|
|
|
font-size: 16px;
|
|
|
|
border-radius: 4px;
|
|
|
|
cursor: pointer;
|
|
|
|
transition: background-color 0.3s ease;
|
2023-11-03 07:14:07 +00:00
|
|
|
box-shadow: 0px 5px 0px var(--background-color);
|
2023-09-06 19:04:18 +00:00
|
|
|
}
|
|
|
|
|
2023-11-07 05:57:37 +00:00
|
|
|
button.sync-data:hover {
|
2023-11-29 03:51:17 +00:00
|
|
|
background-color: var(--summer-sun);
|
2023-11-03 07:14:07 +00:00
|
|
|
box-shadow: 0px 3px 0px var(--background-color);
|
2023-09-06 19:04:18 +00:00
|
|
|
}
|
2023-10-26 19:33:03 +00:00
|
|
|
.sync-force-toggle {
|
|
|
|
align-content: center;
|
|
|
|
display: grid;
|
|
|
|
grid-auto-flow: column;
|
|
|
|
gap: 4px;
|
|
|
|
}
|
2023-09-06 19:04:18 +00:00
|
|
|
</style>
|
|
|
|
<script src="./renderer.js"></script>
|
|
|
|
|
|
|
|
</html>
|