diff --git a/static/js/features/groups.js b/static/js/features/groups.js index 4225754..5bebcc8 100644 --- a/static/js/features/groups.js +++ b/static/js/features/groups.js @@ -129,6 +129,12 @@ } } + // 显示「注册Outlook账号」按钮(仅在非临时邮箱分组时) + const registerBtn = document.getElementById('registerOutlookBtn'); + if (registerBtn) { + registerBtn.style.display = isTempEmailGroup ? 'none' : ''; + } + // 更新底部按钮 updateAccountPanelFooter(); @@ -173,6 +179,22 @@ } } + // 获取 provider 的中文展示名(账号卡片 tag) + function getProviderLabel(provider) { + const key = (provider || 'outlook').toString().toLowerCase(); + const labels = { + outlook: 'Outlook', + gmail: 'Gmail', + qq: 'QQ邮箱', + '163': '163邮箱', + '126': '126邮箱', + yahoo: 'Yahoo邮箱', + aliyun: '阿里邮箱', + custom: '自定义IMAP' + }; + return labels[key] || provider || '未知'; + } + // 渲染邮箱列表 function renderAccountList(accounts) { const container = document.getElementById('accountList'); @@ -210,6 +232,8 @@ const initial = (acc.email || '?')[0].toUpperCase(); const isFailed = acc.last_refresh_status === 'failed'; const gradient = avatarGradients[index % avatarGradients.length]; + const providerLabel = getProviderLabel(acc.provider || acc.account_type || 'outlook'); + const providerTagHtml = `${escapeHtml(providerLabel)}`; let tokenBadge = '– 未知'; if (acc.token_status === 'valid') { @@ -235,6 +259,7 @@ ${acc.remark && acc.remark.trim() ? `