diff options
| author | Ali Golzar <57574919+aliglzr@users.noreply.github.com> | 2025-08-27 20:30:49 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-27 20:30:49 +0300 |
| commit | 21983971971b14377b36c8db92c8603f723f955d (patch) | |
| tree | 1bdc1838e95c52f6a87b96c1d0b0708dcde806f2 /web/html | |
| parent | d10c312e62e0abf6da64e21a55c51151e23d9929 (diff) | |
Created / Updated fields for clients (#3384)
* feat(backend): add created_at/updated_at to clients and maintain on create/update
backfill existing clients and set updated_at on mutations
* feat(frontend): carry created_at/updated_at in client models and round-trip via JSON
* feat(frontend): display Created and Updated columns in client table with proper date formatting
* i18n: add pages.inbounds.createdAt/updatedAt across all locales
* Update inbound.go
Remove duplicate code
Diffstat (limited to 'web/html')
| -rw-r--r-- | web/html/component/aClientTable.html | 26 | ||||
| -rw-r--r-- | web/html/inbounds.html | 2 |
2 files changed, 28 insertions, 0 deletions
diff --git a/web/html/component/aClientTable.html b/web/html/component/aClientTable.html index 96bd502f..359e6e74 100644 --- a/web/html/component/aClientTable.html +++ b/web/html/component/aClientTable.html @@ -278,4 +278,30 @@ </a-badge> </a-popover> </template> +<template slot="createdAt" slot-scope="text, client, index"> + <template v-if="client.created_at"> + <template v-if="app.datepicker === 'gregorian'"> + [[ DateUtil.formatMillis(client.created_at) ]] + </template> + <template v-else> + [[ DateUtil.convertToJalalian(moment(client.created_at)) ]] + </template> + </template> + <template v-else> + - + </template> +</template> +<template slot="updatedAt" slot-scope="text, client, index"> + <template v-if="client.updated_at"> + <template v-if="app.datepicker === 'gregorian'"> + [[ DateUtil.formatMillis(client.updated_at) ]] + </template> + <template v-else> + [[ DateUtil.convertToJalalian(moment(client.updated_at)) ]] + </template> + </template> + <template v-else> + - + </template> +</template> {{end}} diff --git a/web/html/inbounds.html b/web/html/inbounds.html index 58d2d07a..010296eb 100644 --- a/web/html/inbounds.html +++ b/web/html/inbounds.html @@ -760,6 +760,8 @@ { title: '{{ i18n "pages.inbounds.client" }}', width: 80, scopedSlots: { customRender: 'client' } }, { title: '{{ i18n "pages.inbounds.traffic" }}', width: 80, align: 'center', scopedSlots: { customRender: 'traffic' } }, { title: '{{ i18n "pages.inbounds.expireDate" }}', width: 80, align: 'center', scopedSlots: { customRender: 'expiryTime' } }, + { title: '{{ i18n "pages.inbounds.createdAt" }}', width: 90, align: 'center', scopedSlots: { customRender: 'createdAt' } }, + { title: '{{ i18n "pages.inbounds.updatedAt" }}', width: 90, align: 'center', scopedSlots: { customRender: 'updatedAt' } }, ]; const innerMobileColumns = [ |
