mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-12-19 05:05:44 +08:00
* feat: pnpm new * Refactor build and release workflows, update dependencies Switch build scripts and workflows from npm to pnpm, update build and artifact paths, and simplify release workflow by removing version detection and changelog steps. Add new dependencies (silk-wasm, express, ws, node-pty-prebuilt-multiarch), update exports in package.json files, and add vite config for napcat-framework. Also, rename manifest.json for framework package and fix static asset copying in shell build config.
15 lines
435 B
JavaScript
15 lines
435 B
JavaScript
const { contextBridge, ipcRenderer } = require('electron');
|
|
const napcat = {
|
|
getWebUiUrl: async () => {
|
|
return ipcRenderer.invoke('napcat_get_webui');
|
|
},
|
|
openExternalUrl: async (url) => {
|
|
ipcRenderer.send('open_external_url', url);
|
|
},
|
|
openInnerUrl: async (url) => {
|
|
ipcRenderer.send('napcat_open_inner_url', url);
|
|
},
|
|
};
|
|
// 在window对象下导出只读对象
|
|
contextBridge.exposeInMainWorld('napcat', napcat);
|