feat: add ip.im link for source IP in admin account list (#841)

This commit is contained in:
Dream Hunter
2026-02-25 13:59:53 +08:00
committed by GitHub
parent 566c6536d1
commit 723e1fe75d
2 changed files with 16 additions and 1 deletions

View File

@@ -20,6 +20,7 @@
### Improvements
- style: |邮件列表| 优化收件箱和发件箱空状态显示,根据邮件数量显示不同提示信息,添加语义化图标
- feat: |后台管理| 邮箱地址列表来源IP添加 ip.im 查询链接点击可快速查看IP信息
## v1.3.0

View File

@@ -323,7 +323,21 @@ const columns = [
},
{
title: t('source_meta'),
key: "source_meta"
key: "source_meta",
render(row) {
const val = row.source_meta;
if (!val) return '';
const ipv4Regex = /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;
const ipv6Regex = /^[0-9a-fA-F:]+$/;
if (ipv4Regex.test(val) || (val.includes(':') && ipv6Regex.test(val) && !val.startsWith('tg:'))) {
return h('a', {
href: `https://ip.im/${val}`,
target: '_blank',
rel: 'noopener noreferrer'
}, val);
}
return val;
}
},
{
title: t('mail_count'),