mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 04:02:12 +00:00
Merge pull request #2475 from MystaraTheGreat/master
Added hiddenOnStartup flag to module config
This commit is contained in:
commit
2b1dbbde68
@ -22,6 +22,7 @@ _This release is scheduled to be released on 2021-04-01._
|
|||||||
- `module.show` has now the option for a callback on error.
|
- `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)
|
||||||
|
- Added hiddenOnStartup flag to module config (#2475)
|
||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
|
|
||||||
|
@ -54,6 +54,14 @@ var Loader = (function () {
|
|||||||
|
|
||||||
// Notify core of loaded modules.
|
// Notify core of loaded modules.
|
||||||
MM.modulesStarted(moduleObjects);
|
MM.modulesStarted(moduleObjects);
|
||||||
|
|
||||||
|
// Starting modules also hides any modules that have requested to be initially hidden
|
||||||
|
for (let thisModule of moduleObjects) {
|
||||||
|
if (thisModule.data.hiddenOnStartup) {
|
||||||
|
Log.info("Initially hiding " + thisModule.name);
|
||||||
|
thisModule.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -97,6 +105,7 @@ var Loader = (function () {
|
|||||||
path: moduleFolder + "/",
|
path: moduleFolder + "/",
|
||||||
file: moduleName + ".js",
|
file: moduleName + ".js",
|
||||||
position: moduleData.position,
|
position: moduleData.position,
|
||||||
|
hiddenOnStartup: moduleData.hiddenOnStartup,
|
||||||
header: moduleData.header,
|
header: moduleData.header,
|
||||||
configDeepMerge: typeof moduleData.configDeepMerge === "boolean" ? moduleData.configDeepMerge : false,
|
configDeepMerge: typeof moduleData.configDeepMerge === "boolean" ? moduleData.configDeepMerge : false,
|
||||||
config: moduleData.config,
|
config: moduleData.config,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user