feat: 用户创建充值优化、侧边栏导航修复、在线实例统计修复

This commit is contained in:
2026-05-03 06:07:11 +08:00
parent fa521de836
commit ecf5690505
8 changed files with 331 additions and 84 deletions
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { Boxes, Code, CreditCard, DollarSign, FileLock, Gauge, GitBranch, HardDrive, Hash, Key, Mail, Megaphone, MessageSquare, Network, Plug, ScrollText, Settings, Shield, Smartphone, Users, Variable } from 'lucide-vue-next'
import { Boxes, Code, CreditCard, DollarSign, FileLock, Gauge, GitBranch, HardDrive, Hash, Key, Mail, Megaphone, MessageSquare, Monitor, Network, Plug, ScrollText, Settings, Shield, Smartphone, Users, Variable } from 'lucide-vue-next'
import { onMounted, onUnmounted, reactive } from 'vue'
import NavTeam from '@/components/app-sidebar/nav-team.vue'
@@ -119,6 +119,16 @@ const navMain = [
url: '/admin/users',
icon: Users,
},
{
title: '设备管理',
url: '/admin/devices',
icon: Smartphone,
},
{
title: '在线实例',
url: '/admin/sessions',
icon: Monitor,
},
{
title: '代理管理',
url: '/admin/agents',
@@ -23,13 +23,13 @@ function getAssetUrl(path: string) {
<UiSidebarMenuItem>
<UiSidebarMenuButton size="lg" class="data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-accent-foreground">
<div
class="flex items-center justify-center rounded-lg aspect-square size-8 overflow-hidden"
class="flex items-center justify-center rounded-lg aspect-square size-8 overflow-hidden shrink-0"
:class="typeof activeTeam.logo === 'string' && activeTeam.logo ? '' : 'bg-sidebar-primary text-sidebar-primary-foreground'"
>
<img v-if="typeof activeTeam.logo === 'string' && activeTeam.logo" :src="getAssetUrl(activeTeam.logo)" class="size-full object-contain" alt="" />
<component v-else-if="typeof activeTeam.logo === 'function'" :is="activeTeam.logo" class="size-4" />
</div>
<div class="grid flex-1 text-sm leading-tight">
<div class="grid flex-1 text-sm leading-tight group-data-[collapsible=icon]:hidden">
<span class="font-semibold truncate">{{ activeTeam.name }}</span>
</div>
</UiSidebarMenuButton>