diff --git a/ui/langs.json b/ui/langs.json index 477e4d6..68ad465 100644 --- a/ui/langs.json +++ b/ui/langs.json @@ -21,40 +21,9 @@ "nav.dashboard": "Dashboard", "nav.home": "Home", "nav.oauth": "OAuth Apps", - "nav.org": "Organizations", "nav.roles": "Roles", "nav.profile": "Profile", "nav.users": "Users", - "org.code": "Code", - "org.create": "Create Organization", - "org.create_first": "Create Organization", - "org.created": "Created successfully", - "org.created_at": "Created At", - "org.delete_confirm": "Are you sure you want to delete this organization?", - "org.deleted": "Deleted successfully", - "org.desc_placeholder": "Enter organization description (optional)", - "org.description": "Description", - "org.detail": "Organization Detail", - "org.edit": "Edit Organization", - "org.feature_coming": "Feature coming soon", - "org.info": "Information", - "org.joined_at": "Joined At", - "org.max_members": "Max Members", - "org.member_removed": "Member removed", - "org.members": "Members", - "org.name": "Organization Name", - "org.name_placeholder": "Enter organization name", - "org.no_description": "No description", - "org.no_members": "No members yet", - "org.no_orgs": "No Organizations Found", - "org.no_orgs_desc": "Get started by creating your first organization.", - "org.remove_confirm": "Are you sure you want to remove this member?", - "org.remove_member": "Remove", - "org.required_fields": "Name and Code are required", - "org.search_placeholder": "Search by name, code...", - "org.updated": "Updated successfully", - "org.updated_at": "Updated At", - "org.you": "You", "user.email": "Email", "user.profile": "User Profile", "user.role": "Role", @@ -89,40 +58,9 @@ "nav.dashboard": "仪表盘", "nav.home": "首页", "nav.oauth": "OAuth应用", - "nav.org": "组织管理", "nav.roles": "角色管理", "nav.profile": "个人中心", "nav.users": "用户管理", - "org.code": "组织代码", - "org.create": "创建组织", - "org.create_first": "创建第一个组织", - "org.created": "创建成功", - "org.created_at": "创建时间", - "org.delete_confirm": "确定要删除该组织吗?", - "org.deleted": "删除成功", - "org.desc_placeholder": "请输入组织描述(可选)", - "org.description": "组织描述", - "org.detail": "组织详情", - "org.edit": "编辑组织", - "org.feature_coming": "功能即将推出", - "org.info": "基本信息", - "org.joined_at": "加入时间", - "org.max_members": "成员上限", - "org.member_removed": "成员已移除", - "org.members": "成员列表", - "org.name": "组织名称", - "org.name_placeholder": "请输入组织名称", - "org.no_description": "暂无描述", - "org.no_members": "暂无成员", - "org.no_orgs": "暂无组织", - "org.no_orgs_desc": "开始创建您的第一个组织吧", - "org.remove_confirm": "确定要移除此成员吗?", - "org.remove_member": "移除成员", - "org.required_fields": "名称和代码为必填项", - "org.search_placeholder": "搜索组织名称或代码", - "org.updated": "更新成功", - "org.updated_at": "更新时间", - "org.you": "你", "user.email": "邮箱", "user.profile": "个人资料", "user.role": "角色", diff --git a/ui/layout/default.html b/ui/layout/default.html index e627422..83a352f 100644 --- a/ui/layout/default.html +++ b/ui/layout/default.html @@ -69,20 +69,6 @@ border-bottom: 1px solid var(--border-color); } - .org-switcher { - display: flex; - align-items: center; - gap: 5px; - cursor: pointer; - padding: 5px 10px; - border-radius: 4px; - transition: background 0.2s; - } - - .org-switcher:hover { - background-color: var(--bg-color-tertiary); - } - .user-profile { display: flex; align-items: center; @@ -123,14 +109,7 @@
- -
- - {{ currentOrg.name }} - -
- - +
@@ -153,12 +132,10 @@ diff --git a/ui/page/dashboard/index.html b/ui/page/dashboard/index.html index 549e9fb..94fc13a 100644 --- a/ui/page/dashboard/index.html +++ b/ui/page/dashboard/index.html @@ -65,7 +65,7 @@ - - - diff --git a/ui/page/sys/org/index.html b/ui/page/sys/org/index.html deleted file mode 100644 index f7bb61f..0000000 --- a/ui/page/sys/org/index.html +++ /dev/null @@ -1,472 +0,0 @@ - - - - - - {{ $t('nav.org') }} - - - - - - - -
-
- {{ $t('common.loading') }} -
- - -
- -

{{ $t('org.no_orgs') }}

-

{{ $t('org.no_orgs_desc') }}

- - - {{ $t('org.create_first') }} - -
- - -
-
-
- {{ org.status === 1 ? 'Active' : 'Inactive' }} -
- -
-
- logo - {{ org.name ? org.name.charAt(0).toUpperCase() : 'O' }} -
-
-
{{ org.name }}
-
{{ org.code }}
-
-
- -
{{ org.description || $t('org.no_description') }}
- -
-
- - Max: {{ org.max_members }} -
-
- - {{ formatDate(org.created_at) }} -
-
- -
- - - - - - -
-
-
- - - -
- - -
-
- {{ $t('common.cancel') }} - - {{ isEdit ? $t('common.save') : $t('common.create') }} - -
-
- - - - - diff --git a/ui/routes.js b/ui/routes.js index cc5fca9..2e469be 100644 --- a/ui/routes.js +++ b/ui/routes.js @@ -11,15 +11,6 @@ const routes = [ component: '/page/dashboard/index.html' }, - // Org Management - { path: '/org', component: '/page/sys/org/index.html', layout: 'default', meta: { auth: true } }, - { - path: '/org/:id', - component: '/page/sys/org/detail.html', - layout: 'default', - meta: { auth: true } - }, - // Role Management { path: '/roles', component: '/page/sys/role/index.html', layout: 'default', meta: { auth: true } }, diff --git a/ui/vbase.js b/ui/vbase.js index e10e64e..12b4eb6 100644 --- a/ui/vbase.js +++ b/ui/vbase.js @@ -15,19 +15,16 @@ class VBase { this.tokenKey = 'vbase_access_token'; this.refreshTokenKey = 'vbase_refresh_token'; this.userKey = 'vbase_user_info'; - this.orgKey = 'vbase_current_org'; this._token = localStorage.getItem(this.tokenKey) || ''; this._refreshToken = localStorage.getItem(this.refreshTokenKey) || ''; this._user = JSON.parse(localStorage.getItem(this.userKey) || 'null'); - this._currentOrg = JSON.parse(localStorage.getItem(this.orgKey) || 'null'); } // Getters get token() { return this._token; } get refreshToken() { return this._refreshToken; } get user() { return this._user; } - get currentOrg() { return this._currentOrg; } // Setters set token(val) { @@ -48,12 +45,6 @@ class VBase { else localStorage.removeItem(this.userKey); } - set currentOrg(val) { - this._currentOrg = val; - if (val) localStorage.setItem(this.orgKey, JSON.stringify(val)); - else localStorage.removeItem(this.orgKey); - } - // API Helpers async request(method, path, data = null, headers = {}) { const url = `${this.baseURL}${path}`; @@ -144,9 +135,6 @@ class VBase { if (this.token) { headers['Authorization'] = `Bearer ${this.token}`; } - if (this.currentOrg && this.currentOrg.id) { - headers['X-Org-ID'] = this.currentOrg.id; - } return headers; }