修改文档和版本号

This commit is contained in:
eoao
2025-07-24 18:05:00 +08:00
parent 7267f03482
commit 775d976f10
14 changed files with 463 additions and 81 deletions

View File

@@ -245,7 +245,8 @@ const en = {
language: 'Language',
totalUserAccount: '{msg}',
sendBanned: 'Banned',
wrote: 'wrote'
wrote: 'wrote',
support: 'Support'
}
export default en

View File

@@ -245,6 +245,7 @@ const zh = {
language: '网站语言',
totalUserAccount: '{msg} 个',
sendBanned: '已禁用',
wrote: '来信'
wrote: '来信',
support: '赞助'
}
export default zh

View File

@@ -39,7 +39,7 @@ export function fromNow(date) {
if (isToday) {
if (diffSeconds < 60) return `Just now`;
if (diffMinutes < 60) return `${diffMinutes} min ago`;
if (diffHours < 24) return `${diffHours} hour${diffHours > 1 ? 's' : ''} ago`;
if (diffHours < 2) return `${diffHours} hour${diffHours > 1 ? 's' : ''} ago`;
return d.format('HH:mm');
}

View File

@@ -159,20 +159,18 @@ function openHistory(regKey) {
regKeyHistory(regKey.regKeyId).then(list => {
historyList.push(...list)
if (list.length > 0) {
const email = list.reduce((a, b) =>
a.email.length > b.email.length ? a : b
compareByLengthAndUpperCase(a, b, 'email')
).email;
emailColumnWidth.value = getTextWidth(email) + 30
emailColumnWidth.value = emailColumnWidth.value < 300 ? emailColumnWidth.value : 300
const createTime = list.reduce((a, b) =>
a.createTime.length > b.email.createTime ? a : b
);
createTimeColumnWidth.value = getTextWidth(createTime) + 30
compareByLengthAndUpperCase(a, b, 'createTime')
).createTime;
createTimeColumnWidth.value = getTextWidth(createTime)
}
}).finally(() => {
@@ -182,6 +180,14 @@ function openHistory(regKey) {
showRegKeyHistory.value = true
}
const compareByLengthAndUpperCase = (a, b, key) => {
const getUpperCaseCount = (str) => (str.match(/[A-Z]/g) || []).length;
if (a[key].length === b[key].length) {
return getUpperCaseCount(a[key]) > getUpperCaseCount(b[key]) ? a : b;
}
return a[key].length > b[key].length ? a : b;
};
function formatUserCreateTime(regKey) {
const createTime = tzDayjs(regKey.createTime);
const currentYear = dayjs().year();
@@ -197,7 +203,7 @@ function formatUserCreateTime(regKey) {
} else {
if (createYear === currentYear) {
if (expireYear === currentYear) {
return createTime.format('MMM D, HH:mm');
} else {
return createTime.format('MMM D, YYYY HH:mm');

View File

@@ -267,20 +267,29 @@
<div class="card-content">
<div class="concerning-item">
<span>{{$t('version')}} :</span>
<span>v1.3.1</span>
<span>v1.5.0</span>
</div>
<div class="concerning-item">
<span>{{$t('community')}} : </span>
<el-button @click="jump('https://github.com/eoao/cloud-mail')">
Github
<template #icon>
<Icon icon="codicon:github-inverted" width="22" height="22" />
</template>
</el-button>
<el-button @click="jump('https://t.me/cloud_mail_tg')">
telegram
Telegram
<template #icon>
<Icon icon="logos:telegram" width="30" height="30"/>
</template>
</el-button>
<el-button @click="jump('https://github.com/eoao/cloud-mail')">
github
</div>
<div class="concerning-item">
<span>{{$t('support')}} : </span>
<el-button @click="jump('https://afdian.com/a/eoao_')" >
Afdian
<template #icon>
<Icon icon="codicon:github-inverted" width="22" height="22" />
<Icon color="#8261DB" icon="simple-icons:afdian" width="24" height="24" />
</template>
</el-button>
</div>
@@ -505,9 +514,9 @@ const forwardEmail = ref([])
const forwardStatus = ref(0)
const emailColumnWidth = ref(0)
const tokenColumnWidth = ref(0)
const ruleType = ref(0)
const ruleEmail = ref([])
const resendList = computed(() => {
let list = Object.keys(setting.value.resendTokens).map(key => {
@@ -519,23 +528,27 @@ const resendList = computed(() => {
if (list.length > 0) {
const key = list.reduce((a, b) =>
a.key.length > b.key.length ? a : b
).key;
const key = list.reduce((a, b) => compareByLengthAndUpperCase(a, b, 'key')).key;
emailColumnWidth.value = getTextWidth(key) + 30;
emailColumnWidth.value = getTextWidth(key) + 30
const value = list.reduce((a, b) =>
a.value.length > b.value.length ? a : b
).value;
tokenColumnWidth.value = getTextWidth(value) + 30
const value = list.reduce((a, b) => compareByLengthAndUpperCase(a, b, 'value')).value;
tokenColumnWidth.value = getTextWidth(value) + 30;
}
return list;
});
const compareByLengthAndUpperCase = (a, b, key) => {
const getUpperCaseCount = (str) => (str.match(/[A-Z]/g) || []).length;
if (a[key].length === b[key].length) {
return getUpperCaseCount(a[key]) > getUpperCaseCount(b[key]) ? a : b;
}
return a[key].length > b[key].length ? a : b;
};
settingQuery().then(settingData => {
setting.value = settingData
resendTokenForm.domain = setting.value.domainList[0]