mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 09:16:38 +00:00
await copy clipboard (#23438)
This commit is contained in:
parent
637fe37ef4
commit
fc8a8b28c2
@ -395,8 +395,8 @@ class DialogBackupOnboarding extends LitElement implements HassDialog {
|
||||
downloadEmergencyKit(this.hass, key);
|
||||
}
|
||||
|
||||
private _copyKeyToClipboard() {
|
||||
copyToClipboard(this._config!.create_backup.password!);
|
||||
private async _copyKeyToClipboard() {
|
||||
await copyToClipboard(this._config!.create_backup.password!);
|
||||
showToast(this, {
|
||||
message: this.hass.localize("ui.common.copied_clipboard"),
|
||||
});
|
||||
|
@ -205,18 +205,18 @@ class DialogChangeBackupEncryptionKey extends LitElement implements HassDialog {
|
||||
return nothing;
|
||||
}
|
||||
|
||||
private _copyKeyToClipboard() {
|
||||
copyToClipboard(this._newEncryptionKey);
|
||||
private async _copyKeyToClipboard() {
|
||||
await copyToClipboard(this._newEncryptionKey);
|
||||
showToast(this, {
|
||||
message: this.hass.localize("ui.common.copied_clipboard"),
|
||||
});
|
||||
}
|
||||
|
||||
private _copyOldKeyToClipboard() {
|
||||
private async _copyOldKeyToClipboard() {
|
||||
if (!this._params?.currentKey) {
|
||||
return;
|
||||
}
|
||||
copyToClipboard(this._params.currentKey);
|
||||
await copyToClipboard(this._params.currentKey);
|
||||
showToast(this, {
|
||||
message: this.hass.localize("ui.common.copied_clipboard"),
|
||||
});
|
||||
|
@ -324,10 +324,10 @@ class HaPanelDevState extends LitElement {
|
||||
`;
|
||||
}
|
||||
|
||||
private _copyEntity(ev) {
|
||||
private async _copyEntity(ev) {
|
||||
ev.preventDefault();
|
||||
const entity = (ev.currentTarget! as any).entity;
|
||||
copyToClipboard(entity.entity_id);
|
||||
await copyToClipboard(entity.entity_id);
|
||||
}
|
||||
|
||||
private _entitySelected(ev) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user