feat: 顶栏新增「系统」栏目——数据备份导出/导入恢复子分栏(仅管理员)
monitor.html:导航 .tabs 追加「系统」(data-perm=admin) + #tab-system 面板, 内含「数据备份 / 导入恢复」两个子分栏;base.js _activeSubs 记忆子分栏并在 showTab 里切回;system.js:导出(含 APK 勾选→zip 下载)、导入(选文件→ 校验预览:文件/schema/表行数/告警→确认应用,原生 confirm),全程含 「全量快照含密钥」警告与重启生效提示。
This commit is contained in:
@@ -102,11 +102,12 @@ function showTab(name){
|
||||
if(name==='logs'){loadLogs();if(document.getElementById('log-auto').checked)_logTimer=setInterval(loadLogs,3000);}
|
||||
if(name==='agent' && typeof initAgentChat==='function') initAgentChat();
|
||||
if(name==='users')loadUsers();
|
||||
if(name==='system'){showSubTab('system',_activeSubs.system||'backup');}
|
||||
}
|
||||
|
||||
// ================== 页内子分栏(任务/工具 通用) ==================
|
||||
// 每个带子分栏的 Tab 记住上次选中的子分栏,切走再切回来保持原位
|
||||
let _activeSubs = {tasks: 'plan', tools: 'clipboard'};
|
||||
let _activeSubs = {tasks: 'plan', tools: 'clipboard', system: 'backup'};
|
||||
let _discoveryTimer = null; // 设备自动发现 10s 轮询(仅 devpool 子分栏激活时)
|
||||
|
||||
function showSubTab(tabId, name){
|
||||
|
||||
Reference in New Issue
Block a user