mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 11:50:00 +00:00
Fix mixed tabs and whitespace errors
This commit is contained in:
parent
ef8d85773c
commit
941d5d7cd9
@ -9,19 +9,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
var config = {
|
var config = {
|
||||||
address: "localhost", // Address to listen on, can be:
|
address: "localhost", // Address to listen on, can be:
|
||||||
// - "localhost", "127.0.0.1", "::1" to listen on loopback interface
|
// - "localhost", "127.0.0.1", "::1" to listen on loopback interface
|
||||||
// - another specific IPv4/6 to listen on a specific interface
|
// - another specific IPv4/6 to listen on a specific interface
|
||||||
// - "0.0.0.0", "::" to listen on any interface
|
// - "0.0.0.0", "::" to listen on any interface
|
||||||
// Default, when address config is left out or empty, is "localhost"
|
// Default, when address config is left out or empty, is "localhost"
|
||||||
port: 8080,
|
port: 8080,
|
||||||
basePath: "/", // The URL path where MagicMirror is hosted. If you are using a Reverse proxy
|
basePath: "/", // The URL path where MagicMirror is hosted. If you are using a Reverse proxy
|
||||||
// you must set the sub path here. basePath must end with a /
|
// you must set the sub path here. basePath must end with a /
|
||||||
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
|
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses
|
||||||
// or add a specific IPv4 of 192.168.1.5 :
|
// or add a specific IPv4 of 192.168.1.5 :
|
||||||
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
|
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"],
|
||||||
// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
|
// or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format :
|
||||||
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
|
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],
|
||||||
|
|
||||||
useHttps: false, // Support HTTPS or not, default "false" will use HTTP
|
useHttps: false, // Support HTTPS or not, default "false" will use HTTP
|
||||||
httpsPrivateKey: "", // HTTPS private key path, only require when useHttps is true
|
httpsPrivateKey: "", // HTTPS private key path, only require when useHttps is true
|
||||||
@ -31,10 +31,10 @@ var config = {
|
|||||||
timeFormat: 24,
|
timeFormat: 24,
|
||||||
units: "metric",
|
units: "metric",
|
||||||
// serverOnly: true/false/"local" ,
|
// serverOnly: true/false/"local" ,
|
||||||
// local for armv6l processors, default
|
// local for armv6l processors, default
|
||||||
// starts serveronly and then starts chrome browser
|
// starts serveronly and then starts chrome browser
|
||||||
// false, default for all NON-armv6l devices
|
// false, default for all NON-armv6l devices
|
||||||
// true, force serveronly mode, because you want to.. no UI on this device
|
// true, force serveronly mode, because you want to.. no UI on this device
|
||||||
|
|
||||||
modules: [
|
modules: [
|
||||||
{
|
{
|
||||||
@ -100,7 +100,6 @@ var config = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
||||||
|
@ -61,7 +61,7 @@ var App = function() {
|
|||||||
// https://forum.magicmirror.builders/topic/1456/test-suite-for-magicmirror/8
|
// https://forum.magicmirror.builders/topic/1456/test-suite-for-magicmirror/8
|
||||||
var configFilename = path.resolve(global.root_path + "/config/config.js");
|
var configFilename = path.resolve(global.root_path + "/config/config.js");
|
||||||
if (typeof(global.configuration_file) !== "undefined") {
|
if (typeof(global.configuration_file) !== "undefined") {
|
||||||
configFilename = path.resolve(global.configuration_file);
|
configFilename = path.resolve(global.configuration_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -73,7 +73,7 @@ var Server = function(config, callback) {
|
|||||||
|
|
||||||
configFile = "config/config.js";
|
configFile = "config/config.js";
|
||||||
if (typeof(global.configuration_file) !== "undefined") {
|
if (typeof(global.configuration_file) !== "undefined") {
|
||||||
configFile = global.configuration_file;
|
configFile = global.configuration_file;
|
||||||
}
|
}
|
||||||
html = html.replace("#CONFIG_FILE#", configFile);
|
html = html.replace("#CONFIG_FILE#", configFile);
|
||||||
|
|
||||||
|
@ -474,8 +474,8 @@ Module.register("calendar", {
|
|||||||
}
|
}
|
||||||
if(this.config.hidePrivate) {
|
if(this.config.hidePrivate) {
|
||||||
if(event.class === "PRIVATE") {
|
if(event.class === "PRIVATE") {
|
||||||
// do not add the current event, skip it
|
// do not add the current event, skip it
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(this.config.hideOngoing) {
|
if(this.config.hideOngoing) {
|
||||||
@ -734,8 +734,8 @@ Module.register("calendar", {
|
|||||||
|
|
||||||
var regParts = needle.match(/^\/(.+)\/([gim]*)$/);
|
var regParts = needle.match(/^\/(.+)\/([gim]*)$/);
|
||||||
if (regParts) {
|
if (regParts) {
|
||||||
// the parsed pattern is a regexp.
|
// the parsed pattern is a regexp.
|
||||||
needle = new RegExp(regParts[1], regParts[2]);
|
needle = new RegExp(regParts[1], regParts[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
title = title.replace(needle, replacement);
|
title = title.replace(needle, replacement);
|
||||||
|
@ -198,7 +198,7 @@ Module.register("clock",{
|
|||||||
* Create wrappers for ANALOG clock, only if specified in config
|
* Create wrappers for ANALOG clock, only if specified in config
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (this.config.displayType !== "digital") {
|
if (this.config.displayType !== "digital") {
|
||||||
// If it isn't 'digital', then an 'analog' clock was also requested
|
// If it isn't 'digital', then an 'analog' clock was also requested
|
||||||
|
|
||||||
// Calculate the degree offset for each hand of the clock
|
// Calculate the degree offset for each hand of the clock
|
||||||
|
@ -210,11 +210,11 @@ Module.register("weather",{
|
|||||||
if (isNaN(value) || value === 0 || value.toFixed(2) === "0.00") {
|
if (isNaN(value) || value === 0 || value.toFixed(2) === "0.00") {
|
||||||
value = "";
|
value = "";
|
||||||
} else {
|
} else {
|
||||||
if (this.config.weatherProvider === "ukmetoffice") {
|
if (this.config.weatherProvider === "ukmetoffice") {
|
||||||
value += "%";
|
value += "%";
|
||||||
} else {
|
} else {
|
||||||
value = `${value.toFixed(2)} ${this.config.units === "imperial" ? "in" : "mm"}`;
|
value = `${value.toFixed(2)} ${this.config.units === "imperial" ? "in" : "mm"}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (type === "humidity") {
|
} else if (type === "humidity") {
|
||||||
value += "%";
|
value += "%";
|
||||||
|
@ -87,8 +87,8 @@ class WeatherObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
feelsLike() {
|
feelsLike() {
|
||||||
if (this.feelsLikeTemp) {
|
if (this.feelsLikeTemp) {
|
||||||
return this.feelsLikeTemp;
|
return this.feelsLikeTemp;
|
||||||
}
|
}
|
||||||
const windInMph = (this.windUnits === "imperial") ? this.windSpeed : this.windSpeed * 2.23694;
|
const windInMph = (this.windUnits === "imperial") ? this.windSpeed : this.windSpeed * 2.23694;
|
||||||
const tempInF = this.tempUnits === "imperial" ? this.temperature : this.temperature * 9 / 5 + 32;
|
const tempInF = this.tempUnits === "imperial" ? this.temperature : this.temperature * 9 / 5 + 32;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user