UI/UX improvements
This commit is contained in:
@@ -73,6 +73,49 @@ body {
|
|||||||
box-shadow: var(--panel-shadow);
|
box-shadow: var(--panel-shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.panel-summary {
|
||||||
|
list-style: none;
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
justify-content: flex-start;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-summary::-webkit-details-marker {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-caret {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 16px;
|
||||||
|
justify-content: center;
|
||||||
|
color: var(--muted);
|
||||||
|
font-weight: 700;
|
||||||
|
font-family: "Segoe UI Symbol", "Apple Symbols", system-ui, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-caret .caret-open {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel[open] .panel-caret .caret-open {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel[open] .panel-caret .caret-closed {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel-body {
|
||||||
|
margin-top: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.panel[open] .panel-summary {
|
||||||
|
margin-bottom: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
.row {
|
.row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -16,72 +16,118 @@
|
|||||||
<button id="saveBtn" class="accent">Save Settings</button>
|
<button id="saveBtn" class="accent">Save Settings</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<section class="panel">
|
<details class="panel">
|
||||||
<div class="row">
|
<summary class="panel-summary">
|
||||||
|
<span class="panel-caret" aria-hidden="true">
|
||||||
|
<span class="caret-closed">▸</span>
|
||||||
|
<span class="caret-open">▾</span>
|
||||||
|
</span>
|
||||||
<h2>API</h2>
|
<h2>API</h2>
|
||||||
<button id="resetApiBtn" class="ghost" type="button">Reset to OpenAI</button>
|
</summary>
|
||||||
</div>
|
<div class="panel-body">
|
||||||
<div class="field">
|
<div class="row">
|
||||||
<label for="apiKey">API Key</label>
|
<div></div>
|
||||||
<div class="inline">
|
<button id="resetApiBtn" class="ghost" type="button">Reset to OpenAI</button>
|
||||||
<input id="apiKey" type="password" autocomplete="off" placeholder="sk-..." />
|
</div>
|
||||||
<button id="toggleKey" class="ghost" type="button">Show</button>
|
<div class="field">
|
||||||
|
<label for="apiKey">API Key</label>
|
||||||
|
<div class="inline">
|
||||||
|
<input id="apiKey" type="password" autocomplete="off" placeholder="sk-..." />
|
||||||
|
<button id="toggleKey" class="ghost" type="button">Show</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label for="apiBaseUrl">API Base URL</label>
|
||||||
|
<input
|
||||||
|
id="apiBaseUrl"
|
||||||
|
type="text"
|
||||||
|
placeholder="https://api.openai.com/v1"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label for="apiKeyHeader">API Key Header</label>
|
||||||
|
<input id="apiKeyHeader" type="text" placeholder="Authorization" />
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label for="apiKeyPrefix">API Key Prefix</label>
|
||||||
|
<input id="apiKeyPrefix" type="text" placeholder="Bearer " />
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label for="model">Model name</label>
|
||||||
|
<input id="model" type="text" placeholder="gpt-4o-mini" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
</details>
|
||||||
<label for="apiBaseUrl">API Base URL</label>
|
|
||||||
<input
|
|
||||||
id="apiBaseUrl"
|
|
||||||
type="text"
|
|
||||||
placeholder="https://api.openai.com/v1"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<label for="apiKeyHeader">API Key Header</label>
|
|
||||||
<input id="apiKeyHeader" type="text" placeholder="Authorization" />
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<label for="apiKeyPrefix">API Key Prefix</label>
|
|
||||||
<input id="apiKeyPrefix" type="text" placeholder="Bearer " />
|
|
||||||
</div>
|
|
||||||
<div class="field">
|
|
||||||
<label for="model">Model name</label>
|
|
||||||
<input id="model" type="text" placeholder="gpt-4o-mini" />
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="panel">
|
<details class="panel">
|
||||||
<h2>Appearance</h2>
|
<summary class="panel-summary">
|
||||||
<div class="field">
|
<span class="panel-caret" aria-hidden="true">
|
||||||
<label for="themeSelect">Theme</label>
|
<span class="caret-closed">▸</span>
|
||||||
<select id="themeSelect">
|
<span class="caret-open">▾</span>
|
||||||
<option value="system">System</option>
|
</span>
|
||||||
<option value="light">Light</option>
|
<h2>Appearance</h2>
|
||||||
<option value="dark">Dark</option>
|
</summary>
|
||||||
</select>
|
<div class="panel-body">
|
||||||
|
<div class="field">
|
||||||
|
<label for="themeSelect">Theme</label>
|
||||||
|
<select id="themeSelect">
|
||||||
|
<option value="system">System</option>
|
||||||
|
<option value="light">Light</option>
|
||||||
|
<option value="dark">Dark</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</details>
|
||||||
|
|
||||||
<section class="panel">
|
<details class="panel">
|
||||||
<h2>System Prompt</h2>
|
<summary class="panel-summary">
|
||||||
<textarea id="systemPrompt" rows="8" placeholder="Define tone and standards..."></textarea>
|
<span class="panel-caret" aria-hidden="true">
|
||||||
</section>
|
<span class="caret-closed">▸</span>
|
||||||
|
<span class="caret-open">▾</span>
|
||||||
|
</span>
|
||||||
|
<h2>System Prompt</h2>
|
||||||
|
</summary>
|
||||||
|
<div class="panel-body">
|
||||||
|
<textarea
|
||||||
|
id="systemPrompt"
|
||||||
|
rows="8"
|
||||||
|
placeholder="Define tone and standards..."
|
||||||
|
></textarea>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
|
||||||
<section class="panel">
|
<details class="panel">
|
||||||
<h2>Resume</h2>
|
<summary class="panel-summary">
|
||||||
<textarea id="resume" rows="10" placeholder="Paste your resume text..."></textarea>
|
<span class="panel-caret" aria-hidden="true">
|
||||||
</section>
|
<span class="caret-closed">▸</span>
|
||||||
|
<span class="caret-open">▾</span>
|
||||||
|
</span>
|
||||||
|
<h2>Resume</h2>
|
||||||
|
</summary>
|
||||||
|
<div class="panel-body">
|
||||||
|
<textarea id="resume" rows="10" placeholder="Paste your resume text..."></textarea>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
|
||||||
<section class="panel">
|
<details class="panel">
|
||||||
<div class="row">
|
<summary class="panel-summary">
|
||||||
|
<span class="panel-caret" aria-hidden="true">
|
||||||
|
<span class="caret-closed">▸</span>
|
||||||
|
<span class="caret-open">▾</span>
|
||||||
|
</span>
|
||||||
<div class="row-title">
|
<div class="row-title">
|
||||||
<h2>Task Presets</h2>
|
<h2>Task Presets</h2>
|
||||||
<span class="hint hint-accent">Top task is the default</span>
|
<span class="hint hint-accent">Top task is the default</span>
|
||||||
</div>
|
</div>
|
||||||
<button id="addTaskBtn" class="ghost" type="button">Add Task</button>
|
</summary>
|
||||||
|
<div class="panel-body">
|
||||||
|
<div class="row">
|
||||||
|
<div></div>
|
||||||
|
<button id="addTaskBtn" class="ghost" type="button">Add Task</button>
|
||||||
|
</div>
|
||||||
|
<div id="tasks" class="tasks"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="tasks" class="tasks"></div>
|
</details>
|
||||||
</section>
|
|
||||||
|
|
||||||
<script src="settings.js"></script>
|
<script src="settings.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -255,7 +255,13 @@ async function saveSettings() {
|
|||||||
|
|
||||||
saveBtn.addEventListener("click", () => void saveSettings());
|
saveBtn.addEventListener("click", () => void saveSettings());
|
||||||
addTaskBtn.addEventListener("click", () => {
|
addTaskBtn.addEventListener("click", () => {
|
||||||
tasksContainer.appendChild(buildTaskCard({ id: newTaskId(), name: "", text: "" }));
|
const newCard = buildTaskCard({ id: newTaskId(), name: "", text: "" });
|
||||||
|
const first = tasksContainer.firstElementChild;
|
||||||
|
if (first) {
|
||||||
|
tasksContainer.insertBefore(newCard, first);
|
||||||
|
} else {
|
||||||
|
tasksContainer.appendChild(newCard);
|
||||||
|
}
|
||||||
updateTaskControls();
|
updateTaskControls();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user