-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add time created to persistent notifications. #1733
Conversation
<hui-notification-item-template> | ||
<span slot="header">[[_computeTitle(notification)]]</span> | ||
|
||
<ha-markdown content="[[notification.message]]"></ha-markdown> | ||
|
||
<ha-relative-time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please wrap this in a paper-tooltip that shows the actual formatted date when hovered. Example
@@ -15,11 +17,29 @@ import LocalizeMixin from '../../../../mixins/localize-mixin.js'; | |||
export class HuiPersistentNotificationItem extends LocalizeMixin(PolymerElement) { | |||
static get template() { | |||
return html` | |||
<style> | |||
#time { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDs need to be unique on a page. This violates that
<hui-notification-item-template> | ||
<span slot="header">[[_computeTitle(notification)]]</span> | ||
|
||
<ha-markdown content="[[notification.message]]"></ha-markdown> | ||
|
||
<div id="time"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
notifications need to be unique.
2ec480f
to
1ed9fe4
Compare
1ed9fe4
to
dd8aff9
Compare
* Add time created to persistent notifications. * Add tooltip to show actual date. * Fix style rules. * Fix duplicate ids.
* Add time created to persistent notifications. * Add tooltip to show actual date. * Fix style rules. * Fix duplicate ids.
* Add time created to persistent notifications. * Add tooltip to show actual date. * Fix style rules. * Fix duplicate ids.
Adds relative creation time to persistent notifications in lovelace notification drawer
Depends on home-assistant/core#17121
Closes home-assistant/ui-schema#170