Add files via upload

This commit is contained in:
公明
2026-04-14 19:28:17 +08:00
committed by GitHub
parent b1ac985c28
commit 9331fbfea1
2 changed files with 8 additions and 2 deletions
+3 -1
View File
@@ -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) {
case 'dashboard':
if (typeof refreshDashboard === 'function') {
+5 -1
View File
@@ -278,8 +278,10 @@ let toolsStatusFilter = '';
// 加载工具列表(分页)
async function loadToolsList(page = 1, searchKeyword = '') {
// 等待 i18n 就绪,避免快速刷新时翻译函数未初始化导致显示占位符
if (window.i18nReady) await window.i18nReady;
const toolsList = document.getElementById('tools-list');
// 显示加载状态
if (toolsList) {
// 清空整个容器,包括可能存在的分页控件
@@ -1241,6 +1243,8 @@ async function fetchExternalMCPs() {
// 加载外部MCP列表并渲染
async function loadExternalMCPs() {
try {
// 等待 i18n 就绪,避免快速刷新时翻译函数未初始化导致显示占位符
if (window.i18nReady) await window.i18nReady;
const data = await fetchExternalMCPs();
renderExternalMCPList(data.servers || {});
renderExternalMCPStats(data.stats || {});