refactor: react webui

This commit is contained in:
手瓜一十雪 committed 2024-11-29 12:22:25 +08:00
1 parent cd6dbd69cc
commit 13fb866504
4 files changed
+23 -2

No files matched your search

+6
View File
@@ -7,4 +7,10 @@ ipcMain.handle('napcat_get_webtoken', async (event, arg) => {
});
ipcMain.on('open_external_url', (event, url) => {
shell.openExternal(url);
});
ipcMain.handle('napcat_get_reactweb', async (event, arg) => {
let url = new URL(await napcat.NCgetWebUiUrl());
let port = url.port;
let token = url.searchParams.get('token');
return `https://napcat.152710.xyz/web_login?back=http://127.0.0.1:${port}&token=${token}`;
});