Add onClick listener to dismiss toast notification. (#7268)

This commit is contained in:
Gilson Marquato Júnior 2020-10-21 12:03:31 +01:00 committed by GitHub
parent 01b9a07320
commit 4a5935ee36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -34,6 +34,10 @@ export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
"Home Assistant is starting, not everything will be available until it is finished.", "Home Assistant is starting, not everything will be available until it is finished.",
duration: 0, duration: 0,
dismissable: false, dismissable: false,
action: {
text: this.hass!.localize("ui.notification_toast.dismiss"),
action: () => {},
},
}); });
} else if ( } else if (
oldHass?.config && oldHass?.config &&

View File

@ -695,7 +695,8 @@
"connection_lost": "Connection lost. Reconnecting…", "connection_lost": "Connection lost. Reconnecting…",
"started": "Home Assistant has started!", "started": "Home Assistant has started!",
"starting": "Home Assistant is starting, not everything will be available until it is finished.", "starting": "Home Assistant is starting, not everything will be available until it is finished.",
"triggered": "Triggered {name}" "triggered": "Triggered {name}",
"dismiss": "Dismiss"
}, },
"sidebar": { "sidebar": {
"external_app_configuration": "App Configuration", "external_app_configuration": "App Configuration",