Share chat dock tab: adding date column, removing password column.
This commit is contained in:
parent
9f4a92609b
commit
22ea1a36ae
1
client/@types/global.d.ts
vendored
1
client/@types/global.d.ts
vendored
@ -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
|
||||
|
@ -16,13 +16,18 @@ export function tplTokenList (el: LivechatTokenListElement): TemplateResult {
|
||||
<tr>
|
||||
<th scope="col"></th>
|
||||
<th scope="col">${ptTr(LOC_TOKEN_LABEL)}</th>
|
||||
<th scope="col">${ptTr(LOC_TOKEN_PASSWORD)}</th>
|
||||
<th scope="col">${ptTr(LOC_TOKEN_DATE)}</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
${
|
||||
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`<tr>
|
||||
<td>${
|
||||
el.mode === 'select'
|
||||
@ -43,7 +48,7 @@ export function tplTokenList (el: LivechatTokenListElement): TemplateResult {
|
||||
</td>
|
||||
<td>
|
||||
<label for=${`livechat-token-radio-${token.id}`}>
|
||||
${token.password}
|
||||
${dateStr}
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
|
Loading…
x
Reference in New Issue
Block a user