chore: webui

This commit is contained in:
手瓜一十雪
2024-08-11 13:48:26 +08:00
parent 1046b68640
commit be4f59bc5e
13 changed files with 63 additions and 86 deletions

View File

@@ -1,3 +1,7 @@
//LiteLoader需要提供部分IPC接口以便于其他插件调用
const electron = require('electron');
const { ipcMain } = require('electron');
const fs = require('fs');
ipcMain.handle("napcat_get_webtoken", async (event, arg) => {
return "http://127.0.0.1:6099/webui/?token=" + JSON.parse(fs.readFileSync(__dirname + '/config/webui.json', 'utf-8').toString()).token;
});
require('./napcat.cjs');