mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-23 09:38:02 +00:00
feat: LDAP适配深色模式
This commit is contained in:
@@ -37,6 +37,9 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue'
|
||||
import { useAuthStore } from '@/stores/auth'
|
||||
|
||||
defineProps({
|
||||
activeTab: {
|
||||
type: String,
|
||||
@@ -46,14 +49,33 @@ defineProps({
|
||||
|
||||
defineEmits(['tab-change'])
|
||||
|
||||
const tabs = [
|
||||
{ key: 'dashboard', name: '仪表板', shortName: '仪表板', icon: 'fas fa-tachometer-alt' },
|
||||
{ key: 'apiKeys', name: 'API Keys', shortName: 'API', icon: 'fas fa-key' },
|
||||
{ key: 'accounts', name: '账户管理', shortName: '账户', icon: 'fas fa-user-circle' },
|
||||
{ key: 'userManagement', name: '用户管理', shortName: '用户', icon: 'fas fa-users' },
|
||||
{ key: 'tutorial', name: '使用教程', shortName: '教程', icon: 'fas fa-graduation-cap' },
|
||||
{ key: 'settings', name: '系统设置', shortName: '设置', icon: 'fas fa-cogs' }
|
||||
]
|
||||
const authStore = useAuthStore()
|
||||
|
||||
// 根据 LDAP 配置动态生成 tabs
|
||||
const tabs = computed(() => {
|
||||
const baseTabs = [
|
||||
{ key: 'dashboard', name: '仪表板', shortName: '仪表板', icon: 'fas fa-tachometer-alt' },
|
||||
{ key: 'apiKeys', name: 'API Keys', shortName: 'API', icon: 'fas fa-key' },
|
||||
{ key: 'accounts', name: '账户管理', shortName: '账户', icon: 'fas fa-user-circle' }
|
||||
]
|
||||
|
||||
// 只有在 LDAP 启用时才显示用户管理
|
||||
if (authStore.oemSettings?.ldapEnabled) {
|
||||
baseTabs.push({
|
||||
key: 'userManagement',
|
||||
name: '用户管理',
|
||||
shortName: '用户',
|
||||
icon: 'fas fa-users'
|
||||
})
|
||||
}
|
||||
|
||||
baseTabs.push(
|
||||
{ key: 'tutorial', name: '使用教程', shortName: '教程', icon: 'fas fa-graduation-cap' },
|
||||
{ key: 'settings', name: '系统设置', shortName: '设置', icon: 'fas fa-cogs' }
|
||||
)
|
||||
|
||||
return baseTabs
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user