mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-23 21:50:24 +00:00
Updates notification (#3119)
Hi, Like some default modules, I propose to send an `UPDATES` notification in an array with the git information of these modules This allows developers to create their own auto-update system (which I've been using in my case since 3 years, with automatic things) Of course, for security reasons `MagicMirror` is excluded --------- Co-authored-by: bugsounet <bugsounet@bugsounet.fr>
This commit is contained in:
committed by
GitHub
parent
b7371538bc
commit
e985e99036
@@ -8,7 +8,8 @@ Module.register("updatenotification", {
|
||||
defaults: {
|
||||
updateInterval: 10 * 60 * 1000, // every 10 minutes
|
||||
refreshInterval: 24 * 60 * 60 * 1000, // one day
|
||||
ignoreModules: []
|
||||
ignoreModules: [],
|
||||
sendUpdatesNotifications: false
|
||||
},
|
||||
|
||||
suspended: false,
|
||||
@@ -40,8 +41,13 @@ Module.register("updatenotification", {
|
||||
},
|
||||
|
||||
socketNotificationReceived(notification, payload) {
|
||||
if (notification === "STATUS") {
|
||||
this.updateUI(payload);
|
||||
switch (notification) {
|
||||
case "STATUS":
|
||||
this.updateUI(payload);
|
||||
break;
|
||||
case "UPDATES":
|
||||
this.sendNotification("UPDATES", payload);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user