mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 17:56:46 +00:00
Fix showing sub info (#1785)
This commit is contained in:
parent
a6b4cce7f3
commit
af81ede100
@ -199,15 +199,23 @@ class HaConfigCloudAccount extends EventsMixin(LocalizeMixin(PolymerElement)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_formatSubscription(subInfo) {
|
_formatSubscription(subInfo) {
|
||||||
return subInfo === null
|
if (subInfo === null) {
|
||||||
? "Fetching subscription…"
|
return "Fetching subscription…";
|
||||||
: subInfo.human_description.replace(
|
}
|
||||||
"{periodEnd}",
|
|
||||||
formatDateTime(
|
let description = subInfo.human_description;
|
||||||
new Date(subInfo.subscription.current_period_end * 1000),
|
|
||||||
this.language
|
if (subInfo.plan_renewal_date) {
|
||||||
)
|
description = description.replace(
|
||||||
);
|
"{periodEnd}",
|
||||||
|
formatDateTime(
|
||||||
|
new Date(subInfo.plan_renewal_date * 1000),
|
||||||
|
this.language
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return description;
|
||||||
}
|
}
|
||||||
|
|
||||||
_alexaChanged(ev) {
|
_alexaChanged(ev) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user