mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
commit
00d9ea9344
@ -203,7 +203,7 @@ var MM = (function() {
|
|||||||
*/
|
*/
|
||||||
var updateModuleContent = function(module, newHeader, newContent) {
|
var updateModuleContent = function(module, newHeader, newContent) {
|
||||||
var moduleWrapper = document.getElementById(module.identifier);
|
var moduleWrapper = document.getElementById(module.identifier);
|
||||||
if (moduleWrapper === null) return;
|
if (moduleWrapper === null) {return;}
|
||||||
var headerWrapper = moduleWrapper.getElementsByClassName("module-header");
|
var headerWrapper = moduleWrapper.getElementsByClassName("module-header");
|
||||||
var contentWrapper = moduleWrapper.getElementsByClassName("module-content");
|
var contentWrapper = moduleWrapper.getElementsByClassName("module-content");
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@ Module.register("currentweather",{
|
|||||||
if (this.config.useLocationAsHeader && this.config.location !== false) {
|
if (this.config.useLocationAsHeader && this.config.location !== false) {
|
||||||
return this.config.location;
|
return this.config.location;
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.data.header;
|
return this.data.header;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ module.exports = NodeHelper.create({
|
|||||||
configureModules: function(modules) {
|
configureModules: function(modules) {
|
||||||
|
|
||||||
// Push MagicMirror itself , biggest chance it'll show up last in UI and isn't overwritten
|
// Push MagicMirror itself , biggest chance it'll show up last in UI and isn't overwritten
|
||||||
// others will be added in front, asynchronously
|
// others will be added in front, asynchronously
|
||||||
simpleGits.push({"module": "default", "git": SimpleGit(path.normalize(__dirname + "/../../../"))});
|
simpleGits.push({"module": "default", "git": SimpleGit(path.normalize(__dirname + "/../../../"))});
|
||||||
|
|
||||||
for (moduleName in modules) {
|
for (moduleName in modules) {
|
||||||
|
@ -6,12 +6,12 @@ Module.register("updatenotification", {
|
|||||||
},
|
},
|
||||||
|
|
||||||
suspended: false,
|
suspended: false,
|
||||||
moduleList: {},
|
moduleList: {},
|
||||||
|
|
||||||
start: function () {
|
start: function () {
|
||||||
var self = this;
|
var self = this;
|
||||||
Log.log("Start updatenotification");
|
Log.log("Start updatenotification");
|
||||||
setInterval( () => { self.moduleList = {};self.updateDom(2) } , self.config.refreshInterval)
|
setInterval( () => { self.moduleList = {};self.updateDom(2); } , self.config.refreshInterval);
|
||||||
},
|
},
|
||||||
|
|
||||||
notificationReceived: function (notification, payload, sender) {
|
notificationReceived: function (notification, payload, sender) {
|
||||||
@ -38,15 +38,15 @@ Module.register("updatenotification", {
|
|||||||
self.updateDom(2);
|
self.updateDom(2);
|
||||||
}
|
}
|
||||||
//self.show(1000, { lockString: self.identifier });
|
//self.show(1000, { lockString: self.identifier });
|
||||||
|
|
||||||
} else if (payload && payload.behind == 0){
|
} else if (payload && payload.behind == 0){
|
||||||
// if the module WAS in the list, but shouldn't be
|
// if the module WAS in the list, but shouldn't be
|
||||||
if(this.moduleList[payload.module] != undefined){
|
if(this.moduleList[payload.module] != undefined){
|
||||||
// remove it
|
// remove it
|
||||||
delete this.moduleList[payload.module]
|
delete this.moduleList[payload.module];
|
||||||
self.updateDom(2);
|
self.updateDom(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
diffLink: function(module, text) {
|
diffLink: function(module, text) {
|
||||||
@ -66,7 +66,7 @@ Module.register("updatenotification", {
|
|||||||
if(this.suspended==false){
|
if(this.suspended==false){
|
||||||
// process the hash of module info found
|
// process the hash of module info found
|
||||||
for(key of Object.keys(this.moduleList)){
|
for(key of Object.keys(this.moduleList)){
|
||||||
let m= this.moduleList[key]
|
let m= this.moduleList[key];
|
||||||
|
|
||||||
var message = document.createElement("div");
|
var message = document.createElement("div");
|
||||||
message.className = "small bright";
|
message.className = "small bright";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user