nonebot-plugin-shiro-web-console 0.1.9__py3-none-any.whl → 0.1.10__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of nonebot-plugin-shiro-web-console might be problematic. Click here for more details.
- nonebot_plugin_shiro_web_console/__init__.py +1 -1
- nonebot_plugin_shiro_web_console/static/index.html +11 -2
- {nonebot_plugin_shiro_web_console-0.1.9.dist-info → nonebot_plugin_shiro_web_console-0.1.10.dist-info}/METADATA +1 -1
- nonebot_plugin_shiro_web_console-0.1.10.dist-info/RECORD +7 -0
- nonebot_plugin_shiro_web_console-0.1.9.dist-info/RECORD +0 -7
- {nonebot_plugin_shiro_web_console-0.1.9.dist-info → nonebot_plugin_shiro_web_console-0.1.10.dist-info}/WHEEL +0 -0
- {nonebot_plugin_shiro_web_console-0.1.9.dist-info → nonebot_plugin_shiro_web_console-0.1.10.dist-info}/licenses/LICENSE +0 -0
|
@@ -1307,6 +1307,8 @@
|
|
|
1307
1307
|
}
|
|
1308
1308
|
};
|
|
1309
1309
|
|
|
1310
|
+
let appInterval = null;
|
|
1311
|
+
|
|
1310
1312
|
async function initApp() {
|
|
1311
1313
|
initWS();
|
|
1312
1314
|
await fetchChats();
|
|
@@ -1317,9 +1319,11 @@
|
|
|
1317
1319
|
|
|
1318
1320
|
showPage('home');
|
|
1319
1321
|
// 定时刷新状态
|
|
1320
|
-
|
|
1322
|
+
if (appInterval) clearInterval(appInterval);
|
|
1323
|
+
appInterval = setInterval(() => {
|
|
1321
1324
|
if (document.getElementById('page-home').classList.contains('active')) fetchStatus();
|
|
1322
|
-
|
|
1325
|
+
// 日志已通过 WebSocket 推送,不再轮询,避免刷屏
|
|
1326
|
+
// if (document.getElementById('page-logs').classList.contains('active')) fetchLogs();
|
|
1323
1327
|
}, 5000);
|
|
1324
1328
|
}
|
|
1325
1329
|
|
|
@@ -1343,6 +1347,11 @@
|
|
|
1343
1347
|
|
|
1344
1348
|
// 初始化 WebSocket
|
|
1345
1349
|
function initWS() {
|
|
1350
|
+
if (ws) {
|
|
1351
|
+
ws.onclose = null; // 防止触发重连
|
|
1352
|
+
ws.close();
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1346
1355
|
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
1347
1356
|
// 添加 token 参数防止连接被服务端拒绝 (code 1008)
|
|
1348
1357
|
const wsUrl = `${protocol}//${window.location.host}/web_console/ws?token=${authToken}`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nonebot-plugin-shiro-web-console
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.10
|
|
4
4
|
Summary: 一个用于 NoneBot2 的网页控制台插件,支持通过浏览器查看日志和发送消息
|
|
5
5
|
Project-URL: Homepage, https://github.com/luojisama/nonebot-plugin-shiro-web-console
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/luojisama/nonebot-plugin-shiro-web-console/issues
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
nonebot_plugin_shiro_web_console/__init__.py,sha256=Ea03KJC-C2VF1GibNg6JlNujtabq6-5iQ0etzldngEo,41226
|
|
2
|
+
nonebot_plugin_shiro_web_console/config.py,sha256=LqHht8N5CuSMyBbEjzyJgfZtg05cvBlpGn_2MgTjt-g,202
|
|
3
|
+
nonebot_plugin_shiro_web_console/static/index.html,sha256=X4ii96HJ5mefyUk3OnitcMYsgCdjlbpOvsp6Co7LpiA,80569
|
|
4
|
+
nonebot_plugin_shiro_web_console-0.1.10.dist-info/METADATA,sha256=TJ8kOAPygKe9idmz43LoFS5MpgHd4lV4JO305nqW2x4,1980
|
|
5
|
+
nonebot_plugin_shiro_web_console-0.1.10.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
6
|
+
nonebot_plugin_shiro_web_console-0.1.10.dist-info/licenses/LICENSE,sha256=WedEfsrQQfoZsmbJHIAPn4UY_IcpavYULMV5in_ZPbg,1066
|
|
7
|
+
nonebot_plugin_shiro_web_console-0.1.10.dist-info/RECORD,,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
nonebot_plugin_shiro_web_console/__init__.py,sha256=fVHe5spU8pL3Ijg2HgF3k5oR9v6ZQ3dLiaIPpviZ34o,41225
|
|
2
|
-
nonebot_plugin_shiro_web_console/config.py,sha256=LqHht8N5CuSMyBbEjzyJgfZtg05cvBlpGn_2MgTjt-g,202
|
|
3
|
-
nonebot_plugin_shiro_web_console/static/index.html,sha256=47BThvsWr9LSgz61f6jSMD6tBj83nPQqltl2_6vahgM,80258
|
|
4
|
-
nonebot_plugin_shiro_web_console-0.1.9.dist-info/METADATA,sha256=8iSuWlmyiiLUwW0K8iBsObH28NOMPR4paVbxlZYi9t8,1979
|
|
5
|
-
nonebot_plugin_shiro_web_console-0.1.9.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
6
|
-
nonebot_plugin_shiro_web_console-0.1.9.dist-info/licenses/LICENSE,sha256=WedEfsrQQfoZsmbJHIAPn4UY_IcpavYULMV5in_ZPbg,1066
|
|
7
|
-
nonebot_plugin_shiro_web_console-0.1.9.dist-info/RECORD,,
|
|
File without changes
|