visual fixes

This commit is contained in:
Alireza Ahmadi
2025-01-05 21:53:16 +01:00
parent 5dd0baad34
commit b2195b72b9
10 changed files with 38 additions and 39 deletions
+4 -4
View File
@@ -144,10 +144,10 @@ export const HumanReadable = {
const remain = Math.floor((second/3600) - (day*24))
return day + i18n.global.t('date.d') + (remain > 0 ? ' ' + remain + i18n.global.t('date.h') : '')
},
remainedDays(exp:number): number|null {
if (exp == 0) return -1
remainedDays(exp:number): string {
if (exp == 0) return i18n.global.t('unlimited')
const now = Date.now()/1000
if (exp < now) return null
return Math.floor((exp - now) / (3600*24))
if (exp < now) return i18n.global.t('date.expired')
return Math.floor((exp - now) / (3600*24)) + " " + i18n.global.t('date.d')
}
}