feat: dynamic status bar #94

This commit is contained in:
leukipp
2025-10-06 18:55:51 +02:00
parent 4bcb2c4e89
commit 3e4d96536f
6 changed files with 344 additions and 78 deletions
+7 -5
View File
@@ -32,8 +32,8 @@
align-items: center;
width: 100vw;
height: 100vh;
padding: 0 30px;
column-gap: 20px;
padding: 0 10px;
column-gap: 10px;
list-style-type: none;
border-top: 1px solid var(--border-color);
background: var(--background-color);
@@ -74,6 +74,7 @@
padding: 6px 10px;
border-radius: 4px;
font-size: 18px;
font-family: sans-serif;
outline: none;
border: none;
cursor: text;
@@ -186,7 +187,7 @@
ipcRenderer.send("button-click", { id: e.target.id });
});
});
document.querySelectorAll("input").forEach((input) => {
document.querySelectorAll("input").forEach((input) => {
input.addEventListener("blur", (e) => {
ipcRenderer.send("input-blur", { id: e.target.id });
});
@@ -207,7 +208,7 @@
});
ipcRenderer.on("button-hidden", (e, button) => {
document.getElementById(button.id).parentNode.classList.toggle("hidden", button.hidden);
});
});
ipcRenderer.on("input-readonly", (e, input) => {
document.getElementById(input.id).readOnly = input.readonly;
});
@@ -216,10 +217,11 @@
document.getElementById(input.id).placeholder = input.placeholder;
});
ipcRenderer.on("input-select", (e, input) => {
window.getSelection()?.removeAllRanges();
if (input.select) {
document.getElementById(input.id).select();
} else {
window.getSelection()?.removeAllRanges();
document.getElementById(input.id).blur();
}
});
ipcRenderer.on("data-theme", (e, data) => {