Skip to content

Commit e804e4b

Browse files
committed
feat: rename folders
1 parent e4ce2d0 commit e804e4b

3 files changed

Lines changed: 36 additions & 2 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<title>Backend Logs</title>
5+
<style>
6+
body {
7+
background: #1e1e1e;
8+
color: #d4d4d4;
9+
font-family: monospace;
10+
}
11+
#log-container {
12+
white-space: pre-wrap;
13+
padding: 10px;
14+
}
15+
</style>
16+
</head>
17+
<body>
18+
<div id="log-container"></div>
19+
20+
<script>
21+
const container = document.getElementById("log-container");
22+
23+
// Use the API exposed in preload.js
24+
window.electronAPI.onLog((data) => {
25+
const entry = document.createElement("div");
26+
27+
// Use innerHTML to render the colors, but be careful of XSS if logs are untrusted
28+
entry.innerHTML = data;
29+
container.appendChild(entry);
30+
container.scrollTop = container.scrollHeight;
31+
});
32+
</script>
33+
</body>
34+
</html>

electron-app/src/windows/logWindow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const createLogWindow = (screenWidth, screenHeight) => {
2020
},
2121
});
2222

23-
const logFilePath = path.join(appPath, "src", "logs", "logs.html");
23+
const logFilePath = path.join(appPath, "src", "log-viewer", "index.html");
2424
logWindow.loadFile(logFilePath);
2525

2626
return logWindow;

electron-app/src/windows/mainWindow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ function createWindow(screenWidth, screenHeight) {
5252

5353
// Create application menu
5454
const menu = createMenu(mainWindow);
55-
mainWindow.setApplicationMenu(menu);
55+
mainWindow.setMenu(menu);
5656

5757
// Open DevTools in development mode
5858
if (!app.isPackaged) {

0 commit comments

Comments
 (0)