diff --git a/client/@types/global.d.ts b/client/@types/global.d.ts index 0f4137b1..dd200ec7 100644 --- a/client/@types/global.d.ts +++ b/client/@types/global.d.ts @@ -117,6 +117,7 @@ declare const LOC_SHARE_CHAT_DOCK: string declare const LOC_SHARE_CHAT_DOCK_TIPS: string declare const LOC_TOKEN_LABEL: string declare const LOC_TOKEN_PASSWORD: string +declare const LOC_TOKEN_DATE: string declare const LOC_TOKEN_ACTION_CREATE: string declare const LOC_TOKEN_ACTION_REVOKE: string declare const LOC_TOKEN_DEFAULT_LABEL: string diff --git a/client/common/lib/elements/templates/token-list.ts b/client/common/lib/elements/templates/token-list.ts index 063c5638..9ac92110 100644 --- a/client/common/lib/elements/templates/token-list.ts +++ b/client/common/lib/elements/templates/token-list.ts @@ -16,13 +16,18 @@ export function tplTokenList (el: LivechatTokenListElement): TemplateResult { ${ptTr(LOC_TOKEN_LABEL)} - ${ptTr(LOC_TOKEN_PASSWORD)} + ${ptTr(LOC_TOKEN_DATE)} ${ repeat(el.tokenList ?? [], (token) => token.id, (token) => { + let dateStr: string = '' + try { + const date = new Date(token.date) + dateStr = date.toLocaleDateString() + ' ' + date.toLocaleTimeString() + } catch (err) {} return html` ${ el.mode === 'select' @@ -43,7 +48,7 @@ export function tplTokenList (el: LivechatTokenListElement): TemplateResult {