mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Remove last used from long lived access token list. (#1727)
This commit is contained in:
parent
6720c03cbc
commit
2eb3a55f59
@ -44,10 +44,9 @@ class HaLongLivedTokens extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
</template>
|
||||
</div>
|
||||
<template is='dom-repeat' items='[[_tokens]]'>
|
||||
<ha-settings-row three-line>
|
||||
<ha-settings-row two-line>
|
||||
<span slot='heading'>[[item.client_name]]</span>
|
||||
<div slot='description'>[[_formatCreatedAt(item.created_at)]]</div>
|
||||
<div slot='description'>[[_formatLastUsed(item)]]</div>
|
||||
<paper-icon-button icon="hass:delete" on-click='_handleDelete'></paper-icon-button>
|
||||
</ha-settings-row>
|
||||
</template>
|
||||
@ -89,14 +88,6 @@ class HaLongLivedTokens extends LocalizeMixin(EventsMixin(PolymerElement)) {
|
||||
);
|
||||
}
|
||||
|
||||
_formatLastUsed(item) {
|
||||
return item.last_used_at ? this.localize(
|
||||
'ui.panel.profile.refresh_tokens.last_used',
|
||||
'date', formatDateTime(new Date(item.last_used_at), this.language),
|
||||
'location', item.last_used_ip
|
||||
) : this.localize('ui.panel.profile.refresh_tokens.not_used');
|
||||
}
|
||||
|
||||
async _handleCreate() {
|
||||
const name = prompt(this.localize('ui.panel.profile.long_lived_access_tokens.prompt_name'));
|
||||
if (!name) return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user