mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
commit
b2bc43da4f
@ -5,7 +5,7 @@
|
|||||||
"max-len": ["error", 250],
|
"max-len": ["error", 250],
|
||||||
"curly": "error",
|
"curly": "error",
|
||||||
"camelcase": ["error", {"properties": "never"}],
|
"camelcase": ["error", {"properties": "never"}],
|
||||||
"no-trailing-spaces": ["error"],
|
"no-trailing-spaces": ["error", {"ignoreComments": false }],
|
||||||
"no-irregular-whitespace": ["error"]
|
"no-irregular-whitespace": ["error"]
|
||||||
},
|
},
|
||||||
"env": {
|
"env": {
|
||||||
|
31
CHANGELOG.md
31
CHANGELOG.md
@ -2,6 +2,35 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
## [2.2.0] - 2018-01-01
|
||||||
|
|
||||||
|
**Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Calender week is now handled with a variable translation in order to move number language specific.
|
||||||
|
- Reverted the Electron dependency back to 1.4.15 since newer version don't seem to work on the Raspberry Pi very well.
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Add option to use [Nunjucks](https://mozilla.github.io/nunjucks/) templates in modules. (See `helloworld` module as an example.)
|
||||||
|
- Add Bulgarian translations for MagicMirror² and Alert module.
|
||||||
|
- Add graceful shutdown of modules by calling `stop` function of each `node_helper` on SIGINT before exiting.
|
||||||
|
- Link update subtext to Github diff of current version versus tracking branch.
|
||||||
|
- Add Catalan translation.
|
||||||
|
- Add ability to filter out newsfeed items based on prohibited words found in title (resolves #1071)
|
||||||
|
- Add options to truncate description support of a feed in newsfeed module
|
||||||
|
- Add reloadInterval option for particular feed in newsfeed module
|
||||||
|
- Add no-cache entries of HTTP headers in newsfeed module (fetcher)
|
||||||
|
- Add Czech translation.
|
||||||
|
- Add option for decimal symbols other than the decimal point for temperature values in both default weather modules: WeatherForecast and CurrentWeather.
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Fixed issue with calendar module showing more than `maximumEntries` allows
|
||||||
|
- WeatherForecast and CurrentWeather are now using HTTPS instead of HTTP
|
||||||
|
- Correcting translation for Indonesian language
|
||||||
|
- Fix issue where calendar icons wouldn't align correctly
|
||||||
|
|
||||||
## [2.1.3] - 2017-10-01
|
## [2.1.3] - 2017-10-01
|
||||||
|
|
||||||
**Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`
|
**Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`
|
||||||
@ -29,7 +58,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
- Changed 'default.js' - listen on all attached interfaces by default.
|
- Changed 'default.js' - listen on all attached interfaces by default.
|
||||||
- Add execution of `npm list` after the test are ran in Travis CI.
|
- Add execution of `npm list` after the test are ran in Travis CI.
|
||||||
- Change hooks for the vendors e2e tests.
|
- Change hooks for the vendors e2e tests.
|
||||||
- Add log when clientonly failed on starting.
|
- Add log when clientonly failed on starting.
|
||||||
- Add warning color when are using full ip whitelist.
|
- Add warning color when are using full ip whitelist.
|
||||||
- Set version of the `express-ipfilter` on 0.3.1.
|
- Set version of the `express-ipfilter` on 0.3.1.
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ The following properties can be configured:
|
|||||||
| **Option** | **Description** |
|
| **Option** | **Description** |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| `port` | The port on which the MagicMirror² server will run on. The default value is `8080`. |
|
| `port` | The port on which the MagicMirror² server will run on. The default value is `8080`. |
|
||||||
| `address` | The ip address the accept connections. The default open bind `::` is IPv6 is available or `0.0.0.0` IPv4 run on. Example config: `192.168.10.100`. |
|
| `address` | The ip address the accept connections. The default open bind `localhost`. Example config: `192.168.10.100`. |
|
||||||
| `ipWhitelist` | The list of IPs from which you are allowed to access the MagicMirror². The default value is `["127.0.0.1", "::ffff:127.0.0.1", "::1"]`. It is possible to specify IPs with subnet masks (`["127.0.0.1", "127.0.0.1/24"]`) or define ip ranges (`["127.0.0.1", ["192.168.0.1", "192.168.0.100"]]`). Set `[]` to allow all IP addresses. For more information about how configure this directive see the [follow post ipWhitelist HowTo](https://forum.magicmirror.builders/topic/1326/ipwhitelist-howto) |
|
| `ipWhitelist` | The list of IPs from which you are allowed to access the MagicMirror². The default value is `["127.0.0.1", "::ffff:127.0.0.1", "::1"]`. It is possible to specify IPs with subnet masks (`["127.0.0.1", "127.0.0.1/24"]`) or define ip ranges (`["127.0.0.1", ["192.168.0.1", "192.168.0.100"]]`). Set `[]` to allow all IP addresses. For more information about how configure this directive see the [follow post ipWhitelist HowTo](https://forum.magicmirror.builders/topic/1326/ipwhitelist-howto) |
|
||||||
| `zoom` | This allows to scale the mirror contents with a given zoom factor. The default value is `1.0`|
|
| `zoom` | This allows to scale the mirror contents with a given zoom factor. The default value is `1.0`|
|
||||||
| `language` | The language of the interface. (Note: Not all elements will be localized.) Possible values are `en`, `nl`, `ru`, `fr`, etc., but the default value is `en`. |
|
| `language` | The language of the interface. (Note: Not all elements will be localized.) Possible values are `en`, `nl`, `ru`, `fr`, etc., but the default value is `en`. |
|
||||||
|
12
fonts/package-lock.json
generated
Normal file
12
fonts/package-lock.json
generated
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "magicmirror-fonts",
|
||||||
|
"requires": true,
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"dependencies": {
|
||||||
|
"roboto-fontface": {
|
||||||
|
"version": "0.8.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/roboto-fontface/-/roboto-fontface-0.8.0.tgz",
|
||||||
|
"integrity": "sha512-ZYzRkETgBrdEGzL5JSKimvjI2CX7ioyZCkX2BpcfyjqI+079W0wHAyj5W4rIZMcDSOHgLZtgz1IdDi/vU77KEQ=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -10,6 +10,6 @@
|
|||||||
"url": "https://github.com/MichMich/MagicMirror/issues"
|
"url": "https://github.com/MichMich/MagicMirror/issues"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"roboto-fontface": "^0.8.0"
|
"roboto-fontface": "^0.8.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="region fullscreen above"><div class="container"></div></div>
|
<div class="region fullscreen above"><div class="container"></div></div>
|
||||||
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
|
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
|
||||||
|
<script type="text/javascript" src="vendor/node_modules/nunjucks/browser/nunjucks.min.js"></script>
|
||||||
<script type="text/javascript" src="js/defaults.js"></script>
|
<script type="text/javascript" src="js/defaults.js"></script>
|
||||||
<script type="text/javascript" src="#CONFIG_FILE#"></script>
|
<script type="text/javascript" src="#CONFIG_FILE#"></script>
|
||||||
<script type="text/javascript" src="vendor/vendor.js"></script>
|
<script type="text/javascript" src="vendor/vendor.js"></script>
|
||||||
|
27
js/app.js
27
js/app.js
@ -236,6 +236,33 @@ var App = function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* stop()
|
||||||
|
* This methods stops the core app.
|
||||||
|
* This calls each node_helper's STOP() function, if it exists.
|
||||||
|
* Added to fix #1056
|
||||||
|
*/
|
||||||
|
this.stop = function() {
|
||||||
|
for (var h in nodeHelpers) {
|
||||||
|
var nodeHelper = nodeHelpers[h];
|
||||||
|
if (typeof nodeHelper.stop === "function") {
|
||||||
|
nodeHelper.stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/* Listen for SIGINT signal and call stop() function.
|
||||||
|
*
|
||||||
|
* Added to fix #1056
|
||||||
|
* Note: this is only used if running `server-only`. Otherwise
|
||||||
|
* this.stop() is called by app.on("before-quit"... in `electron.js`
|
||||||
|
*/
|
||||||
|
process.on("SIGINT", () => {
|
||||||
|
console.log("[SIGINT] Received. Shutting down server...");
|
||||||
|
setTimeout(() => { process.exit(0); }, 3000); // Force quit after 3 seconds
|
||||||
|
this.stop();
|
||||||
|
process.exit(0);
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = new App();
|
module.exports = new App();
|
||||||
|
@ -96,6 +96,20 @@ app.on("activate", function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/* This method will be called when SIGINT is received and will call
|
||||||
|
* each node_helper's stop function if it exists. Added to fix #1056
|
||||||
|
*
|
||||||
|
* Note: this is only used if running Electron. Otherwise
|
||||||
|
* core.stop() is called by process.on("SIGINT"... in `app.js`
|
||||||
|
*/
|
||||||
|
app.on("before-quit", (event) => {
|
||||||
|
console.log("Shutting down server...");
|
||||||
|
event.preventDefault();
|
||||||
|
setTimeout(() => { process.exit(0); }, 3000); // Force-quit after 3 seconds.
|
||||||
|
core.stop();
|
||||||
|
process.exit(0);
|
||||||
|
});
|
||||||
|
|
||||||
// Start the core application if server is run on localhost
|
// Start the core application if server is run on localhost
|
||||||
// This starts all node helpers and starts the webserver.
|
// This starts all node helpers and starts the webserver.
|
||||||
if (["localhost", "127.0.0.1", "::1", "::ffff:127.0.0.1", undefined].indexOf(config.address) > -1) {
|
if (["localhost", "127.0.0.1", "::1", "::ffff:127.0.0.1", undefined].indexOf(config.address) > -1) {
|
||||||
|
91
js/module.js
91
js/module.js
@ -27,6 +27,11 @@ var Module = Class.extend({
|
|||||||
// visibility when hiding and showing module.
|
// visibility when hiding and showing module.
|
||||||
lockStrings: [],
|
lockStrings: [],
|
||||||
|
|
||||||
|
// Storage of the nunjuck Environment,
|
||||||
|
// This should not be referenced directly.
|
||||||
|
// Use the nunjucksEnvironment() to get it.
|
||||||
|
_nunjucksEnvironment: null,
|
||||||
|
|
||||||
/* init()
|
/* init()
|
||||||
* Is called when the module is instantiated.
|
* Is called when the module is instantiated.
|
||||||
*/
|
*/
|
||||||
@ -70,23 +75,35 @@ var Module = Class.extend({
|
|||||||
|
|
||||||
/* getDom()
|
/* getDom()
|
||||||
* This method generates the dom which needs to be displayed. This method is called by the Magic Mirror core.
|
* This method generates the dom which needs to be displayed. This method is called by the Magic Mirror core.
|
||||||
* This method needs to be subclassed if the module wants to display info on the mirror.
|
* This method can to be subclassed if the module wants to display info on the mirror.
|
||||||
|
* Alternatively, the getTemplete method could be subclassed.
|
||||||
*
|
*
|
||||||
* return domobject - The dom to display.
|
* return domobject - The dom to display.
|
||||||
*/
|
*/
|
||||||
getDom: function () {
|
getDom: function () {
|
||||||
var nameWrapper = document.createElement("div");
|
|
||||||
var name = document.createTextNode(this.name);
|
|
||||||
nameWrapper.appendChild(name);
|
|
||||||
|
|
||||||
var identifierWrapper = document.createElement("div");
|
|
||||||
var identifier = document.createTextNode(this.identifier);
|
|
||||||
identifierWrapper.appendChild(identifier);
|
|
||||||
identifierWrapper.className = "small dimmed";
|
|
||||||
|
|
||||||
var div = document.createElement("div");
|
var div = document.createElement("div");
|
||||||
div.appendChild(nameWrapper);
|
var template = this.getTemplate();
|
||||||
div.appendChild(identifierWrapper);
|
var templateData = this.getTemplateData();
|
||||||
|
|
||||||
|
// Check to see if we need to render a template string or a file.
|
||||||
|
if (/^.*((\.html)|(\.njk))$/.test(template)) {
|
||||||
|
// the template is a filename
|
||||||
|
this.nunjucksEnvironment().render(template, templateData, function (err, res) {
|
||||||
|
if (err) {
|
||||||
|
Log.error(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
// The inner content of the div will be set after the template is received.
|
||||||
|
// This isn't the most optimal way, but since it's near instant
|
||||||
|
// it probably won't be an issue.
|
||||||
|
// If it gives problems, we can always add a way to pre fetch the templates.
|
||||||
|
// Let's not over optimise this ... KISS! :)
|
||||||
|
div.innerHTML = res;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// the template is a template string.
|
||||||
|
div.innerHTML = this.nunjucksEnvironment().renderString(template, templateData);
|
||||||
|
}
|
||||||
|
|
||||||
return div;
|
return div;
|
||||||
},
|
},
|
||||||
@ -102,6 +119,28 @@ var Module = Class.extend({
|
|||||||
return this.data.header;
|
return this.data.header;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* getTemplate()
|
||||||
|
* This method returns the template for the module which is used by the default getDom implementation.
|
||||||
|
* This method needs to be subclassed if the module wants to use a tempate.
|
||||||
|
* It can either return a template sting, or a template filename.
|
||||||
|
* If the string ends with '.html' it's considered a file from within the module's folder.
|
||||||
|
*
|
||||||
|
* return string - The template string of filename.
|
||||||
|
*/
|
||||||
|
getTemplate: function () {
|
||||||
|
return "<div class=\"normal\">" + this.name + "</div><div class=\"small dimmed\">" + this.identifier + "</div>";
|
||||||
|
},
|
||||||
|
|
||||||
|
/* getTemplateData()
|
||||||
|
* This method returns the data to be used in the template.
|
||||||
|
* This method needs to be subclassed if the module wants to use a custom data.
|
||||||
|
*
|
||||||
|
* return Object
|
||||||
|
*/
|
||||||
|
getTemplateData: function () {
|
||||||
|
return {}
|
||||||
|
},
|
||||||
|
|
||||||
/* notificationReceived(notification, payload, sender)
|
/* notificationReceived(notification, payload, sender)
|
||||||
* This method is called when a notification arrives.
|
* This method is called when a notification arrives.
|
||||||
* This method is called by the Magic Mirror core.
|
* This method is called by the Magic Mirror core.
|
||||||
@ -118,6 +157,30 @@ var Module = Class.extend({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/** nunjucksEnvironment()
|
||||||
|
* Returns the nunjucks environment for the current module.
|
||||||
|
* The environment is checked in the _nunjucksEnvironment instance variable.
|
||||||
|
|
||||||
|
* @returns Nunjucks Environment
|
||||||
|
*/
|
||||||
|
nunjucksEnvironment: function() {
|
||||||
|
if (this._nunjucksEnvironment != null) {
|
||||||
|
return this._nunjucksEnvironment;
|
||||||
|
}
|
||||||
|
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
this._nunjucksEnvironment = new nunjucks.Environment(new nunjucks.WebLoader(this.file(""), {async: true}), {
|
||||||
|
trimBlocks: true,
|
||||||
|
lstripBlocks: true
|
||||||
|
});
|
||||||
|
this._nunjucksEnvironment.addFilter("translate", function(str) {
|
||||||
|
return self.translate(str)
|
||||||
|
});
|
||||||
|
|
||||||
|
return this._nunjucksEnvironment;
|
||||||
|
},
|
||||||
|
|
||||||
/* socketNotificationReceived(notification, payload)
|
/* socketNotificationReceived(notification, payload)
|
||||||
* This method is called when a socket notification arrives.
|
* This method is called when a socket notification arrives.
|
||||||
*
|
*
|
||||||
@ -276,8 +339,8 @@ var Module = Class.extend({
|
|||||||
* Request the translation for a given key with optional variables and default value.
|
* Request the translation for a given key with optional variables and default value.
|
||||||
*
|
*
|
||||||
* argument key string - The key of the string to translate
|
* argument key string - The key of the string to translate
|
||||||
* argument defaultValueOrVariables string/object - The default value or variables for translating. (Optional)
|
* argument defaultValueOrVariables string/object - The default value or variables for translating. (Optional)
|
||||||
* argument defaultValue string - The default value with variables. (Optional)
|
* argument defaultValue string - The default value with variables. (Optional)
|
||||||
*/
|
*/
|
||||||
translate: function (key, defaultValueOrVariables, defaultValue) {
|
translate: function (key, defaultValueOrVariables, defaultValue) {
|
||||||
if(typeof defaultValueOrVariables === "object") {
|
if(typeof defaultValueOrVariables === "object") {
|
||||||
|
@ -555,6 +555,17 @@ start: function() {
|
|||||||
}
|
}
|
||||||
````
|
````
|
||||||
|
|
||||||
|
#### `stop()`
|
||||||
|
This method is called when the MagicMirror server receives a `SIGINT` command and is shutting down. This method should include any commands needed to close any open connections, stop any sub-processes and gracefully exit the module.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
````javascript
|
||||||
|
stop: function() {
|
||||||
|
console.log("Shutting down MyModule");
|
||||||
|
this.connection.close();
|
||||||
|
}
|
||||||
|
````
|
||||||
|
|
||||||
#### `socketNotificationReceived: function(notification, payload)`
|
#### `socketNotificationReceived: function(notification, payload)`
|
||||||
With this method, your node helper can receive notifications from your modules. When this method is called, it has 2 arguments:
|
With this method, your node helper can receive notifications from your modules. When this method is called, it has 2 arguments:
|
||||||
|
|
||||||
|
4
modules/default/alert/translations/bg.json
Normal file
4
modules/default/alert/translations/bg.json
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"sysTitle": "MagicMirror нотификация",
|
||||||
|
"welcome": "Добре дошли, стартирането беше успешно"
|
||||||
|
}
|
@ -150,7 +150,7 @@ Module.register("calendar", {
|
|||||||
|
|
||||||
for(var i = 0; i < symbols.length; i++) {
|
for(var i = 0; i < symbols.length; i++) {
|
||||||
var symbol = document.createElement("span");
|
var symbol = document.createElement("span");
|
||||||
symbol.className = "fa fa-" + symbols[i];
|
symbol.className = "fa fa-fw fa-" + symbols[i];
|
||||||
if(i > 0){
|
if(i > 0){
|
||||||
symbol.style.paddingLeft = "5px";
|
symbol.style.paddingLeft = "5px";
|
||||||
}
|
}
|
||||||
@ -289,9 +289,9 @@ Module.register("calendar", {
|
|||||||
* This function accepts a number (either 12 or 24) and returns a moment.js LocaleSpecification with the
|
* This function accepts a number (either 12 or 24) and returns a moment.js LocaleSpecification with the
|
||||||
* corresponding timeformat to be used in the calendar display. If no number is given (or otherwise invalid input)
|
* corresponding timeformat to be used in the calendar display. If no number is given (or otherwise invalid input)
|
||||||
* it will a localeSpecification object with the system locale time format.
|
* it will a localeSpecification object with the system locale time format.
|
||||||
*
|
*
|
||||||
* @param {number} timeFormat Specifies either 12 or 24 hour time format
|
* @param {number} timeFormat Specifies either 12 or 24 hour time format
|
||||||
* @returns {moment.LocaleSpecification}
|
* @returns {moment.LocaleSpecification}
|
||||||
*/
|
*/
|
||||||
getLocaleSpecification: function(timeFormat) {
|
getLocaleSpecification: function(timeFormat) {
|
||||||
switch (timeFormat) {
|
switch (timeFormat) {
|
||||||
@ -356,7 +356,7 @@ Module.register("calendar", {
|
|||||||
return a.startDate - b.startDate;
|
return a.startDate - b.startDate;
|
||||||
});
|
});
|
||||||
|
|
||||||
return events;
|
return events.slice(0, this.config.maximumEntries);
|
||||||
},
|
},
|
||||||
|
|
||||||
/* createEventList(url)
|
/* createEventList(url)
|
||||||
@ -430,7 +430,7 @@ Module.register("calendar", {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Shortens a string if it's longer than maxLength and add a ellipsis to the end
|
* Shortens a string if it's longer than maxLength and add a ellipsis to the end
|
||||||
*
|
*
|
||||||
* @param {string} string Text string to shorten
|
* @param {string} string Text string to shorten
|
||||||
* @param {number} maxLength The max length of the string
|
* @param {number} maxLength The max length of the string
|
||||||
* @param {boolean} wrapEvents Wrap the text after the line has reached maxLength
|
* @param {boolean} wrapEvents Wrap the text after the line has reached maxLength
|
||||||
|
@ -94,7 +94,7 @@ Module.register("clock",{
|
|||||||
dateWrapper.innerHTML = now.format(this.config.dateFormat);
|
dateWrapper.innerHTML = now.format(this.config.dateFormat);
|
||||||
}
|
}
|
||||||
if (this.config.showWeek) {
|
if (this.config.showWeek) {
|
||||||
weekWrapper.innerHTML = this.translate("WEEK") + " " + now.week();
|
weekWrapper.innerHTML = this.translate("WEEK", { weekNumber: now.week() });
|
||||||
}
|
}
|
||||||
timeWrapper.innerHTML = timeString;
|
timeWrapper.innerHTML = timeString;
|
||||||
secondsWrapper.innerHTML = now.format("ss");
|
secondsWrapper.innerHTML = now.format("ss");
|
||||||
|
@ -46,6 +46,7 @@ The following properties can be configured:
|
|||||||
| `onlyTemp` | Show only current Temperature and weather icon. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false`
|
| `onlyTemp` | Show only current Temperature and weather icon. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false`
|
||||||
| `useBeaufort` | Pick between using the Beaufort scale for wind speed or using the default units. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
|
| `useBeaufort` | Pick between using the Beaufort scale for wind speed or using the default units. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
|
||||||
| `lang` | The language of the days. <br><br> **Possible values:** `en`, `nl`, `ru`, etc ... <br> **Default value:** uses value of _config.language_
|
| `lang` | The language of the days. <br><br> **Possible values:** `en`, `nl`, `ru`, etc ... <br> **Default value:** uses value of _config.language_
|
||||||
|
| `decimalSymbol` | The decimal symbol to use.<br><br> **Possible values:** `.`, `,` or any other symbol.<br> **Default value:** `.`
|
||||||
| `initialLoadDelay` | The initial delay before loading. If you have multiple modules that use the same API key, you might want to delay one of the requests. (Milliseconds) <br><br> **Possible values:** `1000` - `5000` <br> **Default value:** `0`
|
| `initialLoadDelay` | The initial delay before loading. If you have multiple modules that use the same API key, you might want to delay one of the requests. (Milliseconds) <br><br> **Possible values:** `1000` - `5000` <br> **Default value:** `0`
|
||||||
| `retryDelay` | The delay before retrying after a request failure. (Milliseconds) <br><br> **Possible values:** `1000` - `60000` <br> **Default value:** `2500`
|
| `retryDelay` | The delay before retrying after a request failure. (Milliseconds) <br><br> **Possible values:** `1000` - `60000` <br> **Default value:** `2500`
|
||||||
| `apiVersion` | The OpenWeatherMap API version to use. <br><br> **Default value:** `2.5`
|
| `apiVersion` | The OpenWeatherMap API version to use. <br><br> **Default value:** `2.5`
|
||||||
|
@ -24,6 +24,7 @@ Module.register("currentweather",{
|
|||||||
showWindDirectionAsArrow: false,
|
showWindDirectionAsArrow: false,
|
||||||
useBeaufort: true,
|
useBeaufort: true,
|
||||||
lang: config.language,
|
lang: config.language,
|
||||||
|
decimalSymbol: ".",
|
||||||
showHumidity: false,
|
showHumidity: false,
|
||||||
degreeLabel: false,
|
degreeLabel: false,
|
||||||
showIndoorTemperature: false,
|
showIndoorTemperature: false,
|
||||||
@ -33,7 +34,7 @@ Module.register("currentweather",{
|
|||||||
retryDelay: 2500,
|
retryDelay: 2500,
|
||||||
|
|
||||||
apiVersion: "2.5",
|
apiVersion: "2.5",
|
||||||
apiBase: "http://api.openweathermap.org/data/",
|
apiBase: "https://api.openweathermap.org/data/",
|
||||||
weatherEndpoint: "weather",
|
weatherEndpoint: "weather",
|
||||||
|
|
||||||
appendLocationNameToHeader: true,
|
appendLocationNameToHeader: true,
|
||||||
@ -209,9 +210,13 @@ Module.register("currentweather",{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.config.decimalSymbol === "") {
|
||||||
|
this.config.decimalSymbol = ".";
|
||||||
|
}
|
||||||
|
|
||||||
var temperature = document.createElement("span");
|
var temperature = document.createElement("span");
|
||||||
temperature.className = "bright";
|
temperature.className = "bright";
|
||||||
temperature.innerHTML = " " + this.temperature + "°" + degreeLabel;
|
temperature.innerHTML = " " + this.temperature.replace(".", this.config.decimalSymbol) + "°" + degreeLabel;
|
||||||
large.appendChild(temperature);
|
large.appendChild(temperature);
|
||||||
|
|
||||||
if (this.config.showIndoorTemperature && this.indoorTemperature) {
|
if (this.config.showIndoorTemperature && this.indoorTemperature) {
|
||||||
@ -221,7 +226,7 @@ Module.register("currentweather",{
|
|||||||
|
|
||||||
var indoorTemperatureElem = document.createElement("span");
|
var indoorTemperatureElem = document.createElement("span");
|
||||||
indoorTemperatureElem.className = "bright";
|
indoorTemperatureElem.className = "bright";
|
||||||
indoorTemperatureElem.innerHTML = " " + this.indoorTemperature + "°" + degreeLabel;
|
indoorTemperatureElem.innerHTML = " " + this.indoorTemperature.replace(".", this.config.decimalSymbol) + "°" + degreeLabel;
|
||||||
large.appendChild(indoorTemperatureElem);
|
large.appendChild(indoorTemperatureElem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,10 +14,11 @@ Module.register("helloworld",{
|
|||||||
text: "Hello World!"
|
text: "Hello World!"
|
||||||
},
|
},
|
||||||
|
|
||||||
// Override dom generator.
|
getTemplate: function () {
|
||||||
getDom: function() {
|
return "helloworld.njk"
|
||||||
var wrapper = document.createElement("div");
|
},
|
||||||
wrapper.innerHTML = this.config.text;
|
|
||||||
return wrapper;
|
getTemplateData: function () {
|
||||||
|
return this.config
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
5
modules/default/helloworld/helloworld.njk
Normal file
5
modules/default/helloworld/helloworld.njk
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<!--
|
||||||
|
Use ` | safe` to allow html tages within the text string.
|
||||||
|
https://mozilla.github.io/nunjucks/templating.html#autoescaping
|
||||||
|
-->
|
||||||
|
<div>{{text | safe}}</div>
|
@ -57,25 +57,28 @@ The third party [MMM-Gestures](https://github.com/thobach/MMM-Gestures) module s
|
|||||||
|
|
||||||
The following properties can be configured:
|
The following properties can be configured:
|
||||||
|
|
||||||
| Option | Description
|
| Option | Description
|
||||||
| ----------------- | -----------
|
| ------------------ | -----------
|
||||||
| `feeds` | An array of feed urls that will be used as source. <br> More info about this object can be found below. <br> **Default value:** `[{ title: "New York Times", url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml", encoding: "UTF-8" }]`
|
| `feeds` | An array of feed urls that will be used as source. <br> More info about this object can be found below. <br> **Default value:** `[{ title: "New York Times", url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml", encoding: "UTF-8" }]`<br>You can add `reloadInterval` option to set particular reloadInterval to a feed.
|
||||||
| `showSourceTitle` | Display the title of the source. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
|
| `showSourceTitle` | Display the title of the source. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
|
||||||
| `showPublishDate` | Display the publish date of an headline. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
|
| `showPublishDate` | Display the publish date of an headline. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
|
||||||
| `showDescription` | Display the description of an item. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false`
|
| `showDescription` | Display the description of an item. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false`
|
||||||
| `wrapTitle` | Wrap the title of the item to multiple lines. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
|
| `wrapTitle` | Wrap the title of the item to multiple lines. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
|
||||||
| `wrapDescription` | Wrap the description of the item to multiple lines. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
|
| `wrapDescription` | Wrap the description of the item to multiple lines. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
|
||||||
| `hideLoading` | Hide module instead of showing LOADING status. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false`
|
| `truncDescription` | Truncate description? <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
|
||||||
| `reloadInterval` | How often does the content needs to be fetched? (Milliseconds) <br><br> **Possible values:** `1000` - `86400000` <br> **Default value:** `300000` (5 minutes)
|
| `lengthDescription`| How many characters to be displayed for a truncated description? <br><br> **Possible values:** `1` - `500` <br> **Default value:** `400`
|
||||||
| `updateInterval` | How often do you want to display a new headline? (Milliseconds) <br><br> **Possible values:**`1000` - `60000` <br> **Default value:** `10000` (10 seconds)
|
| `hideLoading` | Hide module instead of showing LOADING status. <br><br> **Possible values:** `true` or `false` <br> **Default value:** `false`
|
||||||
| `animationSpeed` | Speed of the update animation. (Milliseconds) <br><br> **Possible values:**`0` - `5000` <br> **Default value:** `2500` (2.5 seconds)
|
| `reloadInterval` | How often does the content needs to be fetched? (Milliseconds) <br><br> **Possible values:** `1000` - `86400000` <br> **Default value:** `300000` (5 minutes)
|
||||||
| `maxNewsItems` | Total amount of news items to cycle through. (0 for unlimited) <br><br> **Possible values:**`0` - `...` <br> **Default value:** `0`
|
| `updateInterval` | How often do you want to display a new headline? (Milliseconds) <br><br> **Possible values:**`1000` - `60000` <br> **Default value:** `10000` (10 seconds)
|
||||||
| `ignoreOldItems` | Ignore news items that are outdated. <br><br> **Possible values:**`true` or `false <br> **Default value:** `false`
|
| `animationSpeed` | Speed of the update animation. (Milliseconds) <br><br> **Possible values:**`0` - `5000` <br> **Default value:** `2500` (2.5 seconds)
|
||||||
| `ignoreOlderThan` | How old should news items be before they are considered outdated? (Milliseconds) <br><br> **Possible values:**`1` - `...` <br> **Default value:** `86400000` (1 day)
|
| `maxNewsItems` | Total amount of news items to cycle through. (0 for unlimited) <br><br> **Possible values:**`0` - `...` <br> **Default value:** `0`
|
||||||
| `removeStartTags` | Some newsfeeds feature tags at the **beginning** of their titles or descriptions, such as _[VIDEO]_. This setting allows for the removal of specified tags from the beginning of an item's description and/or title. <br><br> **Possible values:**`'title'`, `'description'`, `'both'`
|
| `ignoreOldItems` | Ignore news items that are outdated. <br><br> **Possible values:**`true` or `false <br> **Default value:** `false`
|
||||||
| `startTags` | List the tags you would like to have removed at the beginning of the feed item <br><br> **Possible values:** `['TAG']` or `['TAG1','TAG2',...]`
|
| `ignoreOlderThan` | How old should news items be before they are considered outdated? (Milliseconds) <br><br> **Possible values:**`1` - `...` <br> **Default value:** `86400000` (1 day)
|
||||||
| `removeEndTags` | Remove specified tags from the **end** of an item's description and/or title. <br><br> **Possible values:**`'title'`, `'description'`, `'both'`
|
| `removeStartTags` | Some newsfeeds feature tags at the **beginning** of their titles or descriptions, such as _[VIDEO]_. This setting allows for the removal of specified tags from the beginning of an item's description and/or title. <br><br> **Possible values:**`'title'`, `'description'`, `'both'`
|
||||||
| `endTags` | List the tags you would like to have removed at the end of the feed item <br><br> **Possible values:** `['TAG']` or `['TAG1','TAG2',...]`
|
| `startTags` | List the tags you would like to have removed at the beginning of the feed item <br><br> **Possible values:** `['TAG']` or `['TAG1','TAG2',...]`
|
||||||
|
| `removeEndTags` | Remove specified tags from the **end** of an item's description and/or title. <br><br> **Possible values:**`'title'`, `'description'`, `'both'`
|
||||||
|
| `endTags` | List the tags you would like to have removed at the end of the feed item <br><br> **Possible values:** `['TAG']` or `['TAG1','TAG2',...]`
|
||||||
|
| `prohibitedWords` | Remove news feed item if one of these words is found anywhere in the title (case insensitive and greedy matching) <br><br> **Possible values:** `['word']` or `['word1','word2',...]`
|
||||||
|
|
||||||
The `feeds` property contains an array with multiple objects. These objects have the following properties:
|
The `feeds` property contains an array with multiple objects. These objects have the following properties:
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@ var Fetcher = function(url, reloadInterval, encoding) {
|
|||||||
if (title && pubdate) {
|
if (title && pubdate) {
|
||||||
|
|
||||||
var regex = /(<([^>]+)>)/ig;
|
var regex = /(<([^>]+)>)/ig;
|
||||||
description = description.replace(regex, "");
|
description = description.toString().replace(regex, "");
|
||||||
|
|
||||||
items.push({
|
items.push({
|
||||||
title: title,
|
title: title,
|
||||||
@ -61,17 +61,16 @@ var Fetcher = function(url, reloadInterval, encoding) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
console.log("Can't parse feed item:");
|
||||||
// console.log("Can't parse feed item:");
|
console.log(item);
|
||||||
// console.log(item);
|
console.log("Title: " + title);
|
||||||
// console.log('Title: ' + title);
|
console.log("Description: " + description);
|
||||||
// console.log('Description: ' + description);
|
console.log("Pubdate: " + pubdate);
|
||||||
// console.log('Pubdate: ' + pubdate);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
parser.on("end", function() {
|
parser.on("end", function() {
|
||||||
|
//console.log("end parsing - " + url);
|
||||||
self.broadcastItems();
|
self.broadcastItems();
|
||||||
scheduleTimer();
|
scheduleTimer();
|
||||||
});
|
});
|
||||||
@ -83,7 +82,9 @@ var Fetcher = function(url, reloadInterval, encoding) {
|
|||||||
|
|
||||||
|
|
||||||
nodeVersion = Number(process.version.match(/^v(\d+\.\d+)/)[1]);
|
nodeVersion = Number(process.version.match(/^v(\d+\.\d+)/)[1]);
|
||||||
headers = {"User-Agent": "Mozilla/5.0 (Node.js "+ nodeVersion + ") MagicMirror/" + global.version + " (https://github.com/MichMich/MagicMirror/)"}
|
headers = {"User-Agent": "Mozilla/5.0 (Node.js "+ nodeVersion + ") MagicMirror/" + global.version + " (https://github.com/MichMich/MagicMirror/)",
|
||||||
|
"Cache-Control": "max-age=0, no-cache, no-store, must-revalidate",
|
||||||
|
"Pragma": "no-cache"}
|
||||||
|
|
||||||
request({uri: url, encoding: null, headers: headers})
|
request({uri: url, encoding: null, headers: headers})
|
||||||
.on("error", function(error) {
|
.on("error", function(error) {
|
||||||
|
@ -23,8 +23,10 @@ Module.register("newsfeed",{
|
|||||||
showDescription: false,
|
showDescription: false,
|
||||||
wrapTitle: true,
|
wrapTitle: true,
|
||||||
wrapDescription: true,
|
wrapDescription: true,
|
||||||
|
truncDescription: true,
|
||||||
|
lengthDescription: 400,
|
||||||
hideLoading: false,
|
hideLoading: false,
|
||||||
reloadInterval: 5 * 60 * 1000, // every 5 minutes
|
reloadInterval: 5 * 60 * 1000, // every 5 minutes
|
||||||
updateInterval: 10 * 1000,
|
updateInterval: 10 * 1000,
|
||||||
animationSpeed: 2.5 * 1000,
|
animationSpeed: 2.5 * 1000,
|
||||||
maxNewsItems: 0, // 0 for unlimited
|
maxNewsItems: 0, // 0 for unlimited
|
||||||
@ -33,8 +35,8 @@ Module.register("newsfeed",{
|
|||||||
removeStartTags: "",
|
removeStartTags: "",
|
||||||
removeEndTags: "",
|
removeEndTags: "",
|
||||||
startTags: [],
|
startTags: [],
|
||||||
endTags: []
|
endTags: [],
|
||||||
|
prohibitedWords: []
|
||||||
},
|
},
|
||||||
|
|
||||||
// Define required scripts.
|
// Define required scripts.
|
||||||
@ -168,7 +170,9 @@ Module.register("newsfeed",{
|
|||||||
if (this.config.showDescription) {
|
if (this.config.showDescription) {
|
||||||
var description = document.createElement("div");
|
var description = document.createElement("div");
|
||||||
description.className = "small light" + (!this.config.wrapDescription ? " no-wrap" : "");
|
description.className = "small light" + (!this.config.wrapDescription ? " no-wrap" : "");
|
||||||
description.innerHTML = this.newsItems[this.activeItem].description;
|
var txtDesc = this.newsItems[this.activeItem].description;
|
||||||
|
//Log.info('txtDesc.length = ' + txtDesc.length + " - " + this.config.lengthDescription);
|
||||||
|
description.innerHTML = (this.config.truncDescription ? (txtDesc.length > this.config.lengthDescription ? txtDesc.substring(0, this.config.lengthDescription) + "..." : txtDesc) : txtDesc);
|
||||||
wrapper.appendChild(description);
|
wrapper.appendChild(description);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,6 +245,18 @@ Module.register("newsfeed",{
|
|||||||
if(this.config.maxNewsItems > 0) {
|
if(this.config.maxNewsItems > 0) {
|
||||||
newsItems = newsItems.slice(0, this.config.maxNewsItems);
|
newsItems = newsItems.slice(0, this.config.maxNewsItems);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(this.config.prohibitedWords.length > 0) {
|
||||||
|
newsItems = newsItems.filter(function(value){
|
||||||
|
for (var i=0; i < this.config.prohibitedWords.length; i++) {
|
||||||
|
if (value["title"].toLowerCase().indexOf(this.config.prohibitedWords[i].toLowerCase()) > -1) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}, this);
|
||||||
|
}
|
||||||
|
|
||||||
this.newsItems = newsItems;
|
this.newsItems = newsItems;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ module.exports = NodeHelper.create({
|
|||||||
|
|
||||||
var url = feed.url || "";
|
var url = feed.url || "";
|
||||||
var encoding = feed.encoding || "UTF-8";
|
var encoding = feed.encoding || "UTF-8";
|
||||||
var reloadInterval = config.reloadInterval || 5 * 60 * 1000;
|
var reloadInterval = feed.reloadInterval || config.reloadInterval || 5 * 60 * 1000;
|
||||||
|
|
||||||
if (!validUrl.isUri(url)) {
|
if (!validUrl.isUri(url)) {
|
||||||
self.sendSocketNotification("INCORRECT_URL", url);
|
self.sendSocketNotification("INCORRECT_URL", url);
|
||||||
|
@ -64,7 +64,10 @@ module.exports = NodeHelper.create({
|
|||||||
sg.git.fetch().status(function(err, data) {
|
sg.git.fetch().status(function(err, data) {
|
||||||
data.module = sg.module;
|
data.module = sg.module;
|
||||||
if (!err) {
|
if (!err) {
|
||||||
self.sendSocketNotification("STATUS", data);
|
sg.git.log({"-1": null}, function(err, data2) {
|
||||||
|
data.hash = data2.latest.hash;
|
||||||
|
self.sendSocketNotification("STATUS", data);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -34,6 +34,17 @@ Module.register("updatenotification", {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
diffLink: function(text) {
|
||||||
|
var localRef = this.status.hash;
|
||||||
|
var remoteRef = this.status.tracking.replace(/.*\//, "");
|
||||||
|
return "<a href=\"https://github.com/MichMich/MagicMirror/compare/"+localRef+"..."+remoteRef+"\" "+
|
||||||
|
"class=\"xsmall dimmed\" "+
|
||||||
|
"style=\"text-decoration: none;\" "+
|
||||||
|
"target=\"_blank\" >" +
|
||||||
|
text +
|
||||||
|
"</a>";
|
||||||
|
},
|
||||||
|
|
||||||
// Override dom generator.
|
// Override dom generator.
|
||||||
getDom: function () {
|
getDom: function () {
|
||||||
var wrapper = document.createElement("div");
|
var wrapper = document.createElement("div");
|
||||||
@ -47,9 +58,14 @@ Module.register("updatenotification", {
|
|||||||
icon.innerHTML = " ";
|
icon.innerHTML = " ";
|
||||||
message.appendChild(icon);
|
message.appendChild(icon);
|
||||||
|
|
||||||
|
var subtextHtml = this.translate("UPDATE_INFO")
|
||||||
|
.replace("COMMIT_COUNT", this.status.behind + " " + ((this.status.behind == 1) ? "commit" : "commits"))
|
||||||
|
.replace("BRANCH_NAME", this.status.current);
|
||||||
|
|
||||||
var text = document.createElement("span");
|
var text = document.createElement("span");
|
||||||
if (this.status.module == "default") {
|
if (this.status.module == "default") {
|
||||||
text.innerHTML = this.translate("UPDATE_NOTIFICATION");
|
text.innerHTML = this.translate("UPDATE_NOTIFICATION");
|
||||||
|
subtextHtml = this.diffLink(subtextHtml);
|
||||||
} else {
|
} else {
|
||||||
text.innerHTML = this.translate("UPDATE_NOTIFICATION_MODULE").replace("MODULE_NAME", this.status.module);
|
text.innerHTML = this.translate("UPDATE_NOTIFICATION_MODULE").replace("MODULE_NAME", this.status.module);
|
||||||
}
|
}
|
||||||
@ -58,9 +74,7 @@ Module.register("updatenotification", {
|
|||||||
wrapper.appendChild(message);
|
wrapper.appendChild(message);
|
||||||
|
|
||||||
var subtext = document.createElement("div");
|
var subtext = document.createElement("div");
|
||||||
subtext.innerHTML = this.translate("UPDATE_INFO")
|
subtext.innerHTML = subtextHtml;
|
||||||
.replace("COMMIT_COUNT", this.status.behind + " " + ((this.status.behind == 1) ? "commit" : "commits"))
|
|
||||||
.replace("BRANCH_NAME", this.status.current);
|
|
||||||
subtext.className = "xsmall dimmed";
|
subtext.className = "xsmall dimmed";
|
||||||
wrapper.appendChild(subtext);
|
wrapper.appendChild(subtext);
|
||||||
}
|
}
|
||||||
|
@ -37,6 +37,7 @@ The following properties can be configured:
|
|||||||
| `updateInterval` | How often does the content needs to be fetched? (Milliseconds) <br><br> **Possible values:** `1000` - `86400000` <br> **Default value:** `600000` (10 minutes)
|
| `updateInterval` | How often does the content needs to be fetched? (Milliseconds) <br><br> **Possible values:** `1000` - `86400000` <br> **Default value:** `600000` (10 minutes)
|
||||||
| `animationSpeed` | Speed of the update animation. (Milliseconds) <br><br> **Possible values:**`0` - `5000` <br> **Default value:** `1000` (1 second)
|
| `animationSpeed` | Speed of the update animation. (Milliseconds) <br><br> **Possible values:**`0` - `5000` <br> **Default value:** `1000` (1 second)
|
||||||
| `lang` | The language of the days. <br><br> **Possible values:** `en`, `nl`, `ru`, etc ... <br> **Default value:** uses value of _config.language_
|
| `lang` | The language of the days. <br><br> **Possible values:** `en`, `nl`, `ru`, etc ... <br> **Default value:** uses value of _config.language_
|
||||||
|
| `decimalSymbol` | The decimal symbol to use.<br><br> **Possible values:** `.`, `,` or any other symbol.<br> **Default value:** `.`
|
||||||
| `fade` | Fade the future events to black. (Gradient) <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
|
| `fade` | Fade the future events to black. (Gradient) <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
|
||||||
| `fadePoint` | Where to start fade? <br><br> **Possible values:** `0` (top of the list) - `1` (bottom of list) <br> **Default value:** `0.25`
|
| `fadePoint` | Where to start fade? <br><br> **Possible values:** `0` (top of the list) - `1` (bottom of list) <br> **Default value:** `0.25`
|
||||||
| `initialLoadDelay` | The initial delay before loading. If you have multiple modules that use the same API key, you might want to delay one of the requests. (Milliseconds) <br><br> **Possible values:** `1000` - `5000` <br> **Default value:** `2500` (2.5 seconds delay. This delay is used to keep the OpenWeather API happy.)
|
| `initialLoadDelay` | The initial delay before loading. If you have multiple modules that use the same API key, you might want to delay one of the requests. (Milliseconds) <br><br> **Possible values:** `1000` - `5000` <br> **Default value:** `2500` (2.5 seconds delay. This delay is used to keep the OpenWeather API happy.)
|
||||||
|
@ -21,6 +21,7 @@ Module.register("weatherforecast",{
|
|||||||
animationSpeed: 1000,
|
animationSpeed: 1000,
|
||||||
timeFormat: config.timeFormat,
|
timeFormat: config.timeFormat,
|
||||||
lang: config.language,
|
lang: config.language,
|
||||||
|
decimalSymbol: ".",
|
||||||
fade: true,
|
fade: true,
|
||||||
fadePoint: 0.25, // Start on 1/4th of the list.
|
fadePoint: 0.25, // Start on 1/4th of the list.
|
||||||
colored: false,
|
colored: false,
|
||||||
@ -30,7 +31,7 @@ Module.register("weatherforecast",{
|
|||||||
retryDelay: 2500,
|
retryDelay: 2500,
|
||||||
|
|
||||||
apiVersion: "2.5",
|
apiVersion: "2.5",
|
||||||
apiBase: "http://api.openweathermap.org/data/",
|
apiBase: "https://api.openweathermap.org/data/",
|
||||||
forecastEndpoint: "forecast/daily",
|
forecastEndpoint: "forecast/daily",
|
||||||
|
|
||||||
appendLocationNameToHeader: true,
|
appendLocationNameToHeader: true,
|
||||||
@ -155,13 +156,17 @@ Module.register("weatherforecast",{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.config.decimalSymbol === "" || this.config.decimalSymbol === " ") {
|
||||||
|
this.config.decimalSymbol = ".";
|
||||||
|
}
|
||||||
|
|
||||||
var maxTempCell = document.createElement("td");
|
var maxTempCell = document.createElement("td");
|
||||||
maxTempCell.innerHTML = forecast.maxTemp + degreeLabel;
|
maxTempCell.innerHTML = forecast.maxTemp.replace(".", this.config.decimalSymbol) + degreeLabel;
|
||||||
maxTempCell.className = "align-right bright max-temp";
|
maxTempCell.className = "align-right bright max-temp";
|
||||||
row.appendChild(maxTempCell);
|
row.appendChild(maxTempCell);
|
||||||
|
|
||||||
var minTempCell = document.createElement("td");
|
var minTempCell = document.createElement("td");
|
||||||
minTempCell.innerHTML = forecast.minTemp + degreeLabel;
|
minTempCell.innerHTML = forecast.minTemp.replace(".", this.config.decimalSymbol) + degreeLabel;
|
||||||
minTempCell.className = "align-right min-temp";
|
minTempCell.className = "align-right min-temp";
|
||||||
row.appendChild(minTempCell);
|
row.appendChild(minTempCell);
|
||||||
|
|
||||||
|
10
modules/node_modules/node_helper/index.js
generated
vendored
10
modules/node_modules/node_helper/index.js
generated
vendored
@ -23,6 +23,16 @@ NodeHelper = Class.extend({
|
|||||||
console.log("Starting module helper: " + this.name);
|
console.log("Starting module helper: " + this.name);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/* stop()
|
||||||
|
* Called when the MagicMirror server receives a `SIGINT`
|
||||||
|
* Close any open connections, stop any sub-processes and
|
||||||
|
* gracefully exit the module.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
stop: function() {
|
||||||
|
console.log("Stopping module helper: " + this.name);
|
||||||
|
},
|
||||||
|
|
||||||
/* socketNotificationReceived(notification, payload)
|
/* socketNotificationReceived(notification, payload)
|
||||||
* This method is called when a socket notification arrives.
|
* This method is called when a socket notification arrives.
|
||||||
*
|
*
|
||||||
|
6367
package-lock.json
generated
Normal file
6367
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
34
package.json
34
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "magicmirror",
|
"name": "magicmirror",
|
||||||
"version": "2.1.3",
|
"version": "2.2.0",
|
||||||
"description": "The open source modular smart mirror platform.",
|
"description": "The open source modular smart mirror platform.",
|
||||||
"main": "js/electron.js",
|
"main": "js/electron.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -33,39 +33,39 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://magicmirror.builders",
|
"homepage": "https://magicmirror.builders",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"chai": "^3.5.0",
|
"chai": "^4.1.2",
|
||||||
"chai-as-promised": "^6.0.0",
|
"chai-as-promised": "^7.1.1",
|
||||||
"current-week-number": "^1.0.7",
|
"current-week-number": "^1.0.7",
|
||||||
"grunt": "latest",
|
"grunt": "latest",
|
||||||
"grunt-eslint": "latest",
|
"grunt-eslint": "latest",
|
||||||
"grunt-jsonlint": "latest",
|
"grunt-jsonlint": "latest",
|
||||||
"grunt-markdownlint": "^1.0.39",
|
"grunt-markdownlint": "^1.0.43",
|
||||||
"grunt-stylelint": "latest",
|
"grunt-stylelint": "latest",
|
||||||
"grunt-yamllint": "latest",
|
"grunt-yamllint": "latest",
|
||||||
"http-auth": "^3.1.3",
|
"http-auth": "^3.2.3",
|
||||||
"jshint": "^2.9.4",
|
"jshint": "^2.9.5",
|
||||||
"mocha": "^3.4.2",
|
"mocha": "^4.1.0",
|
||||||
"mocha-each": "^1.1.0",
|
"mocha-each": "^1.1.0",
|
||||||
"spectron": "3.6.x",
|
"spectron": "3.7.x",
|
||||||
"stylelint": "^8.0.0",
|
"stylelint": "^8.4.0",
|
||||||
"stylelint-config-standard": "latest",
|
"stylelint-config-standard": "latest",
|
||||||
"time-grunt": "latest"
|
"time-grunt": "latest"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"body-parser": "^1.17.2",
|
"body-parser": "^1.18.2",
|
||||||
"colors": "^1.1.2",
|
"colors": "^1.1.2",
|
||||||
"electron": "^1.6.10",
|
"electron": "1.4.15",
|
||||||
"express": "^4.15.3",
|
"express": "^4.16.2",
|
||||||
"express-ipfilter": "0.3.1",
|
"express-ipfilter": "0.3.1",
|
||||||
"feedme": "latest",
|
"feedme": "latest",
|
||||||
"helmet": "^3.6.1",
|
"helmet": "^3.9.0",
|
||||||
"iconv-lite": "latest",
|
"iconv-lite": "latest",
|
||||||
"mocha-logger": "^1.0.5",
|
"mocha-logger": "^1.0.5",
|
||||||
"moment": "latest",
|
"moment": "latest",
|
||||||
"request": "^2.81.0",
|
"request": "^2.83.0",
|
||||||
"rrule-alt": "^2.2.5",
|
"rrule-alt": "^2.2.7",
|
||||||
"simple-git": "^1.73.0",
|
"simple-git": "^1.85.0",
|
||||||
"socket.io": "^2.0.2",
|
"socket.io": "^2.0.4",
|
||||||
"valid-url": "latest",
|
"valid-url": "latest",
|
||||||
"walk": "latest"
|
"walk": "latest"
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
if [ -z "$DISPLAY" ]; then #If not set DISPLAY is SSH remote or tty
|
if [ -z "$DISPLAY" ]; then #If not set DISPLAY is SSH remote or tty
|
||||||
export DISPLAY=:0 # Set by defaul display
|
export DISPLAY=:0 # Set by default display
|
||||||
fi
|
fi
|
||||||
electron js/electron.js $1
|
electron js/electron.js $1
|
||||||
|
@ -54,7 +54,7 @@ fs.readFile(configFileName, "utf-8", function (err, data) {
|
|||||||
v.JSHINT(data); // Parser by jshint
|
v.JSHINT(data); // Parser by jshint
|
||||||
|
|
||||||
if (v.JSHINT.errors.length == 0) {
|
if (v.JSHINT.errors.length == 0) {
|
||||||
console.log("Your configuration file don't containt syntax error :)");
|
console.log("Your configuration file doesn't contain syntax errors :)");
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
errors = v.JSHINT.data().errors;
|
errors = v.JSHINT.data().errors;
|
||||||
|
@ -25,7 +25,7 @@ describe("Check configuration without modules", function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
before(function () {
|
before(function () {
|
||||||
// Set config sample for use in test
|
// Set config sample for use in test
|
||||||
process.env.MM_CONFIG_FILE = "tests/configs/without_modules.js";
|
process.env.MM_CONFIG_FILE = "tests/configs/without_modules.js";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
32
translations/bg.json
Normal file
32
translations/bg.json
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"LOADING": "Зареждане …",
|
||||||
|
|
||||||
|
"TODAY": "Днес",
|
||||||
|
"TOMORROW": "Утре",
|
||||||
|
"DAYAFTERTOMORROW": "Вдругиден",
|
||||||
|
"RUNNING": "Свършва на",
|
||||||
|
"EMPTY": "Няма предстоящи събития.",
|
||||||
|
|
||||||
|
"WEEK": "Седмица {weekNumber}",
|
||||||
|
|
||||||
|
"N": "С",
|
||||||
|
"NNE": "ССИ",
|
||||||
|
"NE": "СИ",
|
||||||
|
"ENE": "ИСИ",
|
||||||
|
"E": "И",
|
||||||
|
"ESE": "ИЮИ",
|
||||||
|
"SE": "ЮИ",
|
||||||
|
"SSE": "ЮЮИ",
|
||||||
|
"S": "Ю",
|
||||||
|
"SSW": "ЮЮЗ",
|
||||||
|
"SW": "ЮЗ",
|
||||||
|
"WSW": "ЗЮЗ",
|
||||||
|
"W": "З",
|
||||||
|
"WNW": "ЗСЗ",
|
||||||
|
"NW": "СЗ",
|
||||||
|
"NNW": "ССЗ",
|
||||||
|
|
||||||
|
"UPDATE_NOTIFICATION": "Налична актуализация за MagicMirror².",
|
||||||
|
"UPDATE_NOTIFICATION_MODULE": "Налична актуализация за MODULE_NAME модул.",
|
||||||
|
"UPDATE_INFO": "Текущата инсталация е изостанала с COMMIT_COUNT къмита на клон BRANCH_NAME."
|
||||||
|
}
|
32
translations/ca.json
Normal file
32
translations/ca.json
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"LOADING": "Carregant …",
|
||||||
|
|
||||||
|
"TODAY": "Avui",
|
||||||
|
"TOMORROW": "Demà",
|
||||||
|
"DAYAFTERTOMORROW": "Demà passat",
|
||||||
|
"RUNNING": "Acaba en",
|
||||||
|
"EMPTY": "No hi ha esdeveniments programats.",
|
||||||
|
|
||||||
|
"WEEK": "Setmana",
|
||||||
|
|
||||||
|
"N": "N",
|
||||||
|
"NNE": "NNE",
|
||||||
|
"NE": "NE",
|
||||||
|
"ENE": "ENE",
|
||||||
|
"E": "E",
|
||||||
|
"ESE": "ESE",
|
||||||
|
"SE": "SE",
|
||||||
|
"SSE": "SSE",
|
||||||
|
"S": "S",
|
||||||
|
"SSW": "SSO",
|
||||||
|
"SW": "SO",
|
||||||
|
"WSW": "OSO",
|
||||||
|
"W": "O",
|
||||||
|
"WNW": "ONO",
|
||||||
|
"NW": "NO",
|
||||||
|
"NNW": "NNO",
|
||||||
|
|
||||||
|
"UPDATE_NOTIFICATION": "MagicMirror² actualizació disponible.",
|
||||||
|
"UPDATE_NOTIFICATION_MODULE": "Disponible una actualizació per al mòdul MODULE_NAME.",
|
||||||
|
"UPDATE_INFO": "La teva instal·lació actual està COMMIT_COUNT canvis darrere de la branca BRANCH_NAME."
|
||||||
|
}
|
32
translations/cs.json
Normal file
32
translations/cs.json
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"LOADING": "Načítání …",
|
||||||
|
|
||||||
|
"TODAY": "Dnes",
|
||||||
|
"TOMORROW": "Zítra",
|
||||||
|
"DAYAFTERTOMORROW": "Pozítří",
|
||||||
|
"RUNNING": "Končí za",
|
||||||
|
"EMPTY": "Žádné nadcházející události.",
|
||||||
|
|
||||||
|
"WEEK": "{weekNumber}. týden",
|
||||||
|
|
||||||
|
"N": "S",
|
||||||
|
"NNE": "SSV",
|
||||||
|
"NE": "SV",
|
||||||
|
"ENE": "VSV",
|
||||||
|
"E": "V",
|
||||||
|
"ESE": "VJV",
|
||||||
|
"SE": "JV",
|
||||||
|
"SSE": "JJV",
|
||||||
|
"S": "J",
|
||||||
|
"SSW": "JJZ",
|
||||||
|
"SW": "JZ",
|
||||||
|
"WSW": "ZJZ",
|
||||||
|
"W": "Z",
|
||||||
|
"WNW": "ZSZ",
|
||||||
|
"NW": "SZ",
|
||||||
|
"NNW": "SSZ",
|
||||||
|
|
||||||
|
"UPDATE_NOTIFICATION": "Dostupná aktualizace pro MagicMirror².",
|
||||||
|
"UPDATE_NOTIFICATION_MODULE": "Dostupná aktualizace pro modul MODULE_NAME.",
|
||||||
|
"UPDATE_INFO": "Současná instalace je na větvi BRANCH_NAME pozadu o COMMIT_COUNT."
|
||||||
|
}
|
@ -7,7 +7,7 @@
|
|||||||
"RUNNING": "Gorffen mewn",
|
"RUNNING": "Gorffen mewn",
|
||||||
"EMPTY": "Dim digwyddiadau.",
|
"EMPTY": "Dim digwyddiadau.",
|
||||||
|
|
||||||
"WEEK": "Wythnos",
|
"WEEK": "Wythnos {weekNumber}",
|
||||||
|
|
||||||
"N": "Go",
|
"N": "Go",
|
||||||
"NNE": "GoGoDw",
|
"NNE": "GoGoDw",
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"RUNNING": "noch",
|
"RUNNING": "noch",
|
||||||
"EMPTY": "Keine Termine.",
|
"EMPTY": "Keine Termine.",
|
||||||
|
|
||||||
"WEEK": "Woche",
|
"WEEK": "{weekNumber}. Kalenderwoche",
|
||||||
|
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNO",
|
"NNE": "NNO",
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"RUNNING": "Ends in",
|
"RUNNING": "Ends in",
|
||||||
"EMPTY": "No upcoming events.",
|
"EMPTY": "No upcoming events.",
|
||||||
|
|
||||||
"WEEK": "Week",
|
"WEEK": "Week {weekNumber}",
|
||||||
|
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNE",
|
"NNE": "NNE",
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"RUNNING": "Termina en",
|
"RUNNING": "Termina en",
|
||||||
"EMPTY": "No hay eventos programados.",
|
"EMPTY": "No hay eventos programados.",
|
||||||
|
|
||||||
"WEEK": "Semana",
|
"WEEK": "Semana {weekNumber}",
|
||||||
|
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNE",
|
"NNE": "NNE",
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"RUNNING": "Se termine dans",
|
"RUNNING": "Se termine dans",
|
||||||
"EMPTY": "Aucun RDV à venir.",
|
"EMPTY": "Aucun RDV à venir.",
|
||||||
|
|
||||||
"WEEK": "Semaine",
|
"WEEK": "Semaine {weekNumber}",
|
||||||
|
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNE",
|
"NNE": "NNE",
|
||||||
|
@ -6,25 +6,27 @@
|
|||||||
"DAYAFTERTOMORROW": "Lusa",
|
"DAYAFTERTOMORROW": "Lusa",
|
||||||
"RUNNING": "Berakhir dalam",
|
"RUNNING": "Berakhir dalam",
|
||||||
"EMPTY": "Tidak ada agenda",
|
"EMPTY": "Tidak ada agenda",
|
||||||
|
|
||||||
|
"WEEK": "Pekan",
|
||||||
|
|
||||||
"N": "U",
|
"N": "U",
|
||||||
"NNE": "UUT",
|
"NNE": "UTL",
|
||||||
"NE": "NE",
|
"NE": "TL",
|
||||||
"ENE": "TUT",
|
"ENE": "TTL",
|
||||||
"E": "T",
|
"E": "T",
|
||||||
"ESE": "TST",
|
"ESE": "TMg",
|
||||||
"SE": "ST",
|
"SE": "TG",
|
||||||
"SSE": "SST",
|
"SSE": "SMg",
|
||||||
"S": "S",
|
"S": "S",
|
||||||
"SSW": "SSB",
|
"SSW": "SBD",
|
||||||
"SW": "SB",
|
"SW": "BD",
|
||||||
"WSW": "BSB",
|
"WSW": "BBD",
|
||||||
"W": "B",
|
"W": "B",
|
||||||
"WNW": "BUB",
|
"WNW": "BBL",
|
||||||
"NW": "UB",
|
"NW": "BL",
|
||||||
"NNW": "UUB",
|
"NNW": "UBL",
|
||||||
|
|
||||||
"UPDATE_NOTIFICATION": "Update MagicMirror² tersedia.",
|
"UPDATE_NOTIFICATION": "Memperbarui MagicMirror² tersedia.",
|
||||||
"UPDATE_NOTIFICATION_MODULE": "Update tersedia untuk modul MODULE_NAME.",
|
"UPDATE_NOTIFICATION_MODULE": "Memperbarui tersedia untuk modul MODULE_NAME.",
|
||||||
"UPDATE_INFO": "Instalasi saat ini tertinggal COMMIT_COUNT pada cabang BRANCH_NAME."
|
"UPDATE_INFO": "Instalasi saat ini tertinggal COMMIT_COUNT pada cabang BRANCH_NAME."
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"RUNNING": "Slutter om",
|
"RUNNING": "Slutter om",
|
||||||
"EMPTY": "Ingen kommende arrangementer.",
|
"EMPTY": "Ingen kommende arrangementer.",
|
||||||
|
|
||||||
"WEEK": "Uke",
|
"WEEK": "Uke {weekNumber}",
|
||||||
|
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNØ",
|
"NNE": "NNØ",
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"RUNNING": "Koniec za",
|
"RUNNING": "Koniec za",
|
||||||
"EMPTY": "Brak wydarzeń.",
|
"EMPTY": "Brak wydarzeń.",
|
||||||
|
|
||||||
"WEEK": "Tydzień",
|
"WEEK": "Tydzień {weekNumber}",
|
||||||
|
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNE",
|
"NNE": "NNE",
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
"RUNNING": "Termina em",
|
"RUNNING": "Termina em",
|
||||||
"EMPTY": "Sem eventos programados.",
|
"EMPTY": "Sem eventos programados.",
|
||||||
|
|
||||||
"WEEK": "Semana",
|
"WEEK": "Semana {weekNumber}",
|
||||||
|
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNE",
|
"NNE": "NNE",
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"RUNNING": "Se termină în",
|
"RUNNING": "Se termină în",
|
||||||
"EMPTY": "Nici un eveniment.",
|
"EMPTY": "Nici un eveniment.",
|
||||||
|
|
||||||
"WEEK": "Săptămâna",
|
"WEEK": "Săptămâna {weekNumber}",
|
||||||
|
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNE",
|
"NNE": "NNE",
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"RUNNING": "Заканчивается через",
|
"RUNNING": "Заканчивается через",
|
||||||
"EMPTY": "Нет предстоящих событий",
|
"EMPTY": "Нет предстоящих событий",
|
||||||
|
|
||||||
"WEEK": "Неделя",
|
"WEEK": "Неделя {weekNumber}",
|
||||||
|
|
||||||
"N": "С",
|
"N": "С",
|
||||||
"NNE": "ССВ",
|
"NNE": "ССВ",
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"RUNNING": "Slutar",
|
"RUNNING": "Slutar",
|
||||||
"EMPTY": "Inga kommande händelser.",
|
"EMPTY": "Inga kommande händelser.",
|
||||||
|
|
||||||
"WEEK": "Vecka",
|
"WEEK": "Vecka {weekNumber}",
|
||||||
|
|
||||||
"N": "N",
|
"N": "N",
|
||||||
"NNE": "NNO",
|
"NNE": "NNO",
|
||||||
|
@ -13,6 +13,7 @@ var translations = {
|
|||||||
"fr" : "translations/fr.json", // French
|
"fr" : "translations/fr.json", // French
|
||||||
"fy" : "translations/fy.json", // Frysk
|
"fy" : "translations/fy.json", // Frysk
|
||||||
"es" : "translations/es.json", // Spanish
|
"es" : "translations/es.json", // Spanish
|
||||||
|
"ca" : "translations/ca.json", // Catalan
|
||||||
"nb" : "translations/nb.json", // Norsk bokmål
|
"nb" : "translations/nb.json", // Norsk bokmål
|
||||||
"nn" : "translations/nn.json", // Norsk nynorsk
|
"nn" : "translations/nn.json", // Norsk nynorsk
|
||||||
"pt" : "translations/pt.json", // Português
|
"pt" : "translations/pt.json", // Português
|
||||||
@ -34,7 +35,9 @@ var translations = {
|
|||||||
"et" : "translations/et.json", // Estonian
|
"et" : "translations/et.json", // Estonian
|
||||||
"kr" : "translations/kr.json", // Korean
|
"kr" : "translations/kr.json", // Korean
|
||||||
"ro" : "translations/ro.json", // Romanian
|
"ro" : "translations/ro.json", // Romanian
|
||||||
"cy" : "translations/cy.json" // Welsh (Cymraeg)
|
"cy" : "translations/cy.json", // Welsh (Cymraeg)
|
||||||
|
"bg" : "translations/bg.json", // Bulgarian
|
||||||
|
"cs" : "translations/cs.json" // Czech
|
||||||
};
|
};
|
||||||
|
|
||||||
if (typeof module !== "undefined") {module.exports = translations;}
|
if (typeof module !== "undefined") {module.exports = translations;}
|
||||||
|
1434
vendor/package-lock.json
generated
vendored
Normal file
1434
vendor/package-lock.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
vendor/package.json
vendored
1
vendor/package.json
vendored
@ -13,6 +13,7 @@
|
|||||||
"font-awesome": "^4.7.0",
|
"font-awesome": "^4.7.0",
|
||||||
"moment": "^2.17.1",
|
"moment": "^2.17.1",
|
||||||
"moment-timezone": "^0.5.11",
|
"moment-timezone": "^0.5.11",
|
||||||
|
"nunjucks": "^3.0.1",
|
||||||
"weathericons": "^2.1.0"
|
"weathericons": "^2.1.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
3
vendor/vendor.js
vendored
3
vendor/vendor.js
vendored
@ -12,7 +12,8 @@ var vendor = {
|
|||||||
"moment-timezone.js" : "node_modules/moment-timezone/builds/moment-timezone-with-data.js",
|
"moment-timezone.js" : "node_modules/moment-timezone/builds/moment-timezone-with-data.js",
|
||||||
"weather-icons.css": "node_modules/weathericons/css/weather-icons.css",
|
"weather-icons.css": "node_modules/weathericons/css/weather-icons.css",
|
||||||
"weather-icons-wind.css": "node_modules/weathericons/css/weather-icons-wind.css",
|
"weather-icons-wind.css": "node_modules/weathericons/css/weather-icons-wind.css",
|
||||||
"font-awesome.css": "node_modules/font-awesome/css/font-awesome.min.css"
|
"font-awesome.css": "node_modules/font-awesome/css/font-awesome.min.css",
|
||||||
|
"nunjucks.js": "node_modules/nunjucks/browser/nunjucks.min.js"
|
||||||
};
|
};
|
||||||
|
|
||||||
if (typeof module !== "undefined"){module.exports = vendor;}
|
if (typeof module !== "undefined"){module.exports = vendor;}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user