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:
@@ -81,7 +81,7 @@ defineExpose({ toggleTheme, isDark, changeLocale, locale })
|
|||||||
<Toaster
|
<Toaster
|
||||||
position="top-center"
|
position="top-center"
|
||||||
:rich-colors="true"
|
:rich-colors="true"
|
||||||
:close-button="true"
|
:close-button="false"
|
||||||
:duration="4000"
|
:duration="4000"
|
||||||
:expand="false"
|
:expand="false"
|
||||||
dir="ltr"
|
dir="ltr"
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ const shouldShowUser = computed(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<header
|
<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">
|
<div class="flex items-center gap-4 flex-1">
|
||||||
<BrandLogo :size="36" />
|
<BrandLogo :size="36" />
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ async function handleLogout() {
|
|||||||
</Avatar>
|
</Avatar>
|
||||||
|
|
||||||
<!-- 用户名 -->
|
<!-- 用户名 -->
|
||||||
<span class="text-sm font-medium text-foreground truncate">
|
<span class="p-1 text-sm font-medium text-foreground truncate">
|
||||||
{{ userStore.displayName || '用户' }}
|
{{ userStore.displayName || '用户' }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { createApp } from 'vue'
|
|||||||
import { createPinia } from 'pinia'
|
import { createPinia } from 'pinia'
|
||||||
import 'normalize.css'
|
import 'normalize.css'
|
||||||
import 'aplayer/dist/APlayer.min.css'
|
import 'aplayer/dist/APlayer.min.css'
|
||||||
|
import 'vue-sonner/style.css'
|
||||||
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
|
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';
|
||||||
import 'dayjs/locale/zh-cn';
|
import 'dayjs/locale/zh-cn';
|
||||||
|
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ onMounted(() => {
|
|||||||
.agents-header {
|
.agents-header {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 48px 0 32px;
|
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);
|
border-bottom: 1px solid var(--color-gray-200);
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,7 +130,8 @@ function getBizTypeName(bizType) {
|
|||||||
'digital_human': '数字人',
|
'digital_human': '数字人',
|
||||||
'voice_tts': '语音克隆',
|
'voice_tts': '语音克隆',
|
||||||
'tikhub_fetch': '数据采集',
|
'tikhub_fetch': '数据采集',
|
||||||
'forecast_rewrite': '文案改写'
|
'forecast_rewrite': '文案改写',
|
||||||
|
'benchmark_analyze': '对标分析'
|
||||||
}
|
}
|
||||||
return typeMap[bizType] || bizType || '其他'
|
return typeMap[bizType] || bizType || '其他'
|
||||||
}
|
}
|
||||||
@@ -228,15 +229,23 @@ onMounted(async () => {
|
|||||||
<div class="lg:col-span-8">
|
<div class="lg:col-span-8">
|
||||||
<!-- 资源概览卡片 -->
|
<!-- 资源概览卡片 -->
|
||||||
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
|
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6">
|
||||||
<!-- 存储空间 -->
|
<!-- 兑换码充值 -->
|
||||||
<div class="stat-card">
|
<div class="stat-card">
|
||||||
<div class="stat-icon-wrapper blue">
|
<div class="stat-icon-wrapper green">
|
||||||
<Icon icon="lucide:database" class="text-2xl" />
|
<Icon icon="lucide:gift" class="text-2xl" />
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-content">
|
<div class="stat-content">
|
||||||
<div class="stat-label">存储空间</div>
|
<div class="stat-label">兑换码充值</div>
|
||||||
<div class="stat-value">{{ formatStorage(usedStorage) }} <span class="stat-unit">/ {{ formatStorage(totalStorage) }}</span></div>
|
<div class="stat-value" style="font-size: 16px;">
|
||||||
<Progress :value="storagePercent" class="stat-progress h-2" />
|
<Button
|
||||||
|
variant="outline"
|
||||||
|
size="sm"
|
||||||
|
@click="showRedeemDialog = true"
|
||||||
|
>
|
||||||
|
输入兑换码
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
<div class="stat-desc">使用兑换码获取积分</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -264,23 +273,15 @@ onMounted(async () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 兑换码充值 -->
|
<!-- 存储空间 -->
|
||||||
<div class="stat-card">
|
<div class="stat-card">
|
||||||
<div class="stat-icon-wrapper green">
|
<div class="stat-icon-wrapper blue">
|
||||||
<Icon icon="lucide:gift" class="text-2xl" />
|
<Icon icon="lucide:database" class="text-2xl" />
|
||||||
</div>
|
</div>
|
||||||
<div class="stat-content">
|
<div class="stat-content">
|
||||||
<div class="stat-label">兑换码充值</div>
|
<div class="stat-label">存储空间</div>
|
||||||
<div class="stat-value" style="font-size: 16px;">
|
<div class="stat-value">{{ formatStorage(usedStorage) }} <span class="stat-unit">/ {{ formatStorage(totalStorage) }}</span></div>
|
||||||
<Button
|
<Progress :value="storagePercent" class="stat-progress h-2" />
|
||||||
variant="outline"
|
|
||||||
size="sm"
|
|
||||||
@click="showRedeemDialog = true"
|
|
||||||
>
|
|
||||||
输入兑换码
|
|
||||||
</Button>
|
|
||||||
</div>
|
|
||||||
<div class="stat-desc">使用兑换码获取积分</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|||||||
*/
|
*/
|
||||||
@Tag(name = "用户 App - 兑换码")
|
@Tag(name = "用户 App - 兑换码")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/app-api/muye/redemption-code")
|
@RequestMapping("/api/muye/redemption-code")
|
||||||
@Validated
|
@Validated
|
||||||
public class AppRedemptionCodeController {
|
public class AppRedemptionCodeController {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user