mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-26 08:01:29 +00:00
Merge pull request #237 from roxasvalor/v2-beta
Added option for units inside of config.js
This commit is contained in:
@@ -77,6 +77,7 @@ The following properties can be configured:
|
||||
| `port` | The port on which the MagicMirror² server will run on. The default value is `8080`. |
|
||||
| `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`. |
|
||||
| `timeFormat` | The form of time notation that will be used. Possible values are `12` or `24`. The default is `24`. |
|
||||
| `units` | The units that will be used in the default weather modules. Possible values are `metric` or `imperial`. The default is `metric`. |
|
||||
| `modules` | An array of active modules. **The array must contain objects. See the next table below for more information.** |
|
||||
|
||||
Module configuration:
|
||||
|
@@ -9,6 +9,7 @@ var config = {
|
||||
|
||||
language: 'en',
|
||||
timeFormat: 24,
|
||||
units: 'metric',
|
||||
|
||||
modules: [
|
||||
{
|
||||
|
@@ -12,7 +12,8 @@ var defaults = {
|
||||
|
||||
language: "en",
|
||||
timeFormat: 24,
|
||||
|
||||
units: "metric",
|
||||
|
||||
modules: [
|
||||
{
|
||||
module: "helloworld",
|
||||
|
@@ -13,7 +13,7 @@ Module.register("currentweather",{
|
||||
defaults: {
|
||||
location: "",
|
||||
appid: "",
|
||||
units: "metric",
|
||||
units: config.units,
|
||||
updateInterval: 10 * 60 * 1000, // every 10 minutes
|
||||
animationSpeed: 1000,
|
||||
timeFormat: config.timeFormat,
|
||||
|
@@ -13,7 +13,7 @@ Module.register("weatherforecast",{
|
||||
defaults: {
|
||||
location: "",
|
||||
appid: "",
|
||||
units: "metric",
|
||||
units: config.units,
|
||||
updateInterval: 10 * 60 * 1000, // every 10 minutes
|
||||
animationSpeed: 1000,
|
||||
timeFormat: config.timeFormat,
|
||||
|
Reference in New Issue
Block a user