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.
20 lines
606 B
JavaScript
20 lines
606 B
JavaScript
// LiteLoader需要提供部分IPC接口,以便于其他插件调用
|
||
const { ipcMain, BrowserWindow } = require('electron');
|
||
const napcat = require('./napcat.cjs');
|
||
const { shell } = require('electron');
|
||
ipcMain.handle('napcat_get_webui', async () => {
|
||
return napcat.NCgetWebUiUrl();
|
||
});
|
||
ipcMain.on('open_external_url', (event, url) => {
|
||
shell.openExternal(url);
|
||
});
|
||
ipcMain.on('napcat_open_inner_url', (event, url) => {
|
||
const win = new BrowserWindow({
|
||
autoHideMenuBar: true,
|
||
});
|
||
win.loadURL(url);
|
||
win.webContents.setWindowOpenHandler(details => {
|
||
win.loadURL(details.url);
|
||
});
|
||
});
|