Refactor axios.js and Vue components to conditionally handle namespace settings based on server provider. Update request headers in axios.js to include site key and namespace password only for specific providers. Enhance NamespaceAccess and NamespaceSettingsCard components to show/hide based on provider, and streamline password management functionality.

This commit is contained in:
SunWuyuan
2025-05-18 15:09:10 +08:00
parent 31cff8a867
commit 4691114f9b
5 changed files with 153 additions and 24 deletions
+10 -5
View File
@@ -254,6 +254,9 @@ export default {
return { isMobile: mobile };
},
data() {
const provider = getSetting("server.provider");
const showNamespaceSettings = provider === "kv-server" || provider === "classworkscloud";
const settings = {
server: {
domain: getSetting("server.domain"),
@@ -337,11 +340,13 @@ export default {
icon: "mdi-server",
value: "server",
},
{
title: "命名空间",
icon: "mdi-database-lock",
value: "namespace",
},
...(showNamespaceSettings ? [
{
title: "命名空间",
icon: "mdi-database-lock",
value: "namespace",
}
] : []),
{
title: "分享设置",
icon: "mdi-share",