mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-06-11 02:20:56 +08:00
feat: add ip.im link for source IP in admin account list (#841)
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user