mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-07-25 13:21:04 +02:00
Add files via upload
This commit is contained in:
@@ -232,7 +232,9 @@ function showSubmenuPopup(navItem, menuId) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 初始化页面
|
// 初始化页面
|
||||||
function initPage(pageId) {
|
async function initPage(pageId) {
|
||||||
|
// 等待 i18n 就绪,避免快速刷新时翻译函数未初始化导致页面显示原始占位符 key
|
||||||
|
if (window.i18nReady) await window.i18nReady;
|
||||||
switch(pageId) {
|
switch(pageId) {
|
||||||
case 'dashboard':
|
case 'dashboard':
|
||||||
if (typeof refreshDashboard === 'function') {
|
if (typeof refreshDashboard === 'function') {
|
||||||
|
|||||||
@@ -278,6 +278,8 @@ let toolsStatusFilter = '';
|
|||||||
|
|
||||||
// 加载工具列表(分页)
|
// 加载工具列表(分页)
|
||||||
async function loadToolsList(page = 1, searchKeyword = '') {
|
async function loadToolsList(page = 1, searchKeyword = '') {
|
||||||
|
// 等待 i18n 就绪,避免快速刷新时翻译函数未初始化导致显示占位符
|
||||||
|
if (window.i18nReady) await window.i18nReady;
|
||||||
const toolsList = document.getElementById('tools-list');
|
const toolsList = document.getElementById('tools-list');
|
||||||
|
|
||||||
// 显示加载状态
|
// 显示加载状态
|
||||||
@@ -1241,6 +1243,8 @@ async function fetchExternalMCPs() {
|
|||||||
// 加载外部MCP列表并渲染
|
// 加载外部MCP列表并渲染
|
||||||
async function loadExternalMCPs() {
|
async function loadExternalMCPs() {
|
||||||
try {
|
try {
|
||||||
|
// 等待 i18n 就绪,避免快速刷新时翻译函数未初始化导致显示占位符
|
||||||
|
if (window.i18nReady) await window.i18nReady;
|
||||||
const data = await fetchExternalMCPs();
|
const data = await fetchExternalMCPs();
|
||||||
renderExternalMCPList(data.servers || {});
|
renderExternalMCPList(data.servers || {});
|
||||||
renderExternalMCPStats(data.stats || {});
|
renderExternalMCPStats(data.stats || {});
|
||||||
|
|||||||
Reference in New Issue
Block a user