1
0

Refactor settings menu and add autostart/close-to-tray options

This commit is contained in:
2025-05-25 00:02:04 +02:00
parent d72f661548
commit 84e133ac10
3 changed files with 56 additions and 11 deletions

View File

@@ -149,6 +149,15 @@
const ok = document.getElementById('okBtn');
const cancel = document.getElementById('cancelBtn');
const close = document.getElementById('closeBtn');
const cbAutostart = document.getElementById('autostart');
const cbCloseToTray= document.getElementById('closeToTray');
const [initialAutostart, initialCloseToTray] = await Promise.all([
window.settingsAPI.getAutostart(),
window.settingsAPI.getCloseToTray()
]);
cbAutostart.checked = initialAutostart;
cbCloseToTray.checked = initialCloseToTray;
// Initialwerte parallel laden
const [initialSky, initialSkip, initialThreshold] = await Promise.all([
@@ -284,7 +293,14 @@
<!-- Hier kommt das Model-Selector-HTML rein -->
<div id="ollama-model-selectors"></div>
</div>
<label class="option">
<input type="checkbox" id="autostart" />
Launch on System start
</label>
<label class="option">
<input type="checkbox" id="closeToTray" checked />
Close to Tray
</label>
<!-- Weitere Optionen in Zukunft hier hinzufügen -->
</div>
<div class="buttons">