mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 04:02:12 +00:00
Merge branch 'develop' of https://github.com/MichMich/MagicMirror into develop
This commit is contained in:
commit
5079e30caf
4
.gitignore
vendored
4
.gitignore
vendored
@ -67,6 +67,10 @@ Temporary Items
|
|||||||
# Ignore changes to the custom css files.
|
# Ignore changes to the custom css files.
|
||||||
/css/custom.css
|
/css/custom.css
|
||||||
|
|
||||||
|
# Ignore users config file but keep the sample.
|
||||||
|
/config/*
|
||||||
|
!/config/config.js.sample
|
||||||
|
|
||||||
# Vim
|
# Vim
|
||||||
## swap
|
## swap
|
||||||
[._]*.s[a-w][a-z]
|
[._]*.s[a-w][a-z]
|
||||||
|
@ -25,10 +25,12 @@ _This release is scheduled to be released on 2021-01-01._
|
|||||||
|
|
||||||
### Updated
|
### Updated
|
||||||
|
|
||||||
|
- Merging .gitignore in the config-folder with the .gitignore in the root-folder.
|
||||||
- Weather module - forecast now show TODAY and TOMORROW instead of weekday, to make it easier to understand.
|
- Weather module - forecast now show TODAY and TOMORROW instead of weekday, to make it easier to understand.
|
||||||
- Update dependencies to latest versions.
|
- Update dependencies to latest versions.
|
||||||
- Update dependencies eslint, feedme, simple-git and socket.io to latest versions.
|
- Update dependencies eslint, feedme, simple-git and socket.io to latest versions.
|
||||||
- Update lithuanian translation.
|
- Update lithuanian translation.
|
||||||
|
- Update config sample.
|
||||||
|
|
||||||
### Deleted
|
### Deleted
|
||||||
|
|
||||||
@ -52,6 +54,10 @@ _This release is scheduled to be released on 2021-01-01._
|
|||||||
- Fix Default Alert Module does not hide black overlay when alert is dismissed manually. (#2228)
|
- Fix Default Alert Module does not hide black overlay when alert is dismissed manually. (#2228)
|
||||||
- Weather module - Always displays night icons when local is other then English. (#2221)
|
- Weather module - Always displays night icons when local is other then English. (#2221)
|
||||||
- update Node-ical 0.12.4 , fix invalid RRULE format in cal entries
|
- update Node-ical 0.12.4 , fix invalid RRULE format in cal entries
|
||||||
|
- fix package.json for optional electron dependency (2378)
|
||||||
|
- update node-ical version again, 0.12.5, change RRULE fix (#2371, #2379)
|
||||||
|
- Added missing function call in module.show()
|
||||||
|
- remove undefined objects from modules array (#2382)
|
||||||
|
|
||||||
## [2.13.0] - 2020-10-01
|
## [2.13.0] - 2020-10-01
|
||||||
|
|
||||||
|
2
config/.gitignore
vendored
2
config/.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
*
|
|
||||||
!config.js.sample
|
|
@ -28,7 +28,7 @@ var config = {
|
|||||||
httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true
|
httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true
|
||||||
|
|
||||||
language: "en",
|
language: "en",
|
||||||
logLevel: ["DEBUG", "INFO", "LOG", "WARN", "ERROR"],
|
logLevel: ["INFO", "LOG", "WARN", "ERROR"], // Add "DEBUG" for even more logging
|
||||||
timeFormat: 24,
|
timeFormat: 24,
|
||||||
units: "metric",
|
units: "metric",
|
||||||
// serverOnly: true/false/"local" ,
|
// serverOnly: true/false/"local" ,
|
||||||
@ -70,7 +70,7 @@ var config = {
|
|||||||
position: "top_right",
|
position: "top_right",
|
||||||
config: {
|
config: {
|
||||||
location: "New York",
|
location: "New York",
|
||||||
locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
|
locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city
|
||||||
appid: "YOUR_OPENWEATHER_API_KEY"
|
appid: "YOUR_OPENWEATHER_API_KEY"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -46,7 +46,7 @@ function checkConfigFile() {
|
|||||||
try {
|
try {
|
||||||
fs.accessSync(configFileName, fs.F_OK);
|
fs.accessSync(configFileName, fs.F_OK);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Log.log(Utils.colors.error(e));
|
Log.error(Utils.colors.error(e));
|
||||||
throw new Error("No permission to access config file!");
|
throw new Error("No permission to access config file!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -500,10 +500,7 @@ var MM = (function () {
|
|||||||
*/
|
*/
|
||||||
modulesStarted: function (moduleObjects) {
|
modulesStarted: function (moduleObjects) {
|
||||||
modules = [];
|
modules = [];
|
||||||
for (var m in moduleObjects) {
|
moduleObjects.forEach((module) => modules.push(module));
|
||||||
var module = moduleObjects[m];
|
|
||||||
modules[module.data.index] = module;
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.info("All modules started!");
|
Log.info("All modules started!");
|
||||||
sendNotification("ALL_MODULES_STARTED");
|
sendNotification("ALL_MODULES_STARTED");
|
||||||
|
22
js/module.js
22
js/module.js
@ -228,7 +228,7 @@ var Module = Class.extend({
|
|||||||
* Set the module config and combine it with the module defaults.
|
* Set the module config and combine it with the module defaults.
|
||||||
*
|
*
|
||||||
* @param {object} config The combined module config.
|
* @param {object} config The combined module config.
|
||||||
* @param {boolean} config Merge module config in deep.
|
* @param {boolean} deep Merge module config in deep.
|
||||||
*/
|
*/
|
||||||
setConfig: function (config, deep) {
|
setConfig: function (config, deep) {
|
||||||
this.config = deep ? configMerge({}, this.defaults, config) : Object.assign({}, this.defaults, config);
|
this.config = deep ? configMerge({}, this.defaults, config) : Object.assign({}, this.defaults, config);
|
||||||
@ -434,20 +434,22 @@ var Module = Class.extend({
|
|||||||
speed,
|
speed,
|
||||||
function () {
|
function () {
|
||||||
self.resume();
|
self.resume();
|
||||||
callback;
|
callback();
|
||||||
},
|
},
|
||||||
options
|
options
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/** Merging MagicMirror (or other) default/config script
|
/**
|
||||||
* merge 2 objects or/with array
|
* Merging MagicMirror (or other) default/config script by @bugsounet
|
||||||
* using:
|
* Merge 2 objects or/with array
|
||||||
|
*
|
||||||
|
* Usage:
|
||||||
* -------
|
* -------
|
||||||
* this.config = configMerge({}, this.defaults, this.config)
|
* this.config = configMerge({}, this.defaults, this.config)
|
||||||
* -------
|
* -------
|
||||||
* arg1: initial objet
|
* arg1: initial object
|
||||||
* arg2: config model
|
* arg2: config model
|
||||||
* arg3: config to merge
|
* arg3: config to merge
|
||||||
* -------
|
* -------
|
||||||
@ -456,10 +458,12 @@ var Module = Class.extend({
|
|||||||
* it don't merge all thing in deep
|
* it don't merge all thing in deep
|
||||||
* -> object in object and array is not merging
|
* -> object in object and array is not merging
|
||||||
* -------
|
* -------
|
||||||
* @bugsounet
|
*
|
||||||
* @Todo: idea of Mich determinate what do you want to merge or not
|
* Todo: idea of Mich determinate what do you want to merge or not
|
||||||
|
*
|
||||||
|
* @param {object} result the initial object
|
||||||
|
* @returns {object} the merged config
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function configMerge(result) {
|
function configMerge(result) {
|
||||||
var stack = Array.prototype.slice.call(arguments, 1);
|
var stack = Array.prototype.slice.call(arguments, 1);
|
||||||
var item;
|
var item;
|
||||||
|
@ -37,7 +37,7 @@ var Server = function (config, callback) {
|
|||||||
server.listen(port, config.address ? config.address : "localhost");
|
server.listen(port, config.address ? config.address : "localhost");
|
||||||
|
|
||||||
if (config.ipWhitelist instanceof Array && config.ipWhitelist.length === 0) {
|
if (config.ipWhitelist instanceof Array && config.ipWhitelist.length === 0) {
|
||||||
Log.info(Utils.colors.warn("You're using a full whitelist configuration to allow for all IPs"));
|
Log.warn(Utils.colors.warn("You're using a full whitelist configuration to allow for all IPs"));
|
||||||
}
|
}
|
||||||
|
|
||||||
app.use(function (req, res, next) {
|
app.use(function (req, res, next) {
|
||||||
|
@ -70,7 +70,6 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"colors": "^1.4.0",
|
"colors": "^1.4.0",
|
||||||
"console-stamp": "^3.0.0-rc4.2",
|
"console-stamp": "^3.0.0-rc4.2",
|
||||||
"electron": "^8.5.3",
|
|
||||||
"eslint": "^7.15.0",
|
"eslint": "^7.15.0",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"express-ipfilter": "^1.1.2",
|
"express-ipfilter": "^1.1.2",
|
||||||
@ -80,7 +79,7 @@
|
|||||||
"iconv-lite": "^0.6.2",
|
"iconv-lite": "^0.6.2",
|
||||||
"module-alias": "^2.2.2",
|
"module-alias": "^2.2.2",
|
||||||
"moment": "^2.29.1",
|
"moment": "^2.29.1",
|
||||||
"node-ical": "^0.12.4",
|
"node-ical": "^0.12.5",
|
||||||
"request": "^2.88.2",
|
"request": "^2.88.2",
|
||||||
"rrule": "^2.6.6",
|
"rrule": "^2.6.6",
|
||||||
"rrule-alt": "^2.2.8",
|
"rrule-alt": "^2.2.8",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user