Skip to content

Commit 92dbc7b

Browse files
committed
fix: notification icon
1 parent a409d38 commit 92dbc7b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

main.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ let stopRequested = false;
1212

1313
// Mask Electron User-Agent
1414
app.userAgentFallback = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36";
15+
app.setAppUserModelId('股東會投票幫手');
1516

1617
function getConfig() {
1718
const CONFIG_PATH = path.join(app.getPath('userData'), 'config.json');
@@ -154,14 +155,13 @@ ipcMain.handle('start-voting', async (event, params) => {
154155
if (!mainWindow || mainWindow.isDestroyed()) return { success: true };
155156

156157
mainWindow.setTitle('股東會投票幫手');
157-
if (stats) {
158-
sendLog(`[系統] 完成。累計投票: ${stats.voted},累計截圖: ${stats.screenshoted}`);
159-
}
158+
const msg = `累計投票: ${stats.voted},累計截圖: ${stats.screenshoted}`;
159+
sendLog(`[系統] 完成。${msg}`);
160160

161161
if (!mainWindow.isFocused() && Notification.isSupported()) {
162162
new Notification({
163163
title: '投票完成',
164-
body: '所有作業已結束。',
164+
body: msg,
165165
icon: path.join(__dirname, 'assets/icons/icon.png'),
166166
}).show();
167167
}

0 commit comments

Comments
 (0)