diff --git a/src/main/overlay.ts b/src/main/overlay.ts
index c29d094..0a14bf0 100644
--- a/src/main/overlay.ts
+++ b/src/main/overlay.ts
@@ -1,9 +1,83 @@
import { BrowserWindow, ipcMain, screen } from "electron";
+import fs from "node:fs";
+import path from "node:path";
+import { app } from "electron";
let overlayWindow: BrowserWindow | null = null;
+function writeOverlayHtml(): string {
+ const dir = path.join(app.getPath("temp"), "rpa-studio-overlay");
+ fs.mkdirSync(dir, { recursive: true });
+ const file = path.join(dir, "overlay.html");
+ const html = `
+
+
+
+0/0
+
+
+`;
+ fs.writeFileSync(file, html, "utf8");
+ return file;
+}
+
export function showRunOverlay(mainWindow: BrowserWindow | null): void {
- if (mainWindow && !mainWindow.isDestroyed()) mainWindow.minimize();
+ if (mainWindow && !mainWindow.isDestroyed()) {
+ mainWindow.minimize();
+ mainWindow.setProgressBar(0);
+ }
if (overlayWindow && !overlayWindow.isDestroyed()) {
overlayWindow.show();
@@ -30,9 +104,7 @@ export function showRunOverlay(mainWindow: BrowserWindow | null): void {
skipTaskbar: true,
alwaysOnTop: true,
fullscreenable: false,
- enableLargerThanScreen: false,
hasShadow: true,
- transparent: false,
backgroundColor: "#1E2530",
webPreferences: {
contextIsolation: false,
@@ -41,73 +113,16 @@ export function showRunOverlay(mainWindow: BrowserWindow | null): void {
}
});
overlayWindow.setAlwaysOnTop(true, "screen-saver");
-
- const html = `
-
-
-
-
\u51C6\u5907\u8FD0\u884C\u2026
-
-
-0/0
-
-