mirror of
https://github.com/edward-shen/MMM-pages.git
synced 2024-11-24 11:14:29 -08:00
Update readme.md
fixed spelling of module name
This commit is contained in:
parent
e422d02147
commit
7893277e2c
1 changed files with 17 additions and 17 deletions
34
readme.md
34
readme.md
|
@ -19,7 +19,7 @@ you're interested, please don't hesitate to reach out.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# MMM-Pages
|
# MMM-pages
|
||||||
|
|
||||||
This [MagicMirror²][mm] Module allows you to have pages in your MagicMirror!
|
This [MagicMirror²][mm] Module allows you to have pages in your MagicMirror!
|
||||||
Want to have more modules in your MagicMirror, but want to keep the format?
|
Want to have more modules in your MagicMirror, but want to keep the format?
|
||||||
|
@ -66,7 +66,7 @@ on different pages. (like your calendar on page 1, and someone elses on page 2)
|
||||||
```js
|
```js
|
||||||
modules: [
|
modules: [
|
||||||
{
|
{
|
||||||
module: 'MMM-Pages',
|
module: 'MMM-pages',
|
||||||
config: {
|
config: {
|
||||||
modules:
|
modules:
|
||||||
[[ "newsfeed" ],
|
[[ "newsfeed" ],
|
||||||
|
@ -81,12 +81,12 @@ modules: [
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|
||||||
and alternative approach, is to define a fixed MMM-Pages config
|
and alternative approach, is to define a fixed MMM-pages config
|
||||||
|
|
||||||
```js
|
```js
|
||||||
modules: [
|
modules: [
|
||||||
{
|
{
|
||||||
module: 'MMM-Pages',
|
module: 'MMM-pages',
|
||||||
config: {
|
config: {
|
||||||
modules:
|
modules:
|
||||||
[[ "page1" ],
|
[[ "page1" ],
|
||||||
|
@ -167,21 +167,21 @@ The following is the list of notifications that MMM-Pages will handle:
|
||||||
|
|
||||||
| Notification | Payload type | Description |
|
| Notification | Payload type | Description |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `PAGE_CHANGED` | `int` | MMM-Pages will switch to the provided page index. |
|
| `PAGE_CHANGED` | `int` | MMM-pages will switch to the provided page index. |
|
||||||
| `PAGE_INCREMENT` | `int`, Optional | MMM-Pages will increment the page, or by `n` times if a number is provided. Not providing a number is equivalent to sending a payload of `1`. If there are no more pages to increment by, this will loop around to the first page. |
|
| `PAGE_INCREMENT` | `int`, Optional | MMM-pages will increment the page, or by `n` times if a number is provided. Not providing a number is equivalent to sending a payload of `1`. If there are no more pages to increment by, this will loop around to the first page. |
|
||||||
| `PAGE_DECREMENT` | `int`, Optional | MMM-Pages will decrement the page, or by `n` times if a number is provided. Not providing a number is equivalent to sending a payload of `1`. If there are no more pages to decrement by, this will loop around to the last page. |
|
| `PAGE_DECREMENT` | `int`, Optional | MMM-pages will decrement the page, or by `n` times if a number is provided. Not providing a number is equivalent to sending a payload of `1`. If there are no more pages to decrement by, this will loop around to the last page. |
|
||||||
| `QUERY_PAGE_NUMBER` | *None* | MMM-Pages will respond with `PAGE_NUMBER_IS` with the current page index. |
|
| `QUERY_PAGE_NUMBER` | *None* | MMM-pages will respond with `PAGE_NUMBER_IS` with the current page index. |
|
||||||
| `PAUSE_ROTATION` | *None* | If MMM-Pages is set to rotate, this will pause rotation until a `RESUME_ROTATION` notification is sent. This does nothing if rotation was already paused. |
|
| `PAUSE_ROTATION` | *None* | If MMM-pages is set to rotate, this will pause rotation until a `RESUME_ROTATION` notification is sent. This does nothing if rotation was already paused. |
|
||||||
| `RESUME_ROTATION` | *None* | If MMM-Pages was requested to pause rotation, this will resume automatic rotation. This does nothing MMM-Pages was not requested to pause. |
|
| `RESUME_ROTATION` | *None* | If MMM-pages was requested to pause rotation, this will resume automatic rotation. This does nothing MMM-Pages was not requested to pause. |
|
||||||
| `HOME_PAGE` | *None* | Return to the home page. If no home page is provided, return to the first page instead. |
|
| `HOME_PAGE` | *None* | Return to the home page. If no home page is provided, return to the first page instead. |
|
||||||
| `SHOW_HIDDEN_PAGE` | `String` | MMM-Pages will switch to the provided hidden page name. |
|
| `SHOW_HIDDEN_PAGE` | `String` | MMM-pages will switch to the provided hidden page name. |
|
||||||
| `LEAVE_HIDDEN_PAGE` | *None* | MMM-Pages will leave the currently showing hidden page and return to the previous showing page index. |
|
| `LEAVE_HIDDEN_PAGE` | *None* | MMM-pages will leave the currently showing hidden page and return to the previous showing page index. |
|
||||||
|
|
||||||
The following is the list of notifications that MMM-Pages sends out:
|
The following is the list of notifications that MMM-pages sends out:
|
||||||
|
|
||||||
| Notification | Payload type | Description |
|
| Notification | Payload type | Description |
|
||||||
| ------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `MAX_PAGES_CHANGED` | `int` | This is sent only once during initialization of MMM-Pages. This contains the number of pages defined in `config.js`. |
|
| `MAX_PAGES_CHANGED` | `int` | This is sent only once during initialization of MMM-pages. This contains the number of pages defined in `config.js`. |
|
||||||
| `NEW_PAGE` | `int` | This notification is sent out on every page change and contains the current page index. This is to help other modules keep track of what the current page is. This is also sent out during initialization. |
|
| `NEW_PAGE` | `int` | This notification is sent out on every page change and contains the current page index. This is to help other modules keep track of what the current page is. This is also sent out during initialization. |
|
||||||
| `PAGE_NUMBER_IS` | `int` | Sent in response to a `QUERY_PAGE_NUMBER` notification. Returns the current page index. This notification sends the same payload as `NEW_PAGE`. |
|
| `PAGE_NUMBER_IS` | `int` | Sent in response to a `QUERY_PAGE_NUMBER` notification. Returns the current page index. This notification sends the same payload as `NEW_PAGE`. |
|
||||||
|
|
||||||
|
@ -205,14 +205,14 @@ config in the config file. There is no way to dynamically change the pages you
|
||||||
have. If there arises a need, please create an issue.
|
have. If there arises a need, please create an issue.
|
||||||
|
|
||||||
This module does not enforce how other modules represents or even responds to
|
This module does not enforce how other modules represents or even responds to
|
||||||
MMM-Pages notifications.
|
MMM-pages notifications.
|
||||||
|
|
||||||
### Initialization
|
### Initialization
|
||||||
|
|
||||||
_This section provides documentation on what notifications the module sends on
|
_This section provides documentation on what notifications the module sends on
|
||||||
startup. This section isn't necessary to read for most users._
|
startup. This section isn't necessary to read for most users._
|
||||||
|
|
||||||
MMM-Pages doesn't activate until we receive the `DOM_OBJECTS_CREATED`
|
MMM-pages doesn't activate until we receive the `DOM_OBJECTS_CREATED`
|
||||||
notification, as that notification ensures all modules have been loaded. On this
|
notification, as that notification ensures all modules have been loaded. On this
|
||||||
notification, we send two notifications out, `MAX_PAGES_CHANGED` and `NEW_PAGE`,
|
notification, we send two notifications out, `MAX_PAGES_CHANGED` and `NEW_PAGE`,
|
||||||
so other modules that would like to keep synchronized of the starting page and
|
so other modules that would like to keep synchronized of the starting page and
|
||||||
|
@ -233,7 +233,7 @@ See also FAQ below.
|
||||||
|
|
||||||
- How do I interact with different pages?
|
- How do I interact with different pages?
|
||||||
|
|
||||||
MMM-Pages intentionally does not provide methods to interact with the pages.
|
MMM-pages intentionally does not provide methods to interact with the pages.
|
||||||
This is intentional by design, as there are too many ways to interact with a
|
This is intentional by design, as there are too many ways to interact with a
|
||||||
MagicMirror. [MMM-page-indicator][page indicator] does provide a way to click
|
MagicMirror. [MMM-page-indicator][page indicator] does provide a way to click
|
||||||
on the circles to change pages, but this requires the ability to click or tap
|
on the circles to change pages, but this requires the ability to click or tap
|
||||||
|
|
Loading…
Reference in a new issue