From c30e7ac68334e03e4f97e29e1222807f99f07f04 Mon Sep 17 00:00:00 2001 From: Jerad Meisner Date: Sun, 7 Oct 2018 09:59:54 -0700 Subject: [PATCH] Add time created to persistent notifications. (#1733) * Add time created to persistent notifications. * Add tooltip to show actual date. * Fix style rules. * Fix duplicate ids. --- .../hui-persistent-notification-item.js | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/panels/lovelace/components/notifications/hui-persistent-notification-item.js b/src/panels/lovelace/components/notifications/hui-persistent-notification-item.js index dcb4aeeb7b..ade2b4b110 100644 --- a/src/panels/lovelace/components/notifications/hui-persistent-notification-item.js +++ b/src/panels/lovelace/components/notifications/hui-persistent-notification-item.js @@ -1,9 +1,11 @@ import '@polymer/paper-button/paper-button.js'; import '@polymer/paper-icon-button/paper-icon-button.js'; +import '@polymer/paper-tooltip/paper-tooltip.js'; import { html } from '@polymer/polymer/lib/utils/html-tag.js'; import { PolymerElement } from '@polymer/polymer/polymer-element.js'; +import '../../../../components/ha-relative-time.js'; import '../../../../components/ha-markdown.js'; import './hui-notification-item-template.js'; @@ -15,11 +17,31 @@ import LocalizeMixin from '../../../../mixins/localize-mixin.js'; export class HuiPersistentNotificationItem extends LocalizeMixin(PolymerElement) { static get template() { return html` + [[_computeTitle(notification)]] +
+ + + [[_computeTooltip(hass, notification)]] + +
+