mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-30 13:09:34 +00:00
Merge pull request #2439 from fewieden/feature/add-error-to-callback
Added error to callback
This commit is contained in:
commit
ea6eebd809
@ -19,6 +19,7 @@ _This release is scheduled to be released on 2021-04-01._
|
|||||||
- Portuguese translations for "MODULE_CONFIG_CHANGED" and PRECIP.
|
- Portuguese translations for "MODULE_CONFIG_CHANGED" and PRECIP.
|
||||||
- Respect parameter ColoredSymbolOnly also for custom events
|
- Respect parameter ColoredSymbolOnly also for custom events
|
||||||
- Added a new parameter to hide time portion on relative times
|
- Added a new parameter to hide time portion on relative times
|
||||||
|
- `module.show` has now the option for a callback on error.
|
||||||
- Added locale to sample config file
|
- Added locale to sample config file
|
||||||
- Added support for self-signed certificates for the default calendar module (#466)
|
- Added support for self-signed certificates for the default calendar module (#466)
|
||||||
|
|
||||||
|
@ -295,6 +295,9 @@ var MM = (function () {
|
|||||||
// Otherwise cancel show action.
|
// Otherwise cancel show action.
|
||||||
if (module.lockStrings.length !== 0 && options.force !== true) {
|
if (module.lockStrings.length !== 0 && options.force !== true) {
|
||||||
Log.log("Will not show " + module.name + ". LockStrings active: " + module.lockStrings.join(","));
|
Log.log("Will not show " + module.name + ". LockStrings active: " + module.lockStrings.join(","));
|
||||||
|
if (typeof options.onError === "function") {
|
||||||
|
options.onError(new Error("LOCK_STRING_ACTIVE"));
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -428,12 +428,11 @@ var Module = Class.extend({
|
|||||||
callback = callback || function () {};
|
callback = callback || function () {};
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
var self = this;
|
|
||||||
MM.showModule(
|
MM.showModule(
|
||||||
this,
|
this,
|
||||||
speed,
|
speed,
|
||||||
function () {
|
() => {
|
||||||
self.resume();
|
this.resume();
|
||||||
callback();
|
callback();
|
||||||
},
|
},
|
||||||
options
|
options
|
||||||
|
Loading…
x
Reference in New Issue
Block a user