fix(webui): add null check for plugin list in config to fix empty list issue (#4392)

This commit is contained in:
Gao Jinzhe
2026-01-11 14:39:54 +08:00
committed by GitHub
parent 6c2f738940
commit 8dfe43f22f
3 changed files with 21 additions and 1 deletions
@@ -170,7 +170,11 @@ async function loadPlugins() {
// 只显示已激活且非系统的插件,并按名称排序
pluginList.value = (response.data.data || [])
.filter(plugin => plugin.activated && !plugin.reserved)
.sort((a, b) => a.name.localeCompare(b.name))
.sort((a, b) => {
const nameA = a.name || '';
const nameB = b.name || '';
return nameA.localeCompare(nameB);
})
}
} catch (error) {
console.error('加载插件列表失败:', error)
@@ -523,5 +523,13 @@
"description": "Direct Connection Address List"
}
}
},
"help": {
"documentation": "Official Documentation",
"support": "Join Support Group",
"helpText": "Don't understand the configuration? See {documentation} or {support}.",
"helpPrefix": "Don't understand the configuration? See",
"helpMiddle": "or",
"helpSuffix": "."
}
}
@@ -521,5 +521,13 @@
"description": "直连地址列表"
}
}
},
"help": {
"documentation": "官方文档",
"support": "加群询问",
"helpText": "不了解配置?请见 {documentation} 或 {support}。",
"helpPrefix": "不了解配置?请见",
"helpMiddle": "或",
"helpSuffix": "。"
}
}