Merge pull request #54 from ikaven1024/feat-ttl

perf: display human-readable ttl
This commit is contained in:
Lykin 2023-10-15 19:53:41 +08:00 committed by GitHub
commit c0bf201697
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -107,7 +107,9 @@ const onDeleteKey = () => {
<template v-if="ttl < 0"> <template v-if="ttl < 0">
{{ $t('interface.forever') }} {{ $t('interface.forever') }}
</template> </template>
<template v-else>{{ ttl }} {{ $t('common.second') }}</template> <template v-else>
{{ Math.floor(ttl/3600) }}:{{ Math.floor((ttl%3600)/60) }}:{{ Math.floor(ttl%60) }}
</template>
</n-button> </n-button>
</template> </template>
TTL TTL