From 343079d24fc6b3eb737a4a6c2a33a43348a85591 Mon Sep 17 00:00:00 2001 From: muwoo <2424880409@qq.com> Date: Mon, 9 May 2022 11:04:23 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E6=94=AF=E6=8C=81=E6=96=B0?= =?UTF-8?q?=E7=9A=84api?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/preload.js | 8 ++++++++ src/main/common/api.ts | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/public/preload.js b/public/preload.js index 42a39ee..e02d2f8 100644 --- a/public/preload.js +++ b/public/preload.js @@ -145,4 +145,12 @@ window.rubick = { shellShowItemInFolder: path => { ipcSend("shellShowItemInFolder", { path }); }, + + redirect: (label, payload) => { + // todo + }, + + shellBeep: () => { + ipcSend("shellBeep") + }, }; diff --git a/src/main/common/api.ts b/src/main/common/api.ts index 7fb7b09..32187c1 100644 --- a/src/main/common/api.ts +++ b/src/main/common/api.ts @@ -249,6 +249,11 @@ export const API: any = { shell.showItemInFolder(data.path); return true; }, + + shellBeep() { + shell.beep(); + return true; + }, }; export default (mainWindow: BrowserWindow) => {