Skip to content

Commit e68fea1

Browse files
authored
Merge branch 'develop' into feature/docker
2 parents a3eaf9f + ce6cd6a commit e68fea1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1006
-1197
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Temporary Items
5959

6060
# Ignore all modules except the default modules.
6161
/modules/**
62+
!/modules/default
6263
!/modules/default/**
6364
!/modules/README.md**
6465

Diff for: .travis.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,9 @@ node_js:
44
- "5.1"
55
before_script:
66
- npm install grunt-cli -g
7-
script: grunt
7+
script:
8+
- grunt
9+
- npm test
10+
cache:
11+
directories:
12+
- node_modules

Diff for: CHANGELOG.md

+44-2
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,52 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## [2.1.1] - 2017-01-31
5+
6+
## [2.1.1] - Unreleased
7+
8+
**Note:** This update uses new dependencies. Please update using the following command: `git pull && npm install`
9+
10+
### Changed
11+
- Installer: Use init config.js from config.js.sample.
12+
- Switched out `rrule` package for `rrule-alt` and fixes in `ical.js` in order to fix calendar issues. ([#565](https://github.com/MichMich/MagicMirror/issues/565))
13+
- Make mouse events pass through the region fullscreen_above to modules below.
14+
- Scaled the splash screen down to make it a bit more subtle.
15+
- Replace HTML tables with markdown tables in README files.
16+
- Added `DAYAFTERTOMORROW`, `UPDATE_NOTIFICATION` and `UPDATE_NOTIFICATION_MODULE` to Finnish translations.
17+
- Run `npm test` on Travis automatically
18+
- Show the splash screen image even when is reboot or halted.
19+
- Added some missing translaton strings in the sv.json file.
20+
- Run task jsonlint to check translation files.
621

722
### Added
823
- Added Docker support (Pull Request [#673](https://github.com/MichMich/MagicMirror/pull/673))
24+
- Calendar-specific support for `maximumEntries`, and ` maximumNumberOfDays`
25+
- Add loaded function to modules, providing an async callback.
26+
- Made default newsfeed module aware of gesture events from [MMM-Gestures](https://github.com/thobach/MMM-Gestures)
27+
- Add use pm2 for manager process into Installer RaspberryPi script
28+
- Russian Translation
29+
- Afrikaans Translation
30+
- Add postinstall script to notify user that MagicMirror installed successfully despite warnings from NPM.
31+
- Init tests using mocha.
32+
- Option to use RegExp in Calendar's titleReplace.
33+
- Hungarian Translation.
34+
- Icelandic Translation.
35+
- Add use a script to prevent when is run by SSH session set DISPLAY enviroment.
36+
- Enable ability to set configuration file by the enviroment variable called MM_CONFIG_FILE.
37+
- Option to give each calendar a different color
38+
- Option for colored min-temp and max-temp
39+
- Add test e2e helloworld
40+
- Add test e2e enviroment
41+
- Add `chai-as-promised` npm module to devDependencies
42+
43+
### Fixed
44+
- Update .gitignore to not ignore default modules folder.
45+
- Remove white flash on boot up.
46+
- Added `update` in Raspberry Pi installation script.
47+
- Fix an issue where the analog clock looked scrambled. ([#611](https://github.com/MichMich/MagicMirror/issues/611))
48+
- If units is set to imperial, the showRainAmount option of weatherforecast will show the correct unit.
49+
- Module currentWeather: check if temperature received from api is defined.
50+
- Fix an issue with module hidden status changing to `true` although lock string prevented showing it
951

1052
## [2.1.0] - 2016-12-31
1153

@@ -123,7 +165,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
123165

124166
### Fixed
125167
- Added reference to Italian Translation.
126-
- Added the missing NE translation to all languages. [#334](https://github.com/MichMich/MagicMirror/issues/344)
168+
- Added the missing NE translation to all languages. [#344](https://github.com/MichMich/MagicMirror/issues/344)
127169
- Added proper User-Agent string to calendar call.
128170

129171
### Changed

Diff for: Gruntfile.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ module.exports = function(grunt) {
77
configFile: ".eslintrc.json"
88
},
99
target: ["js/*.js", "modules/default/*.js", "modules/default/*/*.js",
10-
"serveronly/*.js", "*.js", "!modules/default/alert/notificationFx.js",
11-
"!modules/default/alert/modernizr.custom.js", "!modules/default/alert/classie.js"
10+
"serveronly/*.js", "*.js", "tests/*/*.js", "!modules/default/alert/notificationFx.js",
11+
"!modules/default/alert/modernizr.custom.js", "!modules/default/alert/classie.js",
12+
"config/*",
13+
"translations/translations.js"
14+
1215
]
1316
},
1417
stylelint: {
@@ -21,7 +24,7 @@ module.exports = function(grunt) {
2124
},
2225
jsonlint: {
2326
main: {
24-
src: ["package.json", ".eslintrc.json", ".stylelint"],
27+
src: ["package.json", ".eslintrc.json", ".stylelintrc", "translations/*.json", "modules/default/*/translations/*.json"],
2528
options: {
2629
reporter: "jshint"
2730
}

Diff for: LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The MIT License (MIT)
22
=====================
33

4-
Copyright © 2016 Michael Teeuw
4+
Copyright © 2016-2017 Michael Teeuw
55

66
Permission is hereby granted, free of charge, to any person
77
obtaining a copy of this software and associated documentation

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ MagicMirror² focuses on a modular plugin system and uses [Electron](http://elec
1919
- [Configuration](#configuration)
2020
- [Modules](#modules)
2121
- [Known Issues](#known-issues)
22-
- [community](#community)
22+
- [Community](#community)
2323
- [Contributing Guidelines](#contributing-guidelines)
2424

2525
## Usage
@@ -101,7 +101,7 @@ Type `git status` to see your changes, if there are any, you can reset them with
101101

102102
## Configuration
103103

104-
1. Duplicate `config/config.js.sample` to `config/config.js`.
104+
1. Duplicate `config/config.js.sample` to `config/config.js`. **Note:** If you used the installer script. This step is already done for you.
105105
2. Modify your required settings.
106106

107107
The following properties can be configured:
@@ -116,7 +116,7 @@ The following properties can be configured:
116116
| `timeFormat` | The form of time notation that will be used. Possible values are `12` or `24`. The default is `24`. |
117117
| `units` | The units that will be used in the default weather modules. Possible values are `metric` or `imperial`. The default is `metric`. |
118118
| `modules` | An array of active modules. **The array must contain objects. See the next table below for more information.** |
119-
| `electronOptions` | An optional array of Electron (browser) options. This allows configuration of e.g. the browser screen size and position (defaults `.width = 800` & `.height = 600`). Kiosk mode can be enabled by setting `.kiosk = true`, `.autoHideMenuBar = false`, `.fullscreen = false`. More options can be found [here](https://github.com/electron/electron/blob/master/docs/api/browser-window.md). |
119+
| `electronOptions` | An optional array of Electron (browser) options. This allows configuration of e.g. the browser screen size and position (example: `electronOptions: { fullscreen: false, width: 800, height: 600 }`). Kiosk mode can be enabled by setting `.kiosk = true`, `.autoHideMenuBar = false`, `.fullscreen = false`. More options can be found [here](https://github.com/electron/electron/blob/master/docs/api/browser-window.md). |
120120

121121

122122
Module configuration:

Diff for: config/config.js.sample

+26-26
Original file line numberDiff line numberDiff line change
@@ -8,61 +8,61 @@ var config = {
88
port: 8080,
99
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
1010

11-
language: 'en',
11+
language: "en",
1212
timeFormat: 24,
13-
units: 'metric',
13+
units: "metric",
1414

1515
modules: [
1616
{
17-
module: 'alert',
17+
module: "alert",
1818
},
1919
{
2020
module: "updatenotification",
2121
position: "top_bar"
2222
},
2323
{
24-
module: 'clock',
25-
position: 'top_left'
24+
module: "clock",
25+
position: "top_left"
2626
},
2727
{
28-
module: 'calendar',
29-
header: 'US Holidays',
30-
position: 'top_left',
28+
module: "calendar",
29+
header: "US Holidays",
30+
position: "top_left",
3131
config: {
3232
calendars: [
3333
{
34-
symbol: 'calendar-check-o ',
35-
url: 'webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics'
34+
symbol: "calendar-check-o ",
35+
url: "webcal://www.calendarlabs.com/templates/ical/US-Holidays.ics"
3636
}
3737
]
3838
}
3939
},
4040
{
41-
module: 'compliments',
42-
position: 'lower_third'
41+
module: "compliments",
42+
position: "lower_third"
4343
},
4444
{
45-
module: 'currentweather',
46-
position: 'top_right',
45+
module: "currentweather",
46+
position: "top_right",
4747
config: {
48-
location: 'New York',
49-
locationID: '', //ID from http://www.openweathermap.org
50-
appid: 'YOUR_OPENWEATHER_API_KEY'
48+
location: "New York",
49+
locationID: "", //ID from http://www.openweathermap.org
50+
appid: "YOUR_OPENWEATHER_API_KEY"
5151
}
5252
},
5353
{
54-
module: 'weatherforecast',
55-
position: 'top_right',
56-
header: 'Weather Forecast',
54+
module: "weatherforecast",
55+
position: "top_right",
56+
header: "Weather Forecast",
5757
config: {
58-
location: 'New York',
59-
locationID: '5128581', //ID from http://www.openweathermap.org
60-
appid: 'YOUR_OPENWEATHER_API_KEY'
58+
location: "New York",
59+
locationID: "5128581", //ID from http://www.openweathermap.org
60+
appid: "YOUR_OPENWEATHER_API_KEY"
6161
}
6262
},
6363
{
64-
module: 'newsfeed',
65-
position: 'bottom_bar',
64+
module: "newsfeed",
65+
position: "bottom_bar",
6666
config: {
6767
feeds: [
6868
{
@@ -79,4 +79,4 @@ var config = {
7979
};
8080

8181
/*************** DO NOT EDIT THE LINE BELOW ***************/
82-
if (typeof module !== 'undefined') {module.exports = config;}
82+
if (typeof module !== "undefined") {module.exports = config;}

Diff for: css/main.css

+5
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,11 @@ sup {
135135
left: -60px;
136136
right: -60px;
137137
bottom: -60px;
138+
pointer-events: none;
139+
}
140+
141+
.region.fullscreen * {
142+
pointer-events: auto;
138143
}
139144

140145
.region.right {

Diff for: index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<div class="region fullscreen above"><div class="container"></div></div>
3434
<script type="text/javascript" src="/socket.io/socket.io.js"></script>
3535
<script type="text/javascript" src="js/defaults.js"></script>
36-
<script type="text/javascript" src="config/config.js"></script>
36+
<script type="text/javascript" src="#CONFIG_FILE#"></script>
3737
<script type="text/javascript" src="vendor/vendor.js"></script>
3838
<script type="text/javascript" src="modules/default/defaultmodules.js"></script>
3939
<script type="text/javascript" src="js/logger.js"></script>

Diff for: installers/mm.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cd ~/MagicMirror
2+
DISPLAY=:0 npm start

Diff for: installers/pm2_MagicMirror.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
apps : [{
3+
name : "MagicMirror",
4+
script : "/home/pi/MagicMirror/installers/mm.sh",
5+
watch : ["/home/pi/MagicMirror/config/config.js"]
6+
}]
7+
}

Diff for: installers/postinstall/postinstall.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
echo "\033[32mMagicMirror installation successful!"
2+
exit 0

Diff for: installers/raspberry.sh

+17
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ fi
3636
function version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
3737
function command_exists () { type "$1" &> /dev/null ;}
3838

39+
# Update before first apt-get
40+
echo -e "\e[96mUpdating packages ...\e[90m"
41+
sudo apt-get update || echo -e "\e[91mUpdate failed, carrying on installation ...\e[90m"
42+
3943
# Installing helper tools
4044
echo -e "\e[96mInstalling helper tools ...\e[90m"
4145
sudo apt-get install curl wget git build-essential unzip || exit
@@ -113,6 +117,9 @@ else
113117
exit;
114118
fi
115119

120+
# Use sample config for start MagicMirror
121+
cp config/config.js.sample config/config.js
122+
116123
# Check if plymouth is installed (default with PIXEL desktop environment), then install custom splashscreen.
117124
echo -e "\e[96mCheck plymouth installation ...\e[0m"
118125
if command_exists plymouth; then
@@ -141,6 +148,16 @@ else
141148
echo -e "\e[93mplymouth is not installed.\e[0m";
142149
fi
143150

151+
# Use pm2 control like a service MagicMirror
152+
read -p "Do you want use pm2 for auto starting of your MagicMirror (y/n)?" choice
153+
if [[ $choice =~ ^[Yy]$ ]]
154+
then
155+
sudo npm install -g pm2
156+
sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi"
157+
pm2 start ~/MagicMirror/installers/pm2_MagicMirror.json
158+
pm2 save
159+
fi
160+
144161
echo " "
145162
echo -e "\e[92mWe're ready! Run \e[1m\e[97mDISPLAY=:0 npm start\e[0m\e[92m from the ~/MagicMirror directory to start your MagicMirror.\e[0m"
146163
echo " "

0 commit comments

Comments
 (0)