refactor: 移除旧版数据库配置的简易模式实现
移除与 PR #66 冲突的旧版简易模式实现(commit 7d4b7de)。 新版简易模式通过 run_mode 配置文件/环境变量控制,无需数据库设置。 后端变更: - 移除 SettingKeySimpleMode 常量 - 移除 SystemSettings/PublicSettings 中的 SimpleMode 字段 - 移除 setting_handler 中的简易模式切换逻辑 - 移除 userService 依赖(不再需要自动设置管理员并发数) 前端变更: - 移除 appStore.simpleMode 状态 - 移除设置页面的"使用模式"设置区块 - 移除 GroupsView 中的简易模式相关逻辑 - 移除相关国际化文案
This commit is contained in:
@@ -683,18 +683,10 @@ const editStatusOptions = computed(() => [
|
||||
{ value: 'inactive', label: t('common.inactive') }
|
||||
])
|
||||
|
||||
const subscriptionTypeOptions = computed(() => {
|
||||
// 简单模式下只显示订阅模式(配额模式)
|
||||
if (appStore.simpleMode) {
|
||||
return [
|
||||
{ value: 'subscription', label: t('admin.groups.subscription.subscription') }
|
||||
]
|
||||
}
|
||||
return [
|
||||
{ value: 'standard', label: t('admin.groups.subscription.standard') },
|
||||
{ value: 'subscription', label: t('admin.groups.subscription.subscription') }
|
||||
]
|
||||
})
|
||||
const subscriptionTypeOptions = computed(() => [
|
||||
{ value: 'standard', label: t('admin.groups.subscription.standard') },
|
||||
{ value: 'subscription', label: t('admin.groups.subscription.subscription') }
|
||||
])
|
||||
|
||||
const groups = ref<Group[]>([])
|
||||
const loading = ref(false)
|
||||
@@ -804,7 +796,7 @@ const closeCreateModal = () => {
|
||||
createForm.platform = 'anthropic'
|
||||
createForm.rate_multiplier = 1.0
|
||||
createForm.is_exclusive = false
|
||||
createForm.subscription_type = appStore.simpleMode ? 'subscription' : 'standard'
|
||||
createForm.subscription_type = 'standard'
|
||||
createForm.daily_limit_usd = null
|
||||
createForm.weekly_limit_usd = null
|
||||
createForm.monthly_limit_usd = null
|
||||
@@ -895,9 +887,5 @@ watch(
|
||||
|
||||
onMounted(() => {
|
||||
loadGroups()
|
||||
// 简单模式下默认使用订阅模式
|
||||
if (appStore.simpleMode) {
|
||||
createForm.subscription_type = 'subscription'
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user