修复bug
This commit is contained in:
@@ -270,8 +270,11 @@
|
||||
else parts.push("中控未设 HUB_BRIDGE_TOKEN(实例需 APP_AUTH_DISABLED 或同令牌)");
|
||||
if (m.public_origin) parts.push("浏览器外链基址: " + m.public_origin);
|
||||
else parts.push("未设 HUB_PUBLIC_ORIGIN(复盘链接仅本机可开)");
|
||||
if ((m.env_disabled_ids || []).length)
|
||||
parts.push("环境强制关闭 id: " + m.env_disabled_ids.join(", "));
|
||||
if ((m.env_disabled_ids || []).length) {
|
||||
parts.push("环境强制关闭 id: " + m.env_disabled_ids.join(", ") + "(改 .env 后须重启 hub)");
|
||||
} else {
|
||||
parts.push("HUB_DISABLED_IDS 未强制关闭任何账户");
|
||||
}
|
||||
el.textContent = parts.join(" · ");
|
||||
} catch (_) {}
|
||||
}
|
||||
@@ -361,7 +364,13 @@
|
||||
const j = await r.json();
|
||||
if (j.ok) {
|
||||
showToast("设置已保存(已写入 hub_settings.json)");
|
||||
await loadSettingsUI();
|
||||
if (j.settings) {
|
||||
settingsCache = j.settings;
|
||||
renderSettingsList(j.settings);
|
||||
loadSettingsMetaLine();
|
||||
} else {
|
||||
await loadSettingsUI();
|
||||
}
|
||||
} else showToast("保存失败", true);
|
||||
} catch (e) {
|
||||
showToast(String(e), true);
|
||||
@@ -395,10 +404,12 @@
|
||||
});
|
||||
settingsCache = data;
|
||||
renderSettingsList(data);
|
||||
showToast("已添加一行,请填写 URL 后点「保存设置」");
|
||||
};
|
||||
|
||||
initAuth().then((ok) => {
|
||||
if (!ok) return;
|
||||
loadSettings().catch(() => {});
|
||||
setActiveNav();
|
||||
window.addEventListener("popstate", setActiveNav);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user