feat: 更新前端页面

- Agents, Chat, Settings, Skill, Tools
- Account, Plan, Script
- useSkills composable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 14:26:25 +08:00
parent 7791d198f1
commit 03540fb9e9
9 changed files with 742 additions and 556 deletions

View File

@@ -41,15 +41,13 @@ const tasks = ref([
},
])
const activeTab = ref('running') // running, completed, all
const filterStatus = ref('all') // running, stopped, all
const searchQuery = ref('')
const filteredTasks = computed(() => {
let result = tasks.value
if (activeTab.value === 'running') {
result = result.filter(t => t.status === 'running')
} else if (activeTab.value === 'completed') {
result = result.filter(t => t.status === 'stopped')
if (filterStatus.value !== 'all') {
result = result.filter(t => t.status === filterStatus.value)
}
if (searchQuery.value) {
const query = searchQuery.value.toLowerCase()
@@ -63,7 +61,7 @@ const filteredTasks = computed(() => {
const getTaskCount = (status: string) => {
if (status === 'running') return tasks.value.filter(t => t.status === 'running').length
if (status === 'completed') return tasks.value.filter(t => t.status === 'stopped').length
if (status === 'stopped') return tasks.value.filter(t => t.status === 'stopped').length
return tasks.value.length
}
@@ -101,28 +99,11 @@ const getStatusClass = (status: string) => {
class="search-input w-full"
>
</div>
</div>
<!-- Tab Navigation -->
<div class="flex gap-6 mb-4">
<button
:class="['tab-item', { active: activeTab === 'running' }]"
@click="activeTab = 'running'"
>
Running {{ getTaskCount('running') }}
</button>
<button
:class="['tab-item', { active: activeTab === 'completed' }]"
@click="activeTab = 'completed'"
>
Completed {{ getTaskCount('completed') }}
</button>
<button
:class="['tab-item', { active: activeTab === 'all' }]"
@click="activeTab = 'all'"
>
All {{ getTaskCount('all') }}
</button>
<el-select v-model="filterStatus" placeholder="Select" class="w-40" size="large">
<el-option label="All Status" value="all" />
<el-option label="Running" value="running" />
<el-option label="Stopped" value="stopped" />
</el-select>
</div>
<!-- Task List Table -->