feat: update UI components and add benchmark analysis feature

- Disable close button in Toaster notifications
- Add padding to TopNav header and UserDropdown username span
- Import vue-sonner CSS for toast notifications
- Update Agents page header with gradient background
- Add benchmark_analyze business type to Profile view
- Replace storage space stat card with redeem code functionality
- Reorder profile statistics cards and update their content
This commit is contained in:
2026-03-18 22:30:39 +08:00
parent c3479a8a16
commit f8094b40b7
7 changed files with 28 additions and 26 deletions

View File

@@ -81,7 +81,7 @@ defineExpose({ toggleTheme, isDark, changeLocale, locale })
<Toaster
position="top-center"
:rich-colors="true"
:close-button="true"
:close-button="false"
:duration="4000"
:expand="false"
dir="ltr"

View File

@@ -15,7 +15,7 @@ const shouldShowUser = computed(() => {
<template>
<header
class="fixed top-0 left-0 right-0 flex items-center px-6 h-[70px] bg-background/95 backdrop-blur-sm border-b border-border z-50"
class="p-1 fixed top-0 left-0 right-0 flex items-center px-6 h-[70px] bg-background/95 backdrop-blur-sm border-b border-border z-50"
>
<div class="flex items-center gap-4 flex-1">
<BrandLogo :size="36" />

View File

@@ -69,7 +69,7 @@ async function handleLogout() {
</Avatar>
<!-- 用户名 -->
<span class="text-sm font-medium text-foreground truncate">
<span class="p-1 text-sm font-medium text-foreground truncate">
{{ userStore.displayName || '用户' }}
</span>

View File

@@ -2,6 +2,7 @@ import { createApp } from 'vue'
import { createPinia } from 'pinia'
import 'normalize.css'
import 'aplayer/dist/APlayer.min.css'
import 'vue-sonner/style.css'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
import 'dayjs/locale/zh-cn';

View File

@@ -427,7 +427,7 @@ onMounted(() => {
.agents-header {
position: relative;
padding: 48px 0 32px;
background: var(--color-bg-page);
background: linear-gradient(90deg, rgba(56, 189, 248, 0.12) 0%, rgba(99, 102, 241, 0.14) 100%);
border-bottom: 1px solid var(--color-gray-200);
z-index: 10;
}

View File

@@ -130,7 +130,8 @@ function getBizTypeName(bizType) {
'digital_human': '数字人',
'voice_tts': '语音克隆',
'tikhub_fetch': '数据采集',
'forecast_rewrite': '文案改写'
'forecast_rewrite': '文案改写',
'benchmark_analyze': '对标分析'
}
return typeMap[bizType] || bizType || '其他'
}
@@ -228,15 +229,23 @@ onMounted(async () => {
<div class="lg:col-span-8">
<!-- 资源概览卡片 -->
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
<!-- 存储空间 -->
<!-- 兑换码充值 -->
<div class="stat-card">
<div class="stat-icon-wrapper blue">
<Icon icon="lucide:database" class="text-2xl" />
<div class="stat-icon-wrapper green">
<Icon icon="lucide:gift" class="text-2xl" />
</div>
<div class="stat-content">
<div class="stat-label">存储空间</div>
<div class="stat-value">{{ formatStorage(usedStorage) }} <span class="stat-unit">/ {{ formatStorage(totalStorage) }}</span></div>
<Progress :value="storagePercent" class="stat-progress h-2" />
<div class="stat-label">兑换码充值</div>
<div class="stat-value" style="font-size: 16px;">
<Button
variant="outline"
size="sm"
@click="showRedeemDialog = true"
>
输入兑换码
</Button>
</div>
<div class="stat-desc">使用兑换码获取积分</div>
</div>
</div>
@@ -264,23 +273,15 @@ onMounted(async () => {
</div>
</div>
<!-- 兑换码充值 -->
<!-- 存储空间 -->
<div class="stat-card">
<div class="stat-icon-wrapper green">
<Icon icon="lucide:gift" class="text-2xl" />
<div class="stat-icon-wrapper blue">
<Icon icon="lucide:database" class="text-2xl" />
</div>
<div class="stat-content">
<div class="stat-label">兑换码充值</div>
<div class="stat-value" style="font-size: 16px;">
<Button
variant="outline"
size="sm"
@click="showRedeemDialog = true"
>
输入兑换码
</Button>
</div>
<div class="stat-desc">使用兑换码获取积分</div>
<div class="stat-label">存储空间</div>
<div class="stat-value">{{ formatStorage(usedStorage) }} <span class="stat-unit">/ {{ formatStorage(totalStorage) }}</span></div>
<Progress :value="storagePercent" class="stat-progress h-2" />
</div>
</div>
</div>

View File

@@ -20,7 +20,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
*/
@Tag(name = "用户 App - 兑换码")
@RestController
@RequestMapping("/app-api/muye/redemption-code")
@RequestMapping("/api/muye/redemption-code")
@Validated
public class AppRedemptionCodeController {