feat: Added Always on Top Toggle. Closes #5

This commit is contained in:
2026-10-08 11:00:40 -04:00
parent 1df9c2f00c
commit aaeb7636a1
5 changed files with 25 additions and 3 deletions
+4
View File
@@ -200,6 +200,10 @@
<div id="status-bar">
<span class="status-bar-item" id="status-bar-version">Argus</span>
<button id="btn-changelog" class="status-bar-btn">Changelog</button>
<label class="toggle-label status-bar-toggle">
<input type="checkbox" id="chk-always-on-top" />
<span>Always on Top</span>
</label>
<select id="theme-picker" class="theme-picker">
<option value="cyber">Cyber</option>
<option value="midnight">Midnight</option>
+9 -2
View File
@@ -1139,9 +1139,9 @@ const monitorTab = (() => {
input.addEventListener('blur', save);
input.addEventListener('keydown', function (ev) {
if (ev.key === 'Enter') save();
if (ev.key === 'Escape')
if (ev.key === 'Escape')
editingLabel = false;
render();
render();
});
});
@@ -1255,6 +1255,13 @@ window.addEventListener('DOMContentLoaded', () => {
updater.init();
changelog.init();
theme.init();
// Always on top toggle
document.getElementById('chk-always-on-top').addEventListener('change', function (e) {
if (window.__TAURI__ && window.__TAURI__.window) {
var current = window.__TAURI__.window.getCurrentWindow();
current.setAlwaysOnTop(e.target.checked);
}
});
document.getElementById('btn-export-all').addEventListener('click', exporter.csvAll);
document.getElementById('btn-export-up').addEventListener('click', exporter.csvUp);
console.log('[Argus] Ready');
+9
View File
@@ -1514,4 +1514,13 @@ body {
border: 1px solid var(--cyan);
border-radius: var(--radius);
outline: none;
}
.status-bar-toggle {
font-size: 11px;
color: var(--text-muted);
}
.status-bar-toggle input:checked+span {
color: var(--cyan);
}