1
0

auto-git:

[change] main.js
This commit is contained in:
2025-06-01 09:42:48 +02:00
parent 1c30ab5c8d
commit fe0d2a9526

30
main.js
View File

@@ -26,39 +26,13 @@ folders = folders.map(f => ({
store.set('folders', folders);
console.log("Startup-Folders:", store.get('folders'));
let tray = null;
let isQuiting = false;
function createTray(win) {
const iconPath = path.join(__dirname, 'assets/icon/trayicon.png');
const icon = nativeImage.createFromPath(iconPath);
// Standard-Größen je nach OS
let size;
switch (process.platform) {
case 'darwin': // macOS
size = { width: 22, height: 22 };
break;
case 'win32': // Windows
size = { width: 16, height: 16 };
break;
default: // Linux / other
size = { width: 24, height: 24 };
}
const trayImage = icon.resize(size);
const tray = new Tray(trayImage);
tray.setToolTip('Auto-Git läuft im Hintergrund');
tray.on('double-click', () => {
win.show();
win.focus();
});
return tray;
}
if (Array.isArray(folders)) {
folders = folders.map(f => ({