feat: 添加简单模式功能
新增简单模式设置,适合个人使用场景: - 隐藏多用户管理相关菜单(用户管理、兑换码等) - 自动关闭用户注册功能 - 管理员并发数自动设为无限制(99999) - 侧边栏根据模式动态调整菜单项 同时优化分组页面的"专属分组"功能,添加帮助提示说明使用场景
This commit is contained in:
@@ -30,6 +30,7 @@ export const useAppStore = defineStore('app', () => {
|
||||
const contactInfo = ref<string>('')
|
||||
const apiBaseUrl = ref<string>('')
|
||||
const docUrl = ref<string>('')
|
||||
const simpleMode = ref<boolean>(false)
|
||||
|
||||
// Version cache state
|
||||
const versionLoaded = ref<boolean>(false)
|
||||
@@ -296,7 +297,8 @@ export const useAppStore = defineStore('app', () => {
|
||||
api_base_url: apiBaseUrl.value,
|
||||
contact_info: contactInfo.value,
|
||||
doc_url: docUrl.value,
|
||||
version: siteVersion.value
|
||||
version: siteVersion.value,
|
||||
simple_mode: simpleMode.value
|
||||
}
|
||||
}
|
||||
|
||||
@@ -314,6 +316,7 @@ export const useAppStore = defineStore('app', () => {
|
||||
contactInfo.value = data.contact_info || ''
|
||||
apiBaseUrl.value = data.api_base_url || ''
|
||||
docUrl.value = data.doc_url || ''
|
||||
simpleMode.value = data.simple_mode || false
|
||||
publicSettingsLoaded.value = true
|
||||
return data
|
||||
} catch (error) {
|
||||
@@ -348,6 +351,7 @@ export const useAppStore = defineStore('app', () => {
|
||||
contactInfo,
|
||||
apiBaseUrl,
|
||||
docUrl,
|
||||
simpleMode,
|
||||
|
||||
// Version state
|
||||
versionLoaded,
|
||||
|
||||
Reference in New Issue
Block a user