diff --git a/README.md b/README.md index 3f16a2f..af97db7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ 任何使用问题、bug、功能需求可以提 issue。 -左侧 release 中下载 exe 即可,因为没有 mac 设备所以没法打包 mac 版本,如有需要可阅读 development.md 自行打包。 +右侧 release 中下载 exe 即可,因为没有 mac 设备所以没法打包 mac 版本,如有需要可阅读 development.md 自行打包。 ## 使用介绍 @@ -66,10 +66,14 @@ 配置工具主题色和切换亮色、暗色模式 -## 后续功能 +## 其它功能 + +### 导出棉花糖 -### 屏蔽词划分房间 +将棉花糖图片导出,支持单独导出中文、翻译、合并样式,且合并样式支持 + +## 后续功能 -注:此功能非添加/删除房间的屏蔽词,而是将屏蔽词处理为可发送弹幕 +### 导出视频鉴赏 -该功能主要针对 b 站的屏蔽词,如果是针对某个直播间设置的屏蔽词,毕竟都被屏蔽了感觉同传时候也不怎么会遇得所以在纠结要不要加 +将 Bilibili 某动态下的视频捕获,筛选过后导出 Excel 文档 diff --git a/package.json b/package.json index f09fcbf..a3c909f 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint", - "electron:build": "vue-cli-service electron:build -p always", + "electron:build": "vue-cli-service electron:build ", "electron:serve": "vue-cli-service electron:serve", "postinstall": "electron-builder install-app-deps", "postuninstall": "electron-builder install-app-deps" diff --git a/src/ipc.js b/src/ipc.js index 29a3e92..cff4b19 100644 --- a/src/ipc.js +++ b/src/ipc.js @@ -1,4 +1,4 @@ -import { ipcMain, BrowserWindow } from "electron"; +import { ipcMain, BrowserWindow, dialog } from "electron"; import { SendComment, Bilibili, @@ -12,7 +12,7 @@ import { RemoveSilentUser, } from "./plugins/axios"; import { e } from "./plugins/utils"; -import { writeFile, mkdir, stat } from "fs/promises"; +import { writeFile, mkdir } from "fs/promises"; import createWindow from "./background"; import { join } from "path"; @@ -134,12 +134,23 @@ ipcMain.handle("CutWord", async (event, phrase) => { ipcMain.on("OtherWindow", (event, page) => { const wins = BrowserWindow.getAllWindows(); if (wins.length < 2) - createWindow(page, { width: 1500, height: 1080, alwaysOnTop: false }); + createWindow(page, { + width: 1920, + height: 1080, + x: 0, + y: 0, + alwaysOnTop: false, + }); }); ipcMain.on("SaveImage", async (event, Base64) => { const time = Date.now(); - const folder = join(__dirname, "./images"); - await mkdir(folder, { recursive: true }); - await writeFile(join(folder, `${time}.png`), Base64, { encoding: "base64" }); + const { filePath } = await dialog.showSaveDialog({ + defaultPath: `${time}.png`, + filters: [{ name: "Images", extensions: ["jpg", "png", "gif"] }], + }); + if (filePath) + await writeFile(filePath, Base64, { + encoding: "base64", + }); });