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:
+10
-5
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user