mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 09:42:21 -04:00
Merge branch 'develop' into develop
This commit is contained in:
commit
6493fad8a4
8 changed files with 32 additions and 10 deletions
4
.github/workflows/automated-tests.yaml
vendored
4
.github/workflows/automated-tests.yaml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
cache: "npm"
|
cache: "npm"
|
||||||
|
@ -31,7 +31,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
Xvfb :99 -screen 0 1024x768x16 &
|
Xvfb :99 -screen 0 1024x768x16 &
|
||||||
export DISPLAY=:99
|
export DISPLAY=:99
|
||||||
npm install
|
npm run install-mm:dev
|
||||||
touch css/custom.css
|
touch css/custom.css
|
||||||
npm run test:prettier
|
npm run test:prettier
|
||||||
npm run test:js
|
npm run test:js
|
||||||
|
|
2
.github/workflows/codecov-test-suites.yaml
vendored
2
.github/workflows/codecov-test-suites.yaml
vendored
|
@ -27,7 +27,7 @@ jobs:
|
||||||
touch css/custom.css
|
touch css/custom.css
|
||||||
npm run test:coverage
|
npm run test:coverage
|
||||||
- name: Upload coverage results to codecov
|
- name: Upload coverage results to codecov
|
||||||
uses: codecov/codecov-action@v2
|
uses: codecov/codecov-action@v3
|
||||||
with:
|
with:
|
||||||
files: ./coverage/lcov.info
|
files: ./coverage/lcov.info
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
|
|
|
@ -12,12 +12,17 @@ _This release is scheduled to be released on 2022-10-01._
|
||||||
## Added
|
## Added
|
||||||
|
|
||||||
- Possibility to fetch calendars through socket notifications.
|
- Possibility to fetch calendars through socket notifications.
|
||||||
|
- 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
|
||||||
|
@ -372,7 +373,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,
|
||||||
|
|
|
@ -7,9 +7,11 @@
|
||||||
"start": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js",
|
"start": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js",
|
||||||
"start:dev": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js dev",
|
"start:dev": "DISPLAY=\"${DISPLAY:=:0}\" ./node_modules/.bin/electron js/electron.js dev",
|
||||||
"server": "node ./serveronly",
|
"server": "node ./serveronly",
|
||||||
"install": "echo \"Installing vendor files ...\n\" && cd vendor && npm install --loglevel=error",
|
"install-mm": "npm install --no-audit --no-fund --no-update-notifier --only=prod --omit=dev",
|
||||||
"install-fonts": "echo \"Installing fonts ...\n\" && cd fonts && npm install --loglevel=error",
|
"install-mm:dev": "npm install --no-audit --no-fund --no-update-notifier",
|
||||||
"postinstall": "npm run install-fonts && echo \"MagicMirror² installation finished successfully! \n\"",
|
"install-vendor": "echo \"Installing vendor files ...\n\" && cd vendor && npm install --loglevel=error --no-audit --no-fund --no-update-notifier",
|
||||||
|
"install-fonts": "echo \"Installing fonts ...\n\" && cd fonts && npm install --loglevel=error --no-audit --no-fund --no-update-notifier",
|
||||||
|
"postinstall": "npm run install-vendor && npm run install-fonts && echo \"MagicMirror² installation finished successfully! \n\"",
|
||||||
"test": "NODE_ENV=test jest -i --forceExit",
|
"test": "NODE_ENV=test jest -i --forceExit",
|
||||||
"test:coverage": "NODE_ENV=test nyc --reporter=lcov --reporter=text jest -i --forceExit",
|
"test:coverage": "NODE_ENV=test nyc --reporter=lcov --reporter=text jest -i --forceExit",
|
||||||
"test:electron": "NODE_ENV=test jest --selectProjects electron -i --forceExit",
|
"test:electron": "NODE_ENV=test jest --selectProjects electron -i --forceExit",
|
||||||
|
|
|
@ -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…
Add table
Add a link
Reference in a new issue