From 630d8c3bb69a626b67d5a399c7f504fc3931b760 Mon Sep 17 00:00:00 2001 From: Philip Allgaier Date: Thu, 29 Oct 2020 20:08:44 +0100 Subject: [PATCH] Add last-updated to state info tooltip (#7445) --- src/components/entity/state-info.js | 38 +++++++++++++++++++++++++---- src/translations/en.json | 1 + 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/src/components/entity/state-info.js b/src/components/entity/state-info.js index 36014db18e..d228de67de 100644 --- a/src/components/entity/state-info.js +++ b/src/components/entity/state-info.js @@ -59,6 +59,19 @@ class StateInfo extends LocalizeMixin(PolymerElement) { @apply --paper-font-common-nowrap; color: var(--secondary-text-color); } + + .row { + display: flex; + flex-direction: row; + flex-wrap: no-wrap; + width: 100%; + justify-content: space-between; + margin: 0 2px 4px 0; + } + + .row:last-child { + margin-bottom: 0px; + } `; } @@ -81,11 +94,26 @@ class StateInfo extends LocalizeMixin(PolymerElement) { datetime="[[stateObj.last_changed]]" > - [[localize('ui.dialogs.more_info_control.last_updated')]]: - +
+
+ + [[localize('ui.dialogs.more_info_control.last_changed')]]: + + +
+
+ + [[localize('ui.dialogs.more_info_control.last_updated')]]: + + +
+
diff --git a/src/translations/en.json b/src/translations/en.json index 5b804e72ff..6323e70856 100755 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -518,6 +518,7 @@ "details": "Details", "history": "History", "last_updated": "Last updated", + "last_changed": "Last changed", "script": { "last_action": "Last Action", "last_triggered": "Last Triggered"