diff --git a/backend/util/genLink.go b/backend/util/genLink.go index e113008..98b06e4 100644 --- a/backend/util/genLink.go +++ b/backend/util/genLink.go @@ -29,7 +29,6 @@ func LinkGenerator(clientConfig json.RawMessage, i *model.Inbound, hostname stri var Addrs []map[string]interface{} json.Unmarshal(i.Addrs, &Addrs) - fmt.Printf("AddrsArray: %+v\n", Addrs) if len(Addrs) == 0 { Addrs = append(Addrs, map[string]interface{}{ "server": hostname, diff --git a/frontend/src/plugins/utils.ts b/frontend/src/plugins/utils.ts index 63f79c1..0fafeb8 100644 --- a/frontend/src/plugins/utils.ts +++ b/frontend/src/plugins/utils.ts @@ -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') } } \ No newline at end of file diff --git a/frontend/src/types/outbounds.ts b/frontend/src/types/outbounds.ts index 8690b22..fe475e9 100644 --- a/frontend/src/types/outbounds.ts +++ b/frontend/src/types/outbounds.ts @@ -1,4 +1,4 @@ -import { oTls } from "./outTls" +import { oTls } from "./tls" import { oMultiplex } from "./multiplex" import { Transport } from "./transport" diff --git a/frontend/src/views/Admins.vue b/frontend/src/views/Admins.vue index a8c9e20..702970e 100644 --- a/frontend/src/views/Admins.vue +++ b/frontend/src/views/Admins.vue @@ -27,19 +27,19 @@ {{ $t('admin.date') }} - + {{ item.loginDate }} {{ $t('admin.time') }} - + {{ item.loginTime }} IP - + {{ item.ip }} diff --git a/frontend/src/views/Clients.vue b/frontend/src/views/Clients.vue index 38ffdfc..ad80205 100644 --- a/frontend/src/views/Clients.vue +++ b/frontend/src/views/Clients.vue @@ -158,7 +158,7 @@ {{ $t('pages.inbounds') }} - + {{ inbounds.find(inb => inb.id == i)?.tag }}
@@ -167,19 +167,19 @@
{{ $t('stats.volume') }} - + {{ item.volume == 0 ? $t('unlimited') : HumanReadable.sizeFormat(item.volume) }} {{ $t('date.expiry') }} - - {{ item.expiry == 0 ? $t('unlimited') : HumanReadable.remainedDays(item.expiry)?? $t('date.expired') }} + + {{ HumanReadable.remainedDays(item.expiry) }} {{ $t('stats.usage') }} - + {{ $t('stats.upload') }}:{{ HumanReadable.sizeFormat(item.up) }}
{{ $t('stats.download') }}:{{ HumanReadable.sizeFormat(item.down) }}
@@ -192,7 +192,7 @@
{{ $t('online') }} - + @@ -275,7 +275,7 @@ {{ item.expiry == 0 ? $t('unlimited') : HumanReadable.remainedDays(item.expiry)?? $t('date.expired') }} + >{{ HumanReadable.remainedDays(item.expiry) }}