feat: hash路由 + 插件页面内联加载 + 侧边栏插件面板展开项

- Hash路由: #/dashboard #/files #/plugins/xxx 支持刷新保持/前进后退
- 登录过期保留hash,登录后自动跳回原页面
- 插件WebUI页面内联加载到page-container(不再弹新窗)
- 插件页面HTML自动处理: style提取/body剥离/script执行/padding归零
- 侧边栏新增「插件面板」可折叠项,展开列出所有已注册插件页面
- 内存卡片显示 已用/总容量(百分比右侧)
- 插件开发指南新增 2.6 WebUI页面开发章节

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
qinglong
2026-06-11 20:56:39 +08:00
parent eeca8e37e1
commit 99c3e3e853
10 changed files with 330 additions and 82 deletions
+5 -1
View File
@@ -27,7 +27,11 @@
credentials: 'include', body: JSON.stringify({username: u, password: p})
});
const data = await res.json();
if(res.ok && data.success) window.location.href = './home.html';
if(res.ok && data.success) {
var hash = sessionStorage.getItem('sensu_redirect_hash') || '';
sessionStorage.removeItem('sensu_redirect_hash');
window.location.href = './home.html' + hash;
}
else err.textContent = data.msg || "凭证错误";
} catch(e) { err.textContent = "网络异常"; }
}