mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 21:00:57 +00:00
Run prettier
This commit is contained in:
@@ -368,9 +368,9 @@ Module.register("calendar", {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Show relative times
|
// Show relative times
|
||||||
if ((event.startDate >= now) || (event.fullDayEvent && event.today)) {
|
if (event.startDate >= now || (event.fullDayEvent && event.today)) {
|
||||||
// Use relative time
|
// Use relative time
|
||||||
if ((!this.config.hideTime) && (!event.fullDayEvent)) {
|
if (!this.config.hideTime && !event.fullDayEvent) {
|
||||||
timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").calendar(null, { sameElse: this.config.dateFormat }));
|
timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").calendar(null, { sameElse: this.config.dateFormat }));
|
||||||
} else {
|
} else {
|
||||||
timeWrapper.innerHTML = this.capFirst(
|
timeWrapper.innerHTML = this.capFirst(
|
||||||
@@ -378,7 +378,7 @@ Module.register("calendar", {
|
|||||||
sameDay: "[" + this.translate("TODAY") + "]",
|
sameDay: "[" + this.translate("TODAY") + "]",
|
||||||
nextDay: "[" + this.translate("TOMORROW") + "]",
|
nextDay: "[" + this.translate("TOMORROW") + "]",
|
||||||
nextWeek: "dddd",
|
nextWeek: "dddd",
|
||||||
sameElse: (event.fullDayEvent ? this.config.fullDayEventDateFormat : this.config.dateFormat)
|
sameElse: event.fullDayEvent ? this.config.fullDayEventDateFormat : this.config.dateFormat
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -396,7 +396,8 @@ Module.register("calendar", {
|
|||||||
} else if (event.startDate - now < this.config.getRelative * oneHour) {
|
} else if (event.startDate - now < this.config.getRelative * oneHour) {
|
||||||
// If event is within getRelative hours, display 'in xxx' time format or moment.fromNow()
|
// If event is within getRelative hours, display 'in xxx' time format or moment.fromNow()
|
||||||
timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow());
|
timeWrapper.innerHTML = this.capFirst(moment(event.startDate, "x").fromNow());
|
||||||
} } else {
|
}
|
||||||
|
} else {
|
||||||
// Ongoing event
|
// Ongoing event
|
||||||
timeWrapper.innerHTML = this.capFirst(
|
timeWrapper.innerHTML = this.capFirst(
|
||||||
this.translate("RUNNING", {
|
this.translate("RUNNING", {
|
||||||
|
Reference in New Issue
Block a user