From 4137a63852153e1ad0c4634fd649fab693a994ff Mon Sep 17 00:00:00 2001 From: wizardchen Date: Tue, 16 Sep 2025 15:39:34 +0800 Subject: [PATCH] feat(ui): Add tenant info --- frontend/nginx.conf | 1 - frontend/src/api/auth/index.ts | 5 + frontend/src/components/menu.vue | 144 +++++-- frontend/src/router/index.ts | 6 + frontend/src/stores/menu.ts | 3 +- frontend/src/views/tenant/TenantInfo.vue | 496 +++++++++++++++++++++++ internal/application/service/user.go | 4 +- internal/handler/auth.go | 32 +- 8 files changed, 637 insertions(+), 54 deletions(-) create mode 100644 frontend/src/views/tenant/TenantInfo.vue diff --git a/frontend/nginx.conf b/frontend/nginx.conf index ad9a469..e855553 100644 --- a/frontend/nginx.conf +++ b/frontend/nginx.conf @@ -8,7 +8,6 @@ server { add_header X-Content-Type-Options "nosniff" always; add_header X-XSS-Protection "1; mode=block" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; - add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https: http:; font-src 'self' data:; connect-src 'self' http: https: ws: wss:; frame-ancestors 'self';" always; # 错误日志配置 error_log /var/log/nginx/error.log warn; diff --git a/frontend/src/api/auth/index.ts b/frontend/src/api/auth/index.ts index bc2a8d0..4fe4767 100644 --- a/frontend/src/api/auth/index.ts +++ b/frontend/src/api/auth/index.ts @@ -74,8 +74,13 @@ export interface UserInfo { export interface TenantInfo { id: string name: string + description?: string api_key: string + status?: string + business?: string owner_id: string + storage_quota?: number + storage_used?: number created_at: string updated_at: string knowledge_bases?: KnowledgeBaseInfo[] diff --git a/frontend/src/components/menu.vue b/frontend/src/components/menu.vue index 7627737..ede1d29 100644 --- a/frontend/src/components/menu.vue +++ b/frontend/src/components/menu.vue @@ -3,50 +3,71 @@
-