Skip to content

Commit

Permalink
Merge pull request #98 from KristjanESPERANTO/main
Browse files Browse the repository at this point in the history
Release 0.4.1
  • Loading branch information
KristjanESPERANTO authored Nov 4, 2024
2 parents 457792b + a28fbf0 commit f6e9fc0
Show file tree
Hide file tree
Showing 9 changed files with 1,859 additions and 680 deletions.
14 changes: 7 additions & 7 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
18 changes: 14 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## <a name="0_4_1"></a>[0.4.1] - Maintenance update

- Add spell check
- Add Contributing section to README
- Fix typos
- Switch to stylelint flat config
- Update devDependencies
- Update LICENSE file

## <a name="0_4_0"></a>[0.4.0]

- Add fade-out effect (by new option `slideFadeOutSpeed`) to slides #96. Thanks to @dennisklad!
Expand Down Expand Up @@ -39,13 +48,13 @@
## <a name="0_2_5"></a>[0.2.5] ― Added direct controls via Notification

- Added control from Module Notification (See [README](README.md#Navigation-from-other-modules)).
- Removed unneccessary and unused tests and Grunt file.
- Removed unnecessary and unused tests and Grunt file.

## <a name="0_2_4"></a>[0.2.4] ― Module Fix for bug in MichMich/MagicMirror#1140

- Uses 'MODULE_DOM_CREATED' notification instead of 'DOM_OBJECTS_CREATED'

## <a name="0_2_4"></a>[0.2.4] ― Added slideTranistionSpeed Parameter per #4
## <a name="0_2_4"></a>[0.2.4] ― Added slideTransitionSpeed Parameter per #4

- Added a parameter for slide transition speed. Default is 1500ms.

Expand All @@ -55,13 +64,13 @@

## <a name="0_2_2"></a>[0.2.2] ― Added support for MMM-KeyBindings Instances

- Added support for using MMM-KeyBindings control with multiple instances of the MagicMirror² open. For example, you can use a remote on the screen attached to the Raspberry Pi (SERVER) and use a keyboard on another computer with the mirror running in a browswer (LOCAL) to independently change slides on the respective screens.
- Added support for using MMM-KeyBindings control with multiple instances of the MagicMirror² open. For example, you can use a remote on the screen attached to the Raspberry Pi (SERVER) and use a keyboard on another computer with the mirror running in a browser (LOCAL) to independently change slides on the respective screens.

## <a name="0_2_1"></a>[0.2.1] ― Multiple instances of a module

Changes:

- Added the ability to handle mutiple instances of a module. To use, add a `carouselId: "uniqueString"` to each modules' `config` section:
- Added the ability to handle multiple instances of a module. To use, add a `carouselId: "uniqueString"` to each modules' `config` section:

```javascript
{
Expand Down Expand Up @@ -106,6 +115,7 @@ Changes:
'MMM-WunderGround',
'newsfeed'
]
]
```

- Made use of `zoom` classes introduced in [0.1.1]: using the method above, supported zooms are 070%, 080%, 090%, 125%, 150%, 175%, and 200%. Pass `classes:''` for 100%.
Expand Down
5 changes: 3 additions & 2 deletions LICENSE → LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
MIT License
# The MIT License (MIT)

Copyright (c) 2016 Barnaby Colby
Copyright © 2016 Barnaby Colby
Copyright © 2017 shbatm

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions MMM-Carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ Module.register("MMM-Carousel", {
) {
/*
* If the slide definition has an object, and it's name matches the module continue
* check if carouselId is set (mutiple module instances) and this is not the one we should show
* check if carouselId is set (multiple module instances) and this is not the one we should show
*/
if (
typeof mods[s].carouselId !== "undefined" &&
Expand Down Expand Up @@ -560,10 +560,10 @@ Module.register("MMM-Carousel", {

/*
* getDom()
* This method generates the dom which needs to be displayed. This method is called by the MagicMirror² core.
* This method generates the DOM which needs to be displayed. This method is called by the MagicMirror² core.
* This method needs to be subclassed if the module wants to display info on the mirror.
*
* return domobject - The dom to display.
* return DOM object - The DOM to display.
*/
getDom () {
const self = this;
Expand Down
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ The following properties can be configured:
| `slideFadeOutSpeed` | The speed in milliseconds to fade out each module.<br><br>This value is **OPTIONAL**<br>Possible values: Any valid int<br>Default value: 1000 (ms) |
| `ignoreModules` | A list of module names whom should not be considered as part of the carousel. For example, the `alert` module should be able to display a notification at any time, by ignoring it we can prevent the plugin from hiding any notifications. NOTE: is only used in `global` and `slides` modes. Ignored modules in `slides` mode are shown on every slide.<br>This value is **OPTIONAL**<br>Possible values: String array<br>Default value: `[]` |
| `top_bar`<br>`top_left`<br>`top_center`<br>`top_right`<br>`upper_third`<br>`middle_center`<br>`lower_third`<br>`bottom_left`<br>`bottom_center`<br>`bottom_right`<br>`bottom_bar` | Determines if this position should be rotated and which modules in this position should be ignored. NOTE: is only used when mode is '`positional`' otherwise ignored.<br><br>This value is OPTIONAL<br>Possible values: `Object` with keys:<br>&nbsp;&nbsp;&nbsp;&nbsp;`enabled`, a `boolean` to rotate this position or not,<br>&nbsp;&nbsp;&nbsp;&nbsp;`ignoreModules`, a String array of modules names to ignore.<br>&nbsp;&nbsp;&nbsp;&nbsp;`overrideTransitionInterval`, a int a transition time for this position only.<br>Default value:<br>&nbsp;&nbsp;&nbsp;&nbsp;`{enabled: false, ignoreModules: [], overrideTransitionInterval: 10000}` |
| `slides` | See Examples below. The slides will be rotated as a complete set using the `transitionInterval` setting. Ingnored modules (ignoreModules) will be diplayed on all slides.<br><br>This value is **OPTIONAL**<br>Possible values: array of String/Object array (see below)<br>Default value: `[[]]` |
| `slides` | See Examples below. The slides will be rotated as a complete set using the `transitionInterval` setting. Ignored modules (ignoreModules) will be displayed on all slides.<br><br>This value is **OPTIONAL**<br>Possible values: array of String/Object array (see below)<br>Default value: `[[]]` |
| `showPageIndicators` | A `boolean` true or false to show or hide the page indication 'bubbles' at the bottom of the screen. Default is `true`. |
| `showPageControls` | A `boolean` true or false to show or hide the next and previous page buttons. Buttons will only appear when hovered near or over. They can be clicked when not visible. Default is `true`. |
| `keyBindings` | Key bindings to use for navigation with MMM-KeyBindings module. The values are the KeyNames to respond to from the `"KEYPRESS"` events generated in MMM-KeyBindings.<br><br>This value is **OPTIONAL**<br>Default value:<br><pre>keyBindings: {<br> enabled: true,<br> mode: "DEFAULT",<br> map: {<br>NextSlide:"ArrowRight",<br>PrevSlide:"ArrowLeft",<br>Pause: "ArrowDown",<br>Slide0:"Home"<br> }<br>}</pre><br>Note: any `Slide##` can be assigned to jump to a specific slide. |
| `keyBindings.mode` | Mode Keyword for responding to key press events sent from MMM-KeyBindings. Default: `"DEFAULT"` which repsonds to any key press when no other module has taken focus or changed the keyword. |
| `keyBindings.mode` | Mode Keyword for responding to key press events sent from MMM-KeyBindings. Default: `"DEFAULT"` which responds to any key press when no other module has taken focus or changed the keyword. |

#### Example ― Global Carousel

Expand Down Expand Up @@ -217,9 +217,9 @@ You can navigate to different slides or transition points manually from other mo
| :-----------------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `CAROUSEL_NEXT` | Move to the next transition or slide. |
| `CAROUSEL_PREVIOUS` | Move back to the previous transition or slide. |
| `CAROUSEL_GOTO` | Move to a given slide/tranistion index.<br>Pass a string or integer in the payload to go to a slide (e.g. `this.sendNotification("CAROUSEL_GOTO", "1")` will jump to the first slide). If you use named slides, you can also pass the slide name in an object (`this.sendNotification("CAROUSEL_GOTO", { slide: "Home" })`). |
| `CAROUSEL_GOTO` | Move to a given slide/transition index.<br>Pass a string or integer in the payload to go to a slide (e.g. `this.sendNotification("CAROUSEL_GOTO", "1")` will jump to the first slide). If you use named slides, you can also pass the slide name in an object (`this.sendNotification("CAROUSEL_GOTO", { slide: "Home" })`). |
### This module is compatable with MMM-Remote-Control's API (v2 or above)
### This module is compatible with MMM-Remote-Control's API (v2 or above)
- To see available actions, navigate to `http://magicmirrorip:8080/api/module/carousel`. You can then call the actions using curl or any other web browser/navigator:
Expand Down Expand Up @@ -295,3 +295,17 @@ let recipe = {
exports.recipe = recipe; // Don't remove this line.
```
## Contributing
If you find any problems, bugs or have questions, please [open a GitHub issue](https://github.com/shbatm/MMM-Carousel/issues) in this repository.
Pull requests are of course also very welcome 🙂
### Developer commands
- `npm install` - Install dependencies like ESLint and prettier.
- `npm run lint` - Run linting and formatter checks.
- `npm run lint:fix` - Fix linting and formatter issues.
- `npm run test` - Run linting and formatter checks + Run spelling check.
- `npm run test:spelling` - Run spelling check.
26 changes: 26 additions & 0 deletions cspell.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"version": "0.2",
"language": "en",
"words": [
"Agiles",
"barnabycolby",
"btastic",
"Chroms",
"currentweather",
"dennisklad",
"fitbit",
"Kristjan",
"mmmc",
"newsfeed",
"Pagger",
"planetrise",
"PLAYPAUSE",
"RTSP",
"screencast",
"shbatm",
"weatherforecast",
"Wunder"
],
"ignorePaths": ["node_modules/**", "translations/**"],
"dictionaries": ["node"]
}
Loading

0 comments on commit f6e9fc0

Please sign in to comment.