mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 20:22:53 +00:00
Merge branch 'develop' into mm-install
This commit is contained in:
commit
d4c4f6e1a5
@ -11,13 +11,17 @@ _This release is scheduled to be released on 2022-10-01._
|
|||||||
|
|
||||||
## Added
|
## Added
|
||||||
|
|
||||||
- new scripts `install-mm` (and `install-mm:dev`) for simplifying mm installation (now: `npm run install-mm`) and adding params `--no-audit --no-fund --no-update-notifier` for less noise.
|
- New scripts `install-mm` (and `install-mm:dev`) for simplifying mm installation (now: `npm run install-mm`) and adding params `--no-audit --no-fund --no-update-notifier` for less noise.
|
||||||
|
- New `showTimeToday` option in calendar module shows time for current-day events even if `timeFormat` is `"relative"`
|
||||||
|
|
||||||
## Updated
|
## Updated
|
||||||
|
|
||||||
|
- Removed DAYAFTERTOMORROW from English
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
- Broadcast all calendar events while still honoring global and per-calendar maximumEntries.
|
- Broadcast all calendar events while still honoring global and per-calendar maximumEntries.
|
||||||
|
- Respect rss ttl provided by newsfeed (#2883).
|
||||||
|
|
||||||
## [2.20.0] - 2022-07-02
|
## [2.20.0] - 2022-07-02
|
||||||
|
|
||||||
|
@ -37,6 +37,7 @@ Module.register("calendar", {
|
|||||||
hidePrivate: false,
|
hidePrivate: false,
|
||||||
hideOngoing: false,
|
hideOngoing: false,
|
||||||
hideTime: false,
|
hideTime: false,
|
||||||
|
showTimeToday: false,
|
||||||
colored: false,
|
colored: false,
|
||||||
coloredSymbolOnly: false,
|
coloredSymbolOnly: false,
|
||||||
customEvents: [], // Array of {keyword: "", symbol: "", color: ""} where Keyword is a regexp and symbol/color are to be applied for matched
|
customEvents: [], // Array of {keyword: "", symbol: "", color: ""} where Keyword is a regexp and symbol/color are to be applied for matched
|
||||||
@ -368,7 +369,7 @@ Module.register("calendar", {
|
|||||||
} else {
|
} else {
|
||||||
timeWrapper.innerHTML = this.capFirst(
|
timeWrapper.innerHTML = this.capFirst(
|
||||||
moment(event.startDate, "x").calendar(null, {
|
moment(event.startDate, "x").calendar(null, {
|
||||||
sameDay: "[" + this.translate("TODAY") + "]",
|
sameDay: this.config.showTimeToday ? "LT" : "[" + 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
|
||||||
|
@ -78,6 +78,19 @@ const NewsfeedFetcher = function (url, reloadInterval, encoding, logFeedWarnings
|
|||||||
scheduleTimer();
|
scheduleTimer();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
parser.on("ttl", (minutes) => {
|
||||||
|
try {
|
||||||
|
// 86400000 = 24 hours is mentioned in the docs as maximum value:
|
||||||
|
const ttlms = Math.min(minutes * 60 * 1000, 86400000);
|
||||||
|
if (ttlms > reloadInterval) {
|
||||||
|
reloadInterval = ttlms;
|
||||||
|
Log.info("Newsfeed-Fetcher: reloadInterval set to ttl=" + reloadInterval + " for url " + url);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
Log.warn("Newsfeed-Fetcher: feed ttl is no valid integer=" + minutes + " for url " + url);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const nodeVersion = Number(process.version.match(/^v(\d+\.\d+)/)[1]);
|
const nodeVersion = Number(process.version.match(/^v(\d+\.\d+)/)[1]);
|
||||||
const headers = {
|
const headers = {
|
||||||
"User-Agent": "Mozilla/5.0 (Node.js " + nodeVersion + ") MagicMirror/" + global.version,
|
"User-Agent": "Mozilla/5.0 (Node.js " + nodeVersion + ") MagicMirror/" + global.version,
|
||||||
|
@ -164,7 +164,7 @@ describe("Translations", function () {
|
|||||||
dom.window.onload = function () {
|
dom.window.onload = function () {
|
||||||
const { Translator } = dom.window;
|
const { Translator } = dom.window;
|
||||||
|
|
||||||
Translator.load(mmm, translations.en, false, function () {
|
Translator.load(mmm, translations.de, false, function () {
|
||||||
base = Object.keys(Translator.translations[mmm.name]).sort();
|
base = Object.keys(Translator.translations[mmm.name]).sort();
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
@ -175,8 +175,10 @@ describe("Translations", function () {
|
|||||||
console.log(missing);
|
console.log(missing);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Using German as the base rather than English, since
|
||||||
|
// at least one translated word doesn't exist in English.
|
||||||
for (let language in translations) {
|
for (let language in translations) {
|
||||||
if (language === "en") {
|
if (language === "de") {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
"TODAY": "Today",
|
"TODAY": "Today",
|
||||||
"TOMORROW": "Tomorrow",
|
"TOMORROW": "Tomorrow",
|
||||||
"DAYAFTERTOMORROW": "In 2 days",
|
|
||||||
"RUNNING": "Ends in",
|
"RUNNING": "Ends in",
|
||||||
"EMPTY": "No upcoming events.",
|
"EMPTY": "No upcoming events.",
|
||||||
"WEEK": "Week {weekNumber}",
|
"WEEK": "Week {weekNumber}",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user