feat: 优化代理后台页面布局
- 所有页面统一使用 BasicPage 组件 - 添加面包屑导航支持 - 统一页面标题和描述样式 - 移除控制台页面的应用管理快捷链接 - 优化卡密管理、用户管理、财务管理页面布局
This commit is contained in:
@@ -3,6 +3,7 @@ import { Loader2, Users } from 'lucide-vue-next'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
|
||||
import { BasicPage } from '@/components/global-layout'
|
||||
import api from '@/services/api'
|
||||
|
||||
const { t } = useI18n()
|
||||
@@ -40,16 +41,11 @@ function formatDate(dateStr: string | null) {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="space-y-6">
|
||||
<div>
|
||||
<h1 class="text-2xl font-bold">
|
||||
{{ t('agent.users.title') }}
|
||||
</h1>
|
||||
<p class="text-muted-foreground">
|
||||
{{ t('agent.users.description') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<BasicPage
|
||||
:title="t('nav.users')"
|
||||
description="管理用户信息"
|
||||
sticky
|
||||
>
|
||||
<UiCard>
|
||||
<UiCardContent class="p-0">
|
||||
<div v-if="loading" class="flex items-center justify-center py-12">
|
||||
@@ -58,7 +54,7 @@ function formatDate(dateStr: string | null) {
|
||||
|
||||
<div v-else-if="users.length === 0" class="text-center py-12 text-muted-foreground">
|
||||
<Users class="size-16 mx-auto mb-4 opacity-30" />
|
||||
<p>{{ t('agent.users.noUsers') }}</p>
|
||||
<p>暂无用户</p>
|
||||
</div>
|
||||
|
||||
<div v-else class="overflow-x-auto">
|
||||
@@ -66,19 +62,19 @@ function formatDate(dateStr: string | null) {
|
||||
<thead class="bg-muted/50">
|
||||
<tr>
|
||||
<th class="px-4 py-3 text-left text-sm font-medium">
|
||||
{{ t('agent.users.username') }}
|
||||
用户名
|
||||
</th>
|
||||
<th class="px-4 py-3 text-left text-sm font-medium">
|
||||
{{ t('agent.users.email') }}
|
||||
邮箱
|
||||
</th>
|
||||
<th class="px-4 py-3 text-left text-sm font-medium">
|
||||
{{ t('agent.users.status') }}
|
||||
状态
|
||||
</th>
|
||||
<th class="px-4 py-3 text-left text-sm font-medium">
|
||||
{{ t('agent.users.registerTime') }}
|
||||
注册时间
|
||||
</th>
|
||||
<th class="px-4 py-3 text-left text-sm font-medium">
|
||||
{{ t('agent.users.lastLogin') }}
|
||||
最后登录
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -95,7 +91,7 @@ function formatDate(dateStr: string | null) {
|
||||
:class="user.status === 'active' ? 'bg-green-500/10 text-green-500' : ''"
|
||||
variant="outline"
|
||||
>
|
||||
{{ user.status === 'active' ? t('agent.users.active') : user.status }}
|
||||
{{ user.status === 'active' ? '正常' : user.status }}
|
||||
</UiBadge>
|
||||
</td>
|
||||
<td class="px-4 py-3 text-sm text-muted-foreground">
|
||||
@@ -110,5 +106,5 @@ function formatDate(dateStr: string | null) {
|
||||
</div>
|
||||
</UiCardContent>
|
||||
</UiCard>
|
||||
</div>
|
||||
</BasicPage>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user