Skip to content

Commit e068b78

Browse files
committed
Update app
1 parent 5188adc commit e068b78

File tree

9 files changed

+212
-130
lines changed

9 files changed

+212
-130
lines changed

.prettierrc.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"printWidth": 120,
3+
"tabWidth": 2,
4+
"useTabs": false,
5+
"semi": true,
6+
"singleQuote": true,
7+
"trailingComma": "es5",
8+
"bracketSpacing": true,
9+
"jsxBracketSameLine": false,
10+
"arrowParens": "always",
11+
"vueIndentScriptAndStyle": true,
12+
"endOfLine": "auto"
13+
}
0 Bytes
Binary file not shown.

app/electron-builder.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,10 @@ mac:
1515
gatekeeperAssess: false
1616
entitlements: build/entitlements.mac.plist
1717
entitlementsInherit: build/entitlements.mac.plist
18-
icon: public/icon.icns
18+
icon: public/logo.icns
1919
provisioningProfile: build/wxsummarizebot.provisionprofile
20+
win:
21+
target: nsis
22+
icon: public/logo.ico
23+
publisherName: Yutou
24+
verifyUpdateCodeSignature: false

app/main/background.ts

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ if (isProd) {
2323
width: 1000,
2424
height: 800,
2525
title: '群聊总结智囊',
26+
icon: path.join(__dirname, '../public/logo.png'),
2627
});
2728

2829
if (isProd) {
@@ -33,11 +34,7 @@ if (isProd) {
3334
// mainWindow.webContents.openDevTools();
3435
}
3536

36-
37-
ipcMain.on('summarize', (event, {
38-
dateDir,
39-
chatFileName,
40-
}) => {
37+
ipcMain.on('summarize', (event, { dateDir, chatFileName }) => {
4138
const summarizeEvent = summarize(path.join(BASE_PATH, dateDir, chatFileName));
4239
summarizeEvent.addListener('update', (info) => {
4340
console.log('summarize update', info);
@@ -64,7 +61,6 @@ if (isProd) {
6461
});
6562

6663
ipcMain.on('show-config', async (event, config) => {
67-
6864
mainWindow.webContents.send('show-config', getConfig());
6965
});
7066

@@ -78,23 +74,25 @@ if (isProd) {
7874
ipcMain.on('open-url', (e, url) => {
7975
shell.openExternal(url);
8076
});
81-
ipcMain.on('send-summarize', async (e, {
82-
dateDir,
83-
chatFileName,
84-
}) => {
85-
await sendImage(chatFileName.replace('.txt', ''), path.join(BASE_PATH, dateDir, chatFileName.replace('.txt', ' 的今日群聊总结.png')));
77+
ipcMain.on('send-summarize', async (e, { dateDir, chatFileName }) => {
78+
await sendImage(
79+
chatFileName.replace('.txt', ''),
80+
path.join(BASE_PATH, dateDir, chatFileName.replace('.txt', ' 的今日群聊总结.png'))
81+
);
8682
await delay(1000);
87-
await sendAudio(chatFileName.replace('.txt', ''), path.join(BASE_PATH, dateDir, chatFileName.replace('.txt', ' 的今日群聊总结.mp3')));
83+
await sendAudio(
84+
chatFileName.replace('.txt', ''),
85+
path.join(BASE_PATH, dateDir, chatFileName.replace('.txt', ' 的今日群聊总结.mp3'))
86+
);
8887
await delay(1000);
89-
await sendText(chatFileName.replace('.txt', ''), '主人们,智囊 AI 为您奉上今日群聊总结,祝您用餐愉快!由开源项目 wx.zhinang.ai 生成');
88+
await sendText(
89+
chatFileName.replace('.txt', ''),
90+
'主人们,智囊 AI 为您奉上今日群聊总结,祝您用餐愉快!由开源项目 wx.zhinang.ai 生成'
91+
);
9092
mainWindow.webContents.send('toast', `发送成功`);
9193
});
92-
93-
9494
})();
9595

9696
app.on('window-all-closed', () => {
9797
app.quit();
9898
});
99-
100-

app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"microsoft-cognitiveservices-speech-sdk": "^1.32.0",
2424
"moment": "^2.29.4",
2525
"postcss": "^8.4.29",
26+
"prettier": "^3.0.3",
2627
"qrcode-terminal": "^0.12.0",
2728
"qrcode.react": "^3.1.0",
2829
"react-hot-toast": "^2.4.1",

app/public/logo.icns

190 KB
Binary file not shown.

app/public/logo.ico

23.5 KB
Binary file not shown.

app/public/logo.png

121 KB
Loading

0 commit comments

Comments
 (0)