fix: tab名称改为余额充值/套餐订阅、有效期直接显示配置值、模型标签跟随平台颜色

1. MainTabs: "按量付费"→"余额充值","包月套餐"→"套餐订阅"
2. subscription-utils: 去掉所有智能转换,配置什么就显示什么(1月/30天/2周)
3. platform-style: 新增 modelTag 样式字段,每个平台独立颜色
4. ChannelCard: 模型标签颜色跟随平台(橙/绿/蓝/粉/紫)而非统一蓝色
This commit is contained in:
erio
2026-03-14 02:02:03 +08:00
parent d8078eb38c
commit 5ce7ba3cb8
4 changed files with 40 additions and 36 deletions

View File

@@ -3,7 +3,7 @@
import React from 'react';
import type { Locale } from '@/lib/locale';
import { pickLocaleText } from '@/lib/locale';
import { PlatformBadge } from '@/lib/platform-style';
import { PlatformBadge, getPlatformStyle } from '@/lib/platform-style';
export interface ChannelInfo {
id: string;
@@ -26,6 +26,8 @@ interface ChannelCardProps {
export default function ChannelCard({ channel, onTopUp, isDark, locale }: ChannelCardProps) {
const usableQuota = (1 / channel.rateMultiplier).toFixed(2);
const platformStyle = getPlatformStyle(channel.platform);
const tagCls = isDark ? platformStyle.modelTag.dark : platformStyle.modelTag.light;
return (
<div
@@ -84,12 +86,10 @@ export default function ChannelCard({ channel, onTopUp, isDark, locale }: Channe
key={model}
className={[
'inline-flex items-center gap-1.5 rounded-lg border px-2.5 py-1 text-xs',
isDark
? 'border-blue-500/20 bg-gradient-to-r from-blue-500/10 to-purple-500/10 text-blue-400'
: 'border-blue-500/20 bg-gradient-to-r from-blue-500/10 to-purple-500/10 text-blue-600',
tagCls,
].join(' ')}
>
<span className="h-1.5 w-1.5 rounded-full bg-blue-500" />
<span className={['h-1.5 w-1.5 rounded-full', platformStyle.modelTag.dot].join(' ')} />
{model}
</span>
))}