refactor: react webui
This commit is contained in:
1 parent
cd6dbd69cc
commit
13fb866504
4 files changed
+23
-2
No files matched your search
@@ -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}`;
|
||||
});
|
||||
Reference in new issue
Block a user