mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-12-23 06:42:41 +00:00
fix: add fallback date formatting for cases when IntlUtil is not available
This commit is contained in:
parent
527e1b2c75
commit
1d732606f3
1 changed files with 6 additions and 1 deletions
|
|
@ -1458,7 +1458,12 @@
|
||||||
formatLastOnline(email) {
|
formatLastOnline(email) {
|
||||||
const ts = this.getLastOnline(email)
|
const ts = this.getLastOnline(email)
|
||||||
if (!ts) return '-'
|
if (!ts) return '-'
|
||||||
|
// Check if IntlUtil is available (may not be loaded yet)
|
||||||
|
if (typeof IntlUtil !== 'undefined' && IntlUtil.formatDate) {
|
||||||
return IntlUtil.formatDate(ts)
|
return IntlUtil.formatDate(ts)
|
||||||
|
}
|
||||||
|
// Fallback to simple date formatting if IntlUtil is not available
|
||||||
|
return new Date(ts).toLocaleString()
|
||||||
},
|
},
|
||||||
isRemovable(dbInboundId) {
|
isRemovable(dbInboundId) {
|
||||||
return this.getInboundClients(this.dbInbounds.find(row => row.id === dbInboundId)).length > 1;
|
return this.getInboundClients(this.dbInbounds.find(row => row.id === dbInboundId)).length > 1;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue