Skip to content

Commit

Permalink
Merge pull request #931 from MichMich/develop
Browse files Browse the repository at this point in the history
Release 2.1.2
  • Loading branch information
MichMich authored Jul 1, 2017
2 parents 5c41e24 + ce98d01 commit 8a101f9
Show file tree
Hide file tree
Showing 55 changed files with 1,142 additions and 263 deletions.
72 changes: 0 additions & 72 deletions .dockerignore

This file was deleted.

10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,13 @@ Temporary Items

# Ignore changes to the custom css files.
/css/custom.css

# Vim
## swap
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]

## diff patch
*.orig
*.rej
*.bak
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ before_script:
- sleep 5
script:
- grunt
- npm test
- npm run test:unit
cache:
directories:
- node_modules
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,44 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [2.1.2] - 2017-07-01

### Changed
- Revert Docker related changes in favor of [docker-MagicMirror](https://github.com/bastilimbach/docker-MagicMirror). All Docker images are outsourced. ([#856](https://github.com/MichMich/MagicMirror/pull/856))
- Change Docker base image (Debian + Node) to an arm based distro (AlpineARM + Node) ([#846](https://github.com/MichMich/MagicMirror/pull/846))
- Fix the dockerfile to have it running from the first time.

### Added
- Add in option to wrap long calendar events to multiple lines using `wrapEvents` configuration option.
- Add test e2e `show title newsfeed` for newsfeed module.
- Add task to check configuration file.
- Add test check URLs of vendors.
- Add test of match current week number on clock module with showWeek configuration.
- Add test default modules present modules/default/defaultmodules.js.
- Add unit test calendar_modules function capFirst.
- Add test for check if exists the directories present in defaults modules.
- Add support for showing wind direction as an arrow instead of abbreviation in currentWeather module.
- Add support for writing translation fucntions to support flexible word order
- Add test for check if exits the directories present in defaults modules.
- Add calendar option to set a separate date format for full day events.
- Add ability for `currentweather` module to display indoor temperature via INDOOR_TEMPERATURE notification
- Add ability to change the path of the `custom.css`.
- Add translation Dutch to Alert module.
- Added Romanian translation.

### Updated
- Added missing keys to Polish translation.
- Added missing key to German translation.
- Added better translation with flexible word order to Finnish translation

### Fixed
- Fix instruction in README for using automatically installer script.
- Bug of duplicated compliments as described in [here](https://forum.magicmirror.builders/topic/2381/compliments-module-stops-cycling-compliments).
- Fix double message about port when server is starting
- Corrected Swedish translations for TODAY/TOMORROW/DAYAFTERTOMORROW.
- Removed unused import from js/electron.js
- Made calendar.js respect config.timeFormat irrespecive of locale setting
- Fixed alignment of analog clock when a large calendar is displayed in the same side bar

## [2.1.1] - 2017-04-01

Expand Down
19 changes: 0 additions & 19 deletions Dockerfile

This file was deleted.

51 changes: 40 additions & 11 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,47 @@ module.exports = function(grunt) {
options: {
configFile: ".eslintrc.json"
},
target: ["js/*.js", "modules/default/*.js", "modules/default/*/*.js",
"serveronly/*.js", "*.js", "tests/*/*.js", "!modules/default/alert/notificationFx.js",
"!modules/default/alert/modernizr.custom.js", "!modules/default/alert/classie.js",
target: [
"js/*.js",
"modules/default/*.js",
"modules/default/*/*.js",
"serveronly/*.js",
"*.js",
"tests/**/*.js",
"!modules/default/alert/notificationFx.js",
"!modules/default/alert/modernizr.custom.js",
"!modules/default/alert/classie.js",
"config/*",
"translations/translations.js", "vendor/vendor.js"

"translations/translations.js",
"vendor/vendor.js",
"modules/node_modules/node_helper/index.js"
]
},
stylelint: {
simple: {
options: {
configFile: ".stylelintrc"
},
src: ["css/main.css", "modules/default/calendar/calendar.css", "modules/default/clock/clock_styles.css", "modules/default/currentweather/currentweather.css", "modules/default/weatherforcast/weatherforcast.css"]
src: [
"css/main.css",
"modules/default/calendar/calendar.css",
"modules/default/clock/clock_styles.css",
"modules/default/currentweather/currentweather.css",
"modules/default/weatherforcast/weatherforcast.css"
]
}
},
jsonlint: {
main: {
src: ["package.json", ".eslintrc.json", ".stylelintrc", "translations/*.json",
"modules/default/*/translations/*.json", "installers/pm2_MagicMirror.json",
"vendor/package.js"],
src: [
"package.json",
".eslintrc.json",
".stylelintrc",
"translations/*.json",
"modules/default/*/translations/*.json",
"installers/pm2_MagicMirror.json",
"vendor/package.js"
],
options: {
reporter: "jshint"
}
Expand Down Expand Up @@ -58,11 +78,20 @@ module.exports = function(grunt) {
"MD038": false
}
},
src: ["README.md", "CHANGELOG.md", "LICENSE.md", "modules/README.md", "modules/default/**/*.md", "!modules/default/calendar/vendor/ical.js/readme.md"]
src: [
"README.md",
"CHANGELOG.md",
"LICENSE.md",
"modules/README.md",
"modules/default/**/*.md",
"!modules/default/calendar/vendor/ical.js/readme.md"
]
}
},
yamllint: {
all: [".travis.yml"]
all: [
".travis.yml"
]
}
});
grunt.loadNpmTasks("grunt-eslint");
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ docker run -d \
--volume ~/magic_mirror/config:/opt/magic_mirror/config \
--volume ~/magic_mirror/modules:/opt/magic_mirror/modules \
--name magic_mirror \
MichMich/MagicMirror
bastilimbach/docker-magicmirror
```

| **Volumes** | **Description** |
Expand All @@ -75,6 +75,8 @@ var config = {
};
```

If you want to run the server on a raspberry pi, use the `raspberry` tag. (bastilimbach/docker-magicmirror:raspberry)

#### Manual

1. Download and install the latest Node.js version.
Expand Down Expand Up @@ -104,6 +106,11 @@ Type `git status` to see your changes, if there are any, you can reset them with
1. Duplicate `config/config.js.sample` to `config/config.js`. **Note:** If you used the installer script. This step is already done for you.
2. Modify your required settings.

Note: You'll can check your configuration running the follow command:
```bash
npm run config:check
```

The following properties can be configured:

| **Option** | **Description** |
Expand All @@ -117,7 +124,7 @@ The following properties can be configured:
| `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.** |
| `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` and `fullscreen = false`. More options can be found [here](https://github.com/electron/electron/blob/master/docs/api/browser-window.md). |

| `customCss` | The path of the `custom.css` stylesheet. The default is `css/custom.css`. |

Module configuration:

Expand Down
10 changes: 9 additions & 1 deletion config/config.js.sample
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@
*
* By Michael Teeuw http://michaelteeuw.nl
* MIT Licensed.
*
* For more information how you can configurate this file
* See https://github.com/MichMich/MagicMirror#configuration
*
*/

var config = {
port: 8080,
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 :
// ["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 :
// ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"],

language: "en",
timeFormat: 24,
Expand Down
11 changes: 0 additions & 11 deletions docker-entrypoint.sh

This file was deleted.

5 changes: 2 additions & 3 deletions installers/raspberry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ if command_exists node; then
fi

else
echo -e "\e[92mNo Node.js upgrade nessecery.\e[0m"
echo -e "\e[92mNo Node.js upgrade necessary.\e[0m"
fi

else
Expand Down Expand Up @@ -150,8 +150,7 @@ fi

# Use pm2 control like a service MagicMirror
read -p "Do you want use pm2 for auto starting of your MagicMirror (y/n)?" choice
if [[ $choice =~ ^[Yy]$ ]]
then
if [[ $choice =~ ^[Yy]$ ]]; then
sudo npm install -g pm2
sudo su -c "env PATH=$PATH:/usr/bin pm2 startup linux -u pi --hp /home/pi"
pm2 start ~/MagicMirror/installers/pm2_MagicMirror.json
Expand Down
1 change: 1 addition & 0 deletions js/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ var defaults = {
timeFormat: 24,
units: "metric",
zoom: 1,
customCss: "css/custom.css",

modules: [
{
Expand Down
5 changes: 2 additions & 3 deletions js/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

"use strict";

const Server = require(__dirname + "/server.js");
const electron = require("electron");
const core = require(__dirname + "/app.js");

Expand Down Expand Up @@ -30,7 +29,7 @@ function createWindow() {
zoomFactor: config.zoom
},
backgroundColor: "#000000"
}
};

// DEPRECATED: "kioskmode" backwards compatibility, to be removed
// settings these options directly instead provides cleaner interface
Expand All @@ -51,7 +50,7 @@ function createWindow() {
mainWindow.loadURL("http://localhost:" + config.port);

// Open the DevTools if run with "npm start dev"
if(process.argv[2] == "dev") {
if (process.argv.includes("dev")) {
mainWindow.webContents.openDevTools();
}

Expand Down
6 changes: 3 additions & 3 deletions js/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ var Loader = (function() {
});
} else {
// All modules loaded. Load custom.css
// This is done after all the moduels so we can
// overwrite all the defined styls.
// This is done after all the modules so we can
// overwrite all the defined styles.

loadFile("css/custom.css", function() {
loadFile(config.customCss, function() {
// custom.css loaded. Start all modules.
startModules();
});
Expand Down
4 changes: 1 addition & 3 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ var MM = (function() {
if( headerWrapper.length > 0 && newHeader) {
headerWrapper[0].innerHTML = newHeader;
}


};

/* hideModule(module, speed, callback)
Expand Down Expand Up @@ -219,7 +217,7 @@ var MM = (function() {

// remove lockString if set in options.
if (options.lockString) {
var index = module.lockStrings.indexOf(options.lockString)
var index = module.lockStrings.indexOf(options.lockString);
if ( index !== -1) {
module.lockStrings.splice(index, 1);
}
Expand Down
Loading

0 comments on commit 8a101f9

Please sign in to comment.