diff --git a/wwcompanion-extension/settings.css b/wwcompanion-extension/settings.css index 67ded54..3d0c33d 100644 --- a/wwcompanion-extension/settings.css +++ b/wwcompanion-extension/settings.css @@ -73,6 +73,49 @@ body { 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 { display: flex; align-items: center; diff --git a/wwcompanion-extension/settings.html b/wwcompanion-extension/settings.html index 5b7c1ec..4a144af 100644 --- a/wwcompanion-extension/settings.html +++ b/wwcompanion-extension/settings.html @@ -16,72 +16,118 @@ -
-
+
+ +

API

- -
-
- -
- - + +
+
+
+ +
+
+ +
+ + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ +
-
- - -
-
- - -
-
- - -
-
- - -
-
+ -
-

Appearance

-
- - +
+ + +

Appearance

+
+
+
+ + +
-
+ -
-

System Prompt

- -
+
+ + +

System Prompt

+
+
+ +
+
-
-

Resume

- -
+
+ + +

Resume

+
+
+ +
+
-
-
+
+ +

Task Presets

Top task is the default
- +
+
+
+
+ +
+
-
-
+ diff --git a/wwcompanion-extension/settings.js b/wwcompanion-extension/settings.js index c382a45..1c1adf4 100644 --- a/wwcompanion-extension/settings.js +++ b/wwcompanion-extension/settings.js @@ -255,7 +255,13 @@ async function saveSettings() { saveBtn.addEventListener("click", () => void saveSettings()); 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(); });