mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
Merge branch 'develop' into develop
This commit is contained in:
commit
d923ae2107
10
CHANGELOG.md
10
CHANGELOG.md
@ -10,11 +10,21 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
*This release is scheduled to be released on 2018-10-01.*
|
||||
|
||||
### Added
|
||||
- Possibility to add classes to the cell of symbol, title and time of the events of calendar.
|
||||
- Font-awesome 5, still has 4 for backwards compatibility.
|
||||
- Missing `showEnd` in calendar documentation
|
||||
- Screenshot for the new feed module
|
||||
- Screenshot for the compliments module
|
||||
- Screenshot for the clock module
|
||||
- Screenshot for the current weather
|
||||
- Screenshot for the weather forecast module
|
||||
|
||||
### Fixed
|
||||
- Allow to parse recurring calendar events where the start date is before 1900
|
||||
- Fixed Polish translation for Single Update Info
|
||||
|
||||
### Updated
|
||||
- The default calendar setting `showEnd` is changed to `false`.
|
||||
|
||||
## [2.5.0] - 2018-10-01
|
||||
|
||||
|
@ -44,7 +44,7 @@ var config = {
|
||||
config: {
|
||||
calendars: [
|
||||
{
|
||||
symbol: "calendar-check-o ",
|
||||
symbol: "calendar-check",
|
||||
url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
|
||||
}
|
||||
]
|
||||
@ -69,7 +69,7 @@ var config = {
|
||||
header: "Weather Forecast",
|
||||
config: {
|
||||
location: "New York",
|
||||
locationID: "5128581", //ID from http://www.openweathermap.org/help/city_list.txt
|
||||
locationID: "5128581", //ID from https://openweathermap.org/city
|
||||
appid: "YOUR_OPENWEATHER_API_KEY"
|
||||
}
|
||||
},
|
||||
|
@ -43,6 +43,7 @@ The following properties can be configured:
|
||||
| `dateFormat` | Format to use for the date of events (when using absolute dates) <br><br> **Possible values:** See [Moment.js formats](http://momentjs.com/docs/#/parsing/string-format/) <br> **Default value:** `MMM Do` (e.g. Jan 18th)
|
||||
| `fullDayEventDateFormat` | Format to use for the date of full day events (when using absolute dates) <br><br> **Possible values:** See [Moment.js formats](http://momentjs.com/docs/#/parsing/string-format/) <br> **Default value:** `MMM Do` (e.g. Jan 18th)
|
||||
| `timeFormat` | Display event times as absolute dates, or relative time, or using absolute date headers with times for each event next to it <br><br> **Possible values:** `absolute` or `relative` or `dateheaders` <br> **Default value:** `relative`
|
||||
| `showEnd` | Display the end of a date as well <br><br> **Possible values:** `true` or `false` <br> **Default value:** `true`
|
||||
| `getRelative` | How much time (in hours) should be left until calendar events start getting relative? <br><br> **Possible values:** `0` (events stay absolute) - `48` (48 hours before the event starts) <br> **Default value:** `6`
|
||||
| `urgency` | When using a timeFormat of `absolute`, the `urgency` setting allows you to display events within a specific time frame as `relative`. This allows events within a certain time frame to be displayed as relative (in xx days) while others are displayed as absolute dates <br><br> **Possible values:** a positive integer representing the number of days for which you want a relative date, for example `7` (for 7 days) <br><br> **Default value:** `7`
|
||||
| `broadcastEvents` | If this property is set to true, the calendar will broadcast all the events to all other modules with the notification message: `CALENDAR_EVENTS`. The event objects are stored in an array and contain the following fields: `title`, `startDate`, `endDate`, `fullDayEvent`, `location` and `geo`. <br><br> **Possible values:** `true`, `false` <br><br> **Default value:** `true`
|
||||
@ -85,6 +86,9 @@ config: {
|
||||
| `maximumEntries` | The maximum number of events shown. Overrides global setting. **Possible values:** `0` - `100`
|
||||
| `maximumNumberOfDays` | The maximum number of days in the future. Overrides global setting
|
||||
| `auth` | The object containing options for authentication against the calendar.
|
||||
| `symbolClass` | Add a class to the cell of symbol.
|
||||
| `titleClass` | Add a class to the title's cell.
|
||||
| `timeClass` | Add a class to the time's cell.
|
||||
|
||||
|
||||
#### Calendar authentication options:
|
||||
|
@ -27,7 +27,7 @@ Module.register("calendar", {
|
||||
dateFormat: "MMM Do",
|
||||
dateEndFormat: "HH:mm",
|
||||
fullDayEventDateFormat: "MMM Do",
|
||||
showEnd: true,
|
||||
showEnd: false,
|
||||
getRelative: 6,
|
||||
fadePoint: 0.25, // Start on 1/4th of the list.
|
||||
hidePrivate: false,
|
||||
@ -51,7 +51,7 @@ Module.register("calendar", {
|
||||
|
||||
// Define required scripts.
|
||||
getStyles: function () {
|
||||
return ["calendar.css", "font-awesome.css"];
|
||||
return ["calendar.css", "font-awesome5.css", "font-awesome5.v4shims.css"];
|
||||
},
|
||||
|
||||
// Define required scripts.
|
||||
@ -82,6 +82,15 @@ Module.register("calendar", {
|
||||
maximumEntries: calendar.maximumEntries,
|
||||
maximumNumberOfDays: calendar.maximumNumberOfDays
|
||||
};
|
||||
if (calendar.symbolClass === "undefined" || calendar.symbolClass === null) {
|
||||
calendarConfig.symbolClass = "";
|
||||
}
|
||||
if (calendar.titleClass === "undefined" || calendar.titleClass === null) {
|
||||
calendarConfig.titleClass = "";
|
||||
}
|
||||
if (calendar.timeClass === "undefined" || calendar.timeClass === null) {
|
||||
calendarConfig.timeClass = "";
|
||||
}
|
||||
|
||||
// we check user and password here for backwards compatibility with old configs
|
||||
if(calendar.user && calendar.pass) {
|
||||
@ -143,7 +152,7 @@ Module.register("calendar", {
|
||||
if(this.config.timeFormat === "dateheaders"){
|
||||
if(lastSeenDate !== dateAsString){
|
||||
var dateRow = document.createElement("tr");
|
||||
dateRow.className = "normal"
|
||||
dateRow.className = "normal";
|
||||
var dateCell = document.createElement("td");
|
||||
|
||||
dateCell.colSpan = "3";
|
||||
@ -172,7 +181,9 @@ Module.register("calendar", {
|
||||
symbolWrapper.style.cssText = "color:" + this.colorForUrl(event.url);
|
||||
}
|
||||
|
||||
symbolWrapper.className = "symbol align-right";
|
||||
var symbolClass = this.symbolClassForUrl(event.url);
|
||||
symbolWrapper.className = "symbol align-right " + symbolClass;
|
||||
|
||||
var symbols = this.symbolsForUrl(event.url);
|
||||
if(typeof symbols === "string") {
|
||||
symbols = [symbols];
|
||||
@ -189,7 +200,7 @@ Module.register("calendar", {
|
||||
eventWrapper.appendChild(symbolWrapper);
|
||||
}else if(this.config.timeFormat === "dateheaders"){
|
||||
var blankCell = document.createElement("td");
|
||||
blankCell.innerHTML = " "
|
||||
blankCell.innerHTML = " ";
|
||||
eventWrapper.appendChild(blankCell);
|
||||
}
|
||||
|
||||
@ -210,10 +221,12 @@ Module.register("calendar", {
|
||||
|
||||
titleWrapper.innerHTML = this.titleTransform(event.title) + repeatingCountTitle;
|
||||
|
||||
var titleClass = this.titleClassForUrl(event.url);
|
||||
|
||||
if (!this.config.colored) {
|
||||
titleWrapper.className = "title bright";
|
||||
titleWrapper.className = "title bright " + titleClass;
|
||||
} else {
|
||||
titleWrapper.className = "title";
|
||||
titleWrapper.className = "title " + titleClass;
|
||||
}
|
||||
|
||||
if(this.config.timeFormat === "dateheaders"){
|
||||
@ -223,8 +236,10 @@ Module.register("calendar", {
|
||||
titleWrapper.align = "left";
|
||||
|
||||
}else{
|
||||
|
||||
var timeClass = this.timeClassForUrl(event.url);
|
||||
var timeWrapper = document.createElement("td");
|
||||
timeWrapper.className = "time light";
|
||||
timeWrapper.className = "time light " + timeClass;
|
||||
timeWrapper.align = "left";
|
||||
timeWrapper.style.paddingLeft = "2px";
|
||||
var timeFormatString = "";
|
||||
@ -343,7 +358,8 @@ Module.register("calendar", {
|
||||
}
|
||||
//timeWrapper.innerHTML += ' - '+ moment(event.startDate,'x').format('lll');
|
||||
//console.log(event);
|
||||
timeWrapper.className = "time light";
|
||||
var timeClass = this.timeClassForUrl(event.url);
|
||||
timeWrapper.className = "time light " + timeClass;
|
||||
eventWrapper.appendChild(timeWrapper);
|
||||
}
|
||||
|
||||
@ -472,11 +488,15 @@ Module.register("calendar", {
|
||||
maximumEntries: calendarConfig.maximumEntries || this.config.maximumEntries,
|
||||
maximumNumberOfDays: calendarConfig.maximumNumberOfDays || this.config.maximumNumberOfDays,
|
||||
fetchInterval: this.config.fetchInterval,
|
||||
symbolClass: calendarConfig.symbolClass,
|
||||
titleClass: calendarConfig.titleClass,
|
||||
timeClass: calendarConfig.timeClass,
|
||||
auth: auth
|
||||
});
|
||||
},
|
||||
|
||||
/* symbolsForUrl(url)
|
||||
/**
|
||||
* symbolsForUrl(url)
|
||||
* Retrieves the symbols for a specific url.
|
||||
*
|
||||
* argument url string - Url to look for.
|
||||
@ -487,6 +507,42 @@ Module.register("calendar", {
|
||||
return this.getCalendarProperty(url, "symbol", this.config.defaultSymbol);
|
||||
},
|
||||
|
||||
/**
|
||||
* symbolClassForUrl(url)
|
||||
* Retrieves the symbolClass for a specific url.
|
||||
*
|
||||
* @param url string - Url to look for.
|
||||
*
|
||||
* @returns string
|
||||
*/
|
||||
symbolClassForUrl: function (url) {
|
||||
return this.getCalendarProperty(url, "symbolClass", "");
|
||||
},
|
||||
|
||||
/**
|
||||
* titleClassForUrl(url)
|
||||
* Retrieves the titleClass for a specific url.
|
||||
*
|
||||
* @param url string - Url to look for.
|
||||
*
|
||||
* @returns string
|
||||
*/
|
||||
titleClassForUrl: function (url) {
|
||||
return this.getCalendarProperty(url, "titleClass", "");
|
||||
},
|
||||
|
||||
/**
|
||||
* timeClassForUrl(url)
|
||||
* Retrieves the timeClass for a specific url.
|
||||
*
|
||||
* @param url string - Url to look for.
|
||||
*
|
||||
* @returns string
|
||||
*/
|
||||
timeClassForUrl: function (url) {
|
||||
return this.getCalendarProperty(url, "timeClass", "");
|
||||
},
|
||||
|
||||
/* colorForUrl(url)
|
||||
* Retrieves the color for a specific url.
|
||||
*
|
||||
|
@ -2,6 +2,11 @@
|
||||
The `clock` module is one of the default modules of the MagicMirror.
|
||||
This module displays the current date and time. The information will be updated realtime.
|
||||
|
||||
## Screenshot
|
||||
|
||||
- Current time
|
||||

|
||||
|
||||
## Using the module
|
||||
|
||||
To use this module, add it to the modules array in the `config/config.js` file:
|
||||
|
BIN
modules/default/clock/clock_screenshot.png
Normal file
BIN
modules/default/clock/clock_screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 30 KiB |
@ -2,6 +2,10 @@
|
||||
The `compliments` module is one of the default modules of the MagicMirror.
|
||||
This module displays a random compliment.
|
||||
|
||||
## Screenshots
|
||||
- Compliments Screenshot
|
||||

|
||||
|
||||
## Using the module
|
||||
|
||||
To use this module, add it to the modules array in the `config/config.js` file:
|
||||
@ -45,22 +49,22 @@ The `compliments` property contains an object with four arrays: <code>morning</c
|
||||
|
||||
|
||||
If use the currentweather is possible use a actual weather for set compliments. The availables properties are:
|
||||
* `day_sunny`
|
||||
* `day_cloudy`
|
||||
* `cloudy`
|
||||
* `cloudy_windy`
|
||||
* `showers`
|
||||
* `rain`
|
||||
* `thunderstorm`
|
||||
* `snow`
|
||||
* `fog`
|
||||
* `night_clear`
|
||||
* `night_cloudy`
|
||||
* `night_showers`
|
||||
* `night_rain`
|
||||
* `night_thunderstorm`
|
||||
* `night_snow`
|
||||
* `night_alt_cloudy_windy`
|
||||
- `day_sunny`
|
||||
- `day_cloudy`
|
||||
- `cloudy`
|
||||
- `cloudy_windy`
|
||||
- `showers`
|
||||
- `rain`
|
||||
- `thunderstorm`
|
||||
- `snow`
|
||||
- `fog`
|
||||
- `night_clear`
|
||||
- `night_cloudy`
|
||||
- `night_showers`
|
||||
- `night_rain`
|
||||
- `night_thunderstorm`
|
||||
- `night_snow`
|
||||
- `night_alt_cloudy_windy`
|
||||
|
||||
#### Example use with currentweather module
|
||||
````javascript
|
||||
|
BIN
modules/default/compliments/compliments_screenshot.png
Normal file
BIN
modules/default/compliments/compliments_screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
@ -2,6 +2,11 @@
|
||||
The `currentweather` module is one of the default modules of the MagicMirror.
|
||||
This module displays the current weather, including the windspeed, the sunset or sunrise time, the temperature and an icon to display the current conditions.
|
||||
|
||||
## Screenshot
|
||||
|
||||
- Current weather screenshot
|
||||

|
||||
|
||||
## Using the module
|
||||
|
||||
To use this module, add it to the modules array in the `config/config.js` file:
|
||||
@ -29,7 +34,7 @@ The following properties can be configured:
|
||||
| Option | Description
|
||||
| ---------------------------- | -----------
|
||||
| `location` | The location used for weather information. <br><br> **Example:** `'Amsterdam,Netherlands'` <br> **Default value:** `false` <br><br> **Note:** When the `location` and `locationID` are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used.
|
||||
| `locationID` | Location ID from [OpenWeatherMap](http://openweathermap.org/help/city_list.txt) **This will override anything you put in location.** <br> Leave blank if you want to use location. <br> **Example:** `1234567` <br> **Default value:** `false` <br><br> **Note:** When the `location` and `locationID` are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used.
|
||||
| `locationID` | Location ID from [OpenWeatherMap](https://openweathermap.org/find) **This will override anything you put in location.** <br> Leave blank if you want to use location. <br> **Example:** `1234567` <br> **Default value:** `false` <br><br> **Note:** When the `location` and `locationID` are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used.
|
||||
| `appid` | The [OpenWeatherMap](https://home.openweathermap.org) API key, which can be obtained by creating an OpenWeatherMap account. <br><br> This value is **REQUIRED**
|
||||
| `units` | What units to use. Specified by config.js <br><br> **Possible values:** `config.units` = Specified by config.js, `default` = Kelvin, `metric` = Celsius, `imperial` =Fahrenheit <br> **Default value:** `config.units`
|
||||
| `roundTemp` | Round temperature value to nearest integer. <br><br> **Possible values:** `true` (round to integer) or `false` (display exact value with decimal point) <br> **Default value:** `false`
|
||||
|
BIN
modules/default/currentweather/weather_screenshot.png
Normal file
BIN
modules/default/currentweather/weather_screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 38 KiB |
@ -2,6 +2,10 @@
|
||||
The `newsfeed ` module is one of the default modules of the MagicMirror.
|
||||
This module displays news headlines based on an RSS feed. Scrolling through news headlines happens time-based (````updateInterval````), but can also be controlled by sending news feed specific notifications to the module.
|
||||
|
||||
## Screenshot
|
||||
- News Feed Screenshot using the NYT
|
||||

|
||||
|
||||
## Using the module
|
||||
|
||||
### Configuration
|
||||
|
BIN
modules/default/newsfeed/newsfeed_screenshot.png
Normal file
BIN
modules/default/newsfeed/newsfeed_screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 44 KiB |
@ -2,6 +2,11 @@
|
||||
The `weatherforecast` module is one of the default modules of the MagicMirror.
|
||||
This module displays the weather forecast for the coming week, including an an icon to display the current conditions, the minimum temperature and the maximum temperature.
|
||||
|
||||
## Screenshots
|
||||
|
||||
- 5 day forecast
|
||||

|
||||
|
||||
## Using the module
|
||||
|
||||
To use this module, add it to the modules array in the `config/config.js` file:
|
||||
@ -28,7 +33,7 @@ The following properties can be configured:
|
||||
| Option | Description
|
||||
| ---------------------------- | -----------
|
||||
| `location` | The location used for weather information. <br><br> **Example:** `'Amsterdam,Netherlands'` <br> **Default value:** `false` <br><br> **Note:** When the `location` and `locationID` are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used.
|
||||
| `locationID` | Location ID from [OpenWeatherMap](http://openweathermap.org/help/city_list.txt) **This will override anything you put in location.** <br> Leave blank if you want to use location. <br> **Example:** `1234567` <br> **Default value:** `false` <br><br> **Note:** When the `location` and `locationID` are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used.
|
||||
| `locationID` | Location ID from [OpenWeatherMap](https://openweathermap.org/find) **This will override anything you put in location.** <br> Leave blank if you want to use location. <br> **Example:** `1234567` <br> **Default value:** `false` <br><br> **Note:** When the `location` and `locationID` are both not set, the location will be based on the information provided by the calendar module. The first upcoming event with location data will be used.
|
||||
| `appid` | The [OpenWeatherMap](https://home.openweathermap.org) API key, which can be obtained by creating an OpenWeatherMap account. <br><br> This value is **REQUIRED**
|
||||
| `units` | What units to use. Specified by config.js <br><br> **Possible values:** `config.units` = Specified by config.js, `default` = Kelvin, `metric` = Celsius, `imperial` =Fahrenheit <br> **Default value:** `config.units`
|
||||
| `roundTemp` | Round temperature values to nearest integer. <br><br> **Possible values:** `true` (round to integer) or `false` (display exact value with decimal point) <br> **Default value:** `false`
|
||||
|
BIN
modules/default/weatherforecast/forecast_screenshot.png
Normal file
BIN
modules/default/weatherforecast/forecast_screenshot.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 84 KiB |
2208
package-lock.json
generated
2208
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@ -49,7 +49,7 @@
|
||||
"jshint": "^2.9.5",
|
||||
"mocha": "^4.1.0",
|
||||
"mocha-each": "^1.1.0",
|
||||
"spectron": "3.7.x",
|
||||
"spectron": "^3.8.0",
|
||||
"stylelint": "^8.4.0",
|
||||
"stylelint-config-standard": "latest",
|
||||
"time-grunt": "latest"
|
||||
@ -57,18 +57,18 @@
|
||||
"dependencies": {
|
||||
"body-parser": "^1.18.2",
|
||||
"colors": "^1.1.2",
|
||||
"electron": "^2.0.0",
|
||||
"electron": "^2.0.4",
|
||||
"express": "^4.16.2",
|
||||
"express-ipfilter": "0.3.1",
|
||||
"feedme": "latest",
|
||||
"helmet": "^3.9.0",
|
||||
"iconv-lite": "latest",
|
||||
"mocha-logger": "^1.0.5",
|
||||
"mocha-logger": "^1.0.6",
|
||||
"moment": "latest",
|
||||
"request": "^2.83.0",
|
||||
"request": "^2.87.0",
|
||||
"rrule-alt": "^2.2.8",
|
||||
"simple-git": "^1.85.0",
|
||||
"socket.io": "^2.0.4",
|
||||
"socket.io": "^2.1.1",
|
||||
"valid-url": "latest",
|
||||
"walk": "latest"
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
"UPDATE_NOTIFICATION": "Dostępna jest aktualizacja MagicMirror².",
|
||||
"UPDATE_NOTIFICATION_MODULE": "Dostępna jest aktualizacja modułu {MODULE_NAME}.",
|
||||
"UPDATE_INFO_SINGLE": "Zainstalowana wersja odbiega o {COMMIT_COUNT} commitów od gałęzi {BRANCH_NAME}.",
|
||||
"UPDATE_INFO_SINGLE": "Zainstalowana wersja odbiega o {COMMIT_COUNT} commit od gałęzi {BRANCH_NAME}.",
|
||||
"UPDATE_INFO_MULTIPLE": "Zainstalowana wersja odbiega o {COMMIT_COUNT} commitów od gałęzi {BRANCH_NAME}.",
|
||||
|
||||
"FEELS": "Odczuwalna"
|
||||
|
982
vendor/package-lock.json
generated
vendored
982
vendor/package-lock.json
generated
vendored
File diff suppressed because it is too large
Load Diff
1
vendor/package.json
vendored
1
vendor/package.json
vendored
@ -10,6 +10,7 @@
|
||||
"url": "https://github.com/MichMich/MagicMirror/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fortawesome/fontawesome-free": "^5.3.1",
|
||||
"font-awesome": "^4.7.0",
|
||||
"moment": "^2.17.1",
|
||||
"moment-timezone": "^0.5.11",
|
||||
|
2
vendor/vendor.js
vendored
2
vendor/vendor.js
vendored
@ -13,6 +13,8 @@ var vendor = {
|
||||
"weather-icons.css": "node_modules/weathericons/css/weather-icons.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-awesome5.css": "node_modules/@fortawesome/fontawesome-free/css/all.min.css",
|
||||
"font-awesome5.v4shims.css": "node_modules/@fortawesome/fontawesome-free/css/v4-shims.min.css",
|
||||
"nunjucks.js": "node_modules/nunjucks/browser/nunjucks.min.js"
|
||||
};
|
||||
|
||||
|
178
vendor/yarn.lock
vendored
178
vendor/yarn.lock
vendored
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user