feat: 云账号卡片改用品牌SVG图标替代纯文字色块

- 新建 CloudBrandIcon 组件: AWS/Azure/GCP/阿里云/腾讯云/华为云 官方品牌色+SVG路径
- 图标数据源同 TechIcons.dev / VectorLogo.zone (simple-icons 开源项目)
- CloudAccountManager: providerIcons纯文字→CloudBrandIcon SVG品牌图标
- 卡片底部品牌色描边替代满色背景块
- 新增 GCP 到 provider 列表
This commit is contained in:
attacker committed 2026-06-15 07:37:29 +08:00
1 parent 011f3d6b51
commit 8c4b59510d
15 files changed
+94 -12

No files matched your search

@@ -25,21 +25,15 @@ import {
Loader2,
} from 'lucide-react';
import { cloudApi } from '@/services/api';
import { CloudBrandIcon, getProviderColor } from '@/components/icons/CloudBrandIcon';
const providerIcons: Record<string, string> = {
const providerLabels: Record<string, string> = {
aws: 'AWS',
aliyun: '阿里云',
tencent: '腾讯云',
huawei: '华为云',
azure: 'Azure',
};
const providerColors: Record<string, string> = {
aws: 'bg-orange-500',
aliyun: 'bg-orange-600',
tencent: 'bg-blue-500',
huawei: 'bg-red-500',
azure: 'bg-blue-600',
gcp: 'GCP',
};
export function CloudAccountManager() {
@@ -283,12 +277,12 @@ export function CloudAccountManager() {
<CardContent className="p-4">
<div className="flex items-start justify-between">
<div className="flex items-start gap-3">
<div className={`w-10 h-10 rounded-lg ${providerColors[account.provider] || 'bg-blue-500'} flex items-center justify-center text-white font-bold text-xs`}>
{providerIcons[account.provider]?.slice(0, 2) || (account.provider || '').slice(0, 2).toUpperCase()}
<div className="w-10 h-10 rounded-lg bg-slate-800 flex items-center justify-center" style={{ borderBottom: `2px solid ${getProviderColor(account.provider)}` }}>
<CloudBrandIcon provider={account.provider} className="h-6 w-6" />
</div>
<div>
<h3 className="font-medium text-slate-100">{account.name}</h3>
<p className="text-sm text-slate-400 mt-0.5">{providerIcons[account.provider]}</p>
<p className="text-sm text-slate-400 mt-0.5">{providerLabels[account.provider] || account.provider}</p>
<div className="flex items-center gap-3 mt-2">
{accessKey && (
<Badge variant="secondary" className="bg-slate-700 text-slate-300">