mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-19 15:26:36 +00:00
Add last-updated to state info tooltip (#7445)
This commit is contained in:
parent
f0e959319e
commit
630d8c3bb6
@ -59,6 +59,19 @@ class StateInfo extends LocalizeMixin(PolymerElement) {
|
|||||||
@apply --paper-font-common-nowrap;
|
@apply --paper-font-common-nowrap;
|
||||||
color: var(--secondary-text-color);
|
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;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
@ -81,11 +94,26 @@ class StateInfo extends LocalizeMixin(PolymerElement) {
|
|||||||
datetime="[[stateObj.last_changed]]"
|
datetime="[[stateObj.last_changed]]"
|
||||||
></ha-relative-time>
|
></ha-relative-time>
|
||||||
<paper-tooltip animation-delay="0" for="last_changed">
|
<paper-tooltip animation-delay="0" for="last_changed">
|
||||||
[[localize('ui.dialogs.more_info_control.last_updated')]]:
|
<div>
|
||||||
<ha-relative-time
|
<div class="row">
|
||||||
hass="[[hass]]"
|
<span class="column-name">
|
||||||
datetime="[[stateObj.last_updated]]"
|
[[localize('ui.dialogs.more_info_control.last_changed')]]:
|
||||||
></ha-relative-time>
|
</span>
|
||||||
|
<ha-relative-time
|
||||||
|
hass="[[hass]]"
|
||||||
|
datetime="[[stateObj.last_changed]]"
|
||||||
|
></ha-relative-time>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<span>
|
||||||
|
[[localize('ui.dialogs.more_info_control.last_updated')]]:
|
||||||
|
</span>
|
||||||
|
<ha-relative-time
|
||||||
|
hass="[[hass]]"
|
||||||
|
datetime="[[stateObj.last_updated]]"
|
||||||
|
></ha-relative-time>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</paper-tooltip>
|
</paper-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -518,6 +518,7 @@
|
|||||||
"details": "Details",
|
"details": "Details",
|
||||||
"history": "History",
|
"history": "History",
|
||||||
"last_updated": "Last updated",
|
"last_updated": "Last updated",
|
||||||
|
"last_changed": "Last changed",
|
||||||
"script": {
|
"script": {
|
||||||
"last_action": "Last Action",
|
"last_action": "Last Action",
|
||||||
"last_triggered": "Last Triggered"
|
"last_triggered": "Last Triggered"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user