mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 03:13:41 +08:00
refactor(ui): move Workspaces/Members/Activity from Security to Settings
This commit is contained in:
parent
c4edcbd95c
commit
62b7998975
@ -70,7 +70,7 @@ onMounted(() => {
|
||||
|
||||
function onSwitch(id: number | string) {
|
||||
if (id === '__manage__') {
|
||||
router.push('/security/workspaces')
|
||||
router.push('/settings/workspaces')
|
||||
return
|
||||
}
|
||||
store.switchWorkspace(id as number)
|
||||
|
||||
@ -100,6 +100,25 @@ const router = createRouter({
|
||||
component: () => import('@/views/Settings/Video/index.vue'),
|
||||
meta: { title: 'Settings - Video' },
|
||||
},
|
||||
// Workspace management
|
||||
{
|
||||
path: 'workspaces',
|
||||
name: 'SettingsWorkspaces',
|
||||
component: () => import('@/views/Security/Workspaces/index.vue'),
|
||||
meta: { title: 'Settings - Workspaces' },
|
||||
},
|
||||
{
|
||||
path: 'members',
|
||||
name: 'SettingsMembers',
|
||||
component: () => import('@/views/Security/Members/index.vue'),
|
||||
meta: { title: 'Settings - Members' },
|
||||
},
|
||||
{
|
||||
path: 'activity',
|
||||
name: 'SettingsActivity',
|
||||
component: () => import('@/views/Security/Activity/index.vue'),
|
||||
meta: { title: 'Settings - Activity' },
|
||||
},
|
||||
// Advanced (absorbed from top-level nav)
|
||||
{
|
||||
path: 'agent-context',
|
||||
@ -163,29 +182,14 @@ const router = createRouter({
|
||||
component: () => import('@/views/Security/AuditLogs/index.vue'),
|
||||
meta: { title: 'Security - Audit Logs' },
|
||||
},
|
||||
{
|
||||
path: 'members',
|
||||
name: 'SecurityMembers',
|
||||
component: () => import('@/views/Security/Members/index.vue'),
|
||||
meta: { title: 'Security - Members' },
|
||||
},
|
||||
{
|
||||
path: 'workspaces',
|
||||
name: 'SecurityWorkspaces',
|
||||
component: () => import('@/views/Security/Workspaces/index.vue'),
|
||||
meta: { title: 'Security - Workspaces' },
|
||||
},
|
||||
{
|
||||
path: 'activity',
|
||||
name: 'SecurityActivity',
|
||||
component: () => import('@/views/Security/Activity/index.vue'),
|
||||
meta: { title: 'Security - Activity' },
|
||||
},
|
||||
],
|
||||
},
|
||||
// ==================== Redirects (backward compatibility) ====================
|
||||
{ path: 'sessions', redirect: '/chat' },
|
||||
{ path: 'workspace', redirect: '/settings/agent-context' },
|
||||
{ path: 'security/workspaces', redirect: '/settings/workspaces' },
|
||||
{ path: 'security/members', redirect: '/settings/members' },
|
||||
{ path: 'security/activity', redirect: '/settings/activity' },
|
||||
{ path: 'cron-jobs', redirect: '/settings/cron-jobs' },
|
||||
{ path: 'datasources', redirect: '/settings/datasources' },
|
||||
{ path: 'mcp-servers', redirect: '/settings/mcp-servers' },
|
||||
|
||||
@ -57,24 +57,6 @@ const sections = computed(() => [
|
||||
label: t('security.sections.auditLogs'),
|
||||
icon: '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="16" y1="13" x2="8" y2="13"/><line x1="16" y1="17" x2="8" y2="17"/></svg>',
|
||||
},
|
||||
{
|
||||
id: 'members',
|
||||
path: '/security/members',
|
||||
label: t('security.sections.members', 'Members'),
|
||||
icon: '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>',
|
||||
},
|
||||
{
|
||||
id: 'workspaces',
|
||||
path: '/security/workspaces',
|
||||
label: t('security.sections.workspaces', 'Workspaces'),
|
||||
icon: '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="7" width="20" height="14" rx="2" ry="2"/><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/></svg>',
|
||||
},
|
||||
{
|
||||
id: 'activity',
|
||||
path: '/security/activity',
|
||||
label: t('security.sections.activity', 'Activity'),
|
||||
icon: '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/></svg>',
|
||||
},
|
||||
])
|
||||
|
||||
function isActive(path: string) {
|
||||
|
||||
@ -83,6 +83,26 @@ const sections = computed(() => [
|
||||
label: t('settings.sections.video'),
|
||||
icon: '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polygon points="23 7 16 12 23 17 23 7"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/></svg>',
|
||||
},
|
||||
// Divider: Workspace
|
||||
{ id: 'divider-workspace', path: '', label: t('settings.sections.workspace', 'Workspace'), icon: '', isDivider: true },
|
||||
{
|
||||
id: 'workspaces',
|
||||
path: '/settings/workspaces',
|
||||
label: t('security.sections.workspaces', 'Workspaces'),
|
||||
icon: '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="2" y="7" width="20" height="14" rx="2" ry="2"/><path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"/></svg>',
|
||||
},
|
||||
{
|
||||
id: 'members',
|
||||
path: '/settings/members',
|
||||
label: t('security.sections.members', 'Members'),
|
||||
icon: '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>',
|
||||
},
|
||||
{
|
||||
id: 'activity',
|
||||
path: '/settings/activity',
|
||||
label: t('security.sections.activity', 'Activity'),
|
||||
icon: '<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/></svg>',
|
||||
},
|
||||
// Divider: Advanced
|
||||
{ id: 'divider-advanced', path: '', label: t('settings.sections.advanced'), icon: '', isDivider: true },
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user