summaryrefslogtreecommitdiff
path: root/src/renderer/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/renderer/index.ts')
-rw-r--r--src/renderer/index.ts35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/renderer/index.ts b/src/renderer/index.ts
index f83bd3f..c5729de 100644
--- a/src/renderer/index.ts
+++ b/src/renderer/index.ts
@@ -1,39 +1,36 @@
-import { ipcRenderer } from 'electron';
+import { ipcRenderer } from "electron";
-const quitBtn = document.getElementById('quit');
+const quitBtn = document.getElementById("quit");
-quitBtn.addEventListener('click', () => {
- ipcRenderer.send('quit');
+quitBtn.addEventListener("click", () => {
+ ipcRenderer.send("quit");
});
-const minimizeBtn = document.getElementById('minimize');
+const minimizeBtn = document.getElementById("minimize");
-minimizeBtn.addEventListener('click', () => {
+minimizeBtn.addEventListener("click", () => {
minimizeBtn.blur();
- ipcRenderer.send('minimize');
+ ipcRenderer.send("minimize");
});
document.ondragover = document.ondrop = (event) => {
event.preventDefault();
};
-
-const debugBtn = document.getElementById('debug');
+const debugBtn = document.getElementById("debug");
//debugBtn.hidden = true;
-debugBtn.addEventListener('click', () => {
+debugBtn.addEventListener("click", () => {
debugBtn.blur();
- ipcRenderer.send('debug');
+ ipcRenderer.send("debug");
});
-const activityLabel = document.getElementById('activity');
-const progressBar = document.getElementById('progress') as HTMLProgressElement;
-ipcRenderer.on('status-update', (event:any, status:any) => {
+const activityLabel = document.getElementById("activity");
+const progressBar = document.getElementById("progress") as HTMLProgressElement;
+ipcRenderer.on("status-update", (event: any, status: any) => {
activityLabel.innerText = status.activity;
- if(status.ActivityIsError)
- activityLabel.classList.add("error");
- else
- activityLabel.classList.remove("error");
+ if (status.ActivityIsError) activityLabel.classList.add("error");
+ else activityLabel.classList.remove("error");
progressBar.value = status.progress;
-})
+});