mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-16 12:27:53 +08:00
feat(activity): promote Activity to top-level navigation
This commit is contained in:
parent
169a09506b
commit
91e231e7a5
@ -247,6 +247,7 @@ export default {
|
|||||||
mcpServers: 'MCP Connections',
|
mcpServers: 'MCP Connections',
|
||||||
mcpConnections: 'MCP Connections',
|
mcpConnections: 'MCP Connections',
|
||||||
toolsCatalog: 'Tools (Catalog)',
|
toolsCatalog: 'Tools (Catalog)',
|
||||||
|
activity: 'Activity',
|
||||||
settingsGroup: 'Settings',
|
settingsGroup: 'Settings',
|
||||||
agents: 'Agents',
|
agents: 'Agents',
|
||||||
security: 'Security',
|
security: 'Security',
|
||||||
|
|||||||
@ -247,6 +247,7 @@ export default {
|
|||||||
mcpServers: 'MCP 连接',
|
mcpServers: 'MCP 连接',
|
||||||
mcpConnections: 'MCP 连接',
|
mcpConnections: 'MCP 连接',
|
||||||
toolsCatalog: '工具目录',
|
toolsCatalog: '工具目录',
|
||||||
|
activity: '活动记录',
|
||||||
settingsGroup: '设置',
|
settingsGroup: '设置',
|
||||||
agents: '智能体',
|
agents: '智能体',
|
||||||
security: '安全',
|
security: '安全',
|
||||||
|
|||||||
@ -57,6 +57,12 @@ const router = createRouter({
|
|||||||
},
|
},
|
||||||
// Tools 顶层入口已降级到 Settings ▸ Tools (Catalog) (RFC-090 Phase 1)
|
// Tools 顶层入口已降级到 Settings ▸ Tools (Catalog) (RFC-090 Phase 1)
|
||||||
// 旧路径 /tools 由下方 redirect 兼容
|
// 旧路径 /tools 由下方 redirect 兼容
|
||||||
|
{
|
||||||
|
path: 'activity',
|
||||||
|
name: 'Activity',
|
||||||
|
component: () => import('@/views/Security/Activity/index.vue'),
|
||||||
|
meta: { title: 'Activity' },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'plugins',
|
path: 'plugins',
|
||||||
name: 'Plugins',
|
name: 'Plugins',
|
||||||
@ -124,12 +130,8 @@ const router = createRouter({
|
|||||||
component: () => import('@/views/Security/Members/index.vue'),
|
component: () => import('@/views/Security/Members/index.vue'),
|
||||||
meta: { title: 'Settings - Members' },
|
meta: { title: 'Settings - Members' },
|
||||||
},
|
},
|
||||||
{
|
// RFC-090 Phase 4: Activity 提升到顶层 /activity(下方 children-out
|
||||||
path: 'activity',
|
// 的 settings/activity redirect 兼容旧链接,此处不再注册子路由)
|
||||||
name: 'SettingsActivity',
|
|
||||||
component: () => import('@/views/Security/Activity/index.vue'),
|
|
||||||
meta: { title: 'Settings - Activity' },
|
|
||||||
},
|
|
||||||
// Advanced (absorbed from top-level nav)
|
// Advanced (absorbed from top-level nav)
|
||||||
{
|
{
|
||||||
path: 'agent-context',
|
path: 'agent-context',
|
||||||
@ -206,7 +208,9 @@ const router = createRouter({
|
|||||||
{ path: 'workspace', redirect: '/settings/agent-context' },
|
{ path: 'workspace', redirect: '/settings/agent-context' },
|
||||||
{ path: 'security/workspaces', redirect: '/settings/workspaces' },
|
{ path: 'security/workspaces', redirect: '/settings/workspaces' },
|
||||||
{ path: 'security/members', redirect: '/settings/members' },
|
{ path: 'security/members', redirect: '/settings/members' },
|
||||||
{ path: 'security/activity', redirect: '/settings/activity' },
|
// RFC-090 Phase 4: Activity 提升到顶层
|
||||||
|
{ path: 'security/activity', redirect: '/activity' },
|
||||||
|
{ path: 'settings/activity', redirect: '/activity' },
|
||||||
{ path: 'cron-jobs', redirect: '/settings/cron-jobs' },
|
{ path: 'cron-jobs', redirect: '/settings/cron-jobs' },
|
||||||
{ path: 'datasources', redirect: '/settings/datasources' },
|
{ path: 'datasources', redirect: '/settings/datasources' },
|
||||||
{ path: 'mcp-servers', redirect: '/settings/mcp-servers' },
|
{ path: 'mcp-servers', redirect: '/settings/mcp-servers' },
|
||||||
|
|||||||
@ -1,12 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="settings-section">
|
<!-- RFC-090 Phase 4: Activity 提升到顶层路由 /activity,但本组件
|
||||||
<div class="section-header">
|
既保留 settings-section 内层结构以便旧 Settings 引用兼容,
|
||||||
<div>
|
又用 mc-page-shell 包一层在顶层路由下显示完整页框。 -->
|
||||||
<h2 class="section-title">{{ t('security.activity.title') }}</h2>
|
<div class="mc-page-shell">
|
||||||
<p class="section-desc">{{ t('security.activity.desc') }}</p>
|
<div class="mc-page-frame">
|
||||||
</div>
|
<div class="mc-page-inner activity-page">
|
||||||
</div>
|
<div class="mc-page-header">
|
||||||
|
<div>
|
||||||
|
<div class="mc-page-kicker">{{ t('nav.activity') }}</div>
|
||||||
|
<h1 class="mc-page-title">{{ t('security.activity.title') }}</h1>
|
||||||
|
<p class="mc-page-desc">{{ t('security.activity.desc') }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="settings-section activity-inner mc-surface-card">
|
||||||
<!-- Filters -->
|
<!-- Filters -->
|
||||||
<div class="filter-row">
|
<div class="filter-row">
|
||||||
<select v-model="filters.action" class="filter-select" @change="loadEvents">
|
<select v-model="filters.action" class="filter-select" @change="loadEvents">
|
||||||
@ -75,6 +81,9 @@
|
|||||||
<button class="btn-secondary btn-sm" :disabled="page <= 1" @click="page--; loadEvents()">«</button>
|
<button class="btn-secondary btn-sm" :disabled="page <= 1" @click="page--; loadEvents()">«</button>
|
||||||
<span class="page-info">{{ page }} / {{ Math.ceil(total / pageSize) }}</span>
|
<span class="page-info">{{ page }} / {{ Math.ceil(total / pageSize) }}</span>
|
||||||
<button class="btn-secondary btn-sm" :disabled="page >= Math.ceil(total / pageSize)" @click="page++; loadEvents()">»</button>
|
<button class="btn-secondary btn-sm" :disabled="page >= Math.ceil(total / pageSize)" @click="page++; loadEvents()">»</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -127,6 +136,10 @@ onMounted(() => {
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
/* RFC-090 Phase 4 — top-level standalone shell */
|
||||||
|
.activity-page { gap: 18px; }
|
||||||
|
.activity-inner { padding: 18px; }
|
||||||
|
|
||||||
.filter-row {
|
.filter-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
|||||||
@ -142,12 +142,7 @@ const sections = computed(() => [
|
|||||||
label: t('security.sections.members', '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>',
|
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>',
|
||||||
},
|
},
|
||||||
{
|
// RFC-090 Phase 4: Activity 子项移除,提升至顶层 /activity
|
||||||
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
|
// Divider: Advanced
|
||||||
{ id: 'divider-advanced', path: '', label: t('settings.sections.advanced'), icon: '', isDivider: true },
|
{ id: 'divider-advanced', path: '', label: t('settings.sections.advanced'), icon: '', isDivider: true },
|
||||||
{
|
{
|
||||||
|
|||||||
@ -343,6 +343,12 @@ const navGroups = computed(() => [
|
|||||||
label: t('nav.plugins'),
|
label: t('nav.plugins'),
|
||||||
icon: `<svg width="18" height="18" 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 3h-8v4h8V3z"/></svg>`,
|
icon: `<svg width="18" height="18" 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 3h-8v4h8V3z"/></svg>`,
|
||||||
},
|
},
|
||||||
|
// RFC-090 Phase 4: Activity 提升到顶层
|
||||||
|
{
|
||||||
|
path: '/activity',
|
||||||
|
label: t('nav.activity'),
|
||||||
|
icon: `<svg width="18" height="18" 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>`,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user