feat(mpuniapp): 重构名片主个人中心与我的页面,达成瑞士国际主义与Bento Grid现代SaaS体验
这个提交包含在:
@@ -335,6 +335,23 @@ export function removeAccountAvatar(state: ProfileState): void {
|
||||
state.account.avatar = '';
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算配额使用百分比 (0-100),防溢出与除零防御
|
||||
*/
|
||||
export function calculateQuotaPercent(used: number, limit: number): number {
|
||||
if (limit <= 0) {
|
||||
return 100;
|
||||
}
|
||||
if (used <= 0) {
|
||||
return 0;
|
||||
}
|
||||
const pct = Math.round((used / limit) * 100);
|
||||
if (pct > 100) {
|
||||
return 100;
|
||||
}
|
||||
return pct;
|
||||
}
|
||||
|
||||
/**
|
||||
* 瑞士国际主义多语言文案解析器,无 emoji
|
||||
*/
|
||||
@@ -370,6 +387,18 @@ export function resolveProfileText(key: string): string {
|
||||
return isZh ? '部门' : 'Department';
|
||||
case 'avatarLabel':
|
||||
return isZh ? '头像' : 'Avatar';
|
||||
case 'tierPro':
|
||||
return isZh ? '商业专业版' : 'Pro Plan';
|
||||
case 'tierBadge':
|
||||
return 'PRO';
|
||||
case 'previewPortal':
|
||||
return isZh ? '预览官网' : 'Preview Site';
|
||||
case 'metricsCards':
|
||||
return isZh ? '活跃名片' : 'Active Cards';
|
||||
case 'metricsVisitors':
|
||||
return isZh ? '雷达访客' : 'Radar Visitors';
|
||||
case 'metricsLeads':
|
||||
return isZh ? '沉淀线索' : 'Captured Leads';
|
||||
case 'notificationsSection':
|
||||
return isZh ? '消息通知' : 'Notifications';
|
||||
case 'radarPushTitle':
|
||||
@@ -387,7 +416,9 @@ export function resolveProfileText(key: string): string {
|
||||
case 'logout':
|
||||
return isZh ? '退出登录' : 'Log out';
|
||||
case 'workspaceSection':
|
||||
return isZh ? '工作台' : 'Workspace';
|
||||
return isZh ? '出海工作台' : 'Workspace';
|
||||
case 'nfcSection':
|
||||
return isZh ? 'NFC 智能硬件' : 'NFC Fleet';
|
||||
case 'nfcScan':
|
||||
return isZh ? 'NFC 贴卡激活' : 'Activate NFC card';
|
||||
case 'nfcMode':
|
||||
@@ -397,11 +428,19 @@ export function resolveProfileText(key: string): string {
|
||||
case 'teamBriefing':
|
||||
return isZh ? '展会战报' : 'Team briefing';
|
||||
case 'quotaSection':
|
||||
return isZh ? '套餐配额' : 'Plan quota';
|
||||
return isZh ? '套餐与配额' : 'Plan & Quota';
|
||||
case 'quotaCards':
|
||||
return isZh ? '名片用量' : 'Card usage';
|
||||
case 'quotaUpgrade':
|
||||
return isZh ? '已达上限,请升级套餐' : 'Limit reached. Upgrade to continue.';
|
||||
case 'upgradeQuota':
|
||||
return isZh ? '升级扩容' : 'Upgrade Plan';
|
||||
case 'planActive':
|
||||
return isZh ? '生效中' : 'Active';
|
||||
case 'confirmLogoutTitle':
|
||||
return isZh ? '确认退出' : 'Sign Out';
|
||||
case 'confirmLogoutContent':
|
||||
return isZh ? '确定要退出当前账号吗?' : 'Are you sure you want to sign out?';
|
||||
default:
|
||||
return key;
|
||||
}
|
||||
|
||||
在新工单中引用
屏蔽一个用户