Skip to content

Commit

Permalink
Merge pull request #215 from MagicMirrorOrg/develop
Browse files Browse the repository at this point in the history
Release v2.26
  • Loading branch information
MichMich authored Jan 1, 2024
2 parents 6024b4d + 189db84 commit 1f9ba7c
Show file tree
Hide file tree
Showing 24 changed files with 129 additions and 116 deletions.
4 changes: 2 additions & 2 deletions configuration/autostart.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Autostart your MagicMirror²

The methods below describe ways to automatically start your MagicMirror² on boot,
and even ways to keep it running in case of a failure.
The methods below describe ways to automatically start your MagicMirror² on
boot, and even ways to keep it running in case of a failure.

## Using PM2

Expand Down
34 changes: 18 additions & 16 deletions development/core-module-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,10 @@ When this module is called, it has 2 arguments:
- `payload` - AnyType - The payload of a notification.

**Note 1:** When a node helper sends a notification, all modules of that module
type receive the same notifications.<br>
**Note 2:** The socket connection is
established as soon as the module sends its first message using
type receive the same notifications.

**Note 2:** The socket connection is established as soon as the module sends its
first message using
[sendSocketNotification](#this-sendsocketnotification-notification-payload).

**Example:**
Expand Down Expand Up @@ -316,8 +317,7 @@ module.
### `this.file(filename)`

**_filename_ String** - The name of the file you want to create the path
for.<br>
**Returns String**
for.<br> **Returns String**

If you want to create a path to a file in your module folder, use the `file()`
method. It returns the path to the filename given as the attribute. Is method
Expand Down Expand Up @@ -345,22 +345,24 @@ start: function() {
...
```

**_options_ Object** - (_Introduced in version: 2.25.0._) Optional. Allows you to determine the animation speed and animation type options, whenever your module needs to be updated
**_options_ Object** - (_Introduced in version: 2.25.0._) Optional. Allows you
to determine the animation speed and animation type options, whenever your
module needs to be updated

| options | type | description |
| ------- | ---- | ----------- |
| speed | Number | animation speed in ms |
| options | type | description |
| ------- | ------ | ------------------------------------ |
| speed | Number | animation speed in ms |
| animate | Object | animate IN and OUT rules (see below) |


**animate Object**

| animate | type | description |
| ------- | ---- |---------------------------------------------------------------------------------------------------------------------------------------------------------|
| animate | type | description |
| ------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| in | String | Animate name when module will be shown (after dom update), it will use an `animateIn` type name (see [Animation Guide](/modules/animate#animatein)) |
| out | String | Animate name when module will be hidden (before dom update), it will use an `animateOut` type name (see [Animation Guide](/modules/animate#animateout)) |

As an example:

```javascript
...
this.updateDom( {
Expand All @@ -377,8 +379,8 @@ As an example:

### `this.sendNotification(notification, payload)`

**_notification_ String** - The notification identifier.<br>
**_payload_ AnyType** - Optional. A notification payload.
- `notification` - String - The notification identifier.
- `payload` - AnyType - (Optional) A notification payload.

If you want to send a notification to all other modules, use the
`sendNotification(notification, payload)`. All other modules will receive the
Expand All @@ -395,8 +397,8 @@ this.sendNotification("MYMODULE_READY_FOR_ACTION", { foo: bar });

### `this.sendSocketNotification(notification, payload)`

**_notification_ String** - The notification identifier.<br>
**_payload_ AnyType** - Optional. A notification payload.
- `notification` - String - The notification identifier.
- `payload` - AnyType - (Optional) A notification payload.

If you want to send a notification to the node_helper, use the
`sendSocketNotification(notification, payload)`. Only the node_helper of this
Expand Down
4 changes: 3 additions & 1 deletion development/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ Surely this also help you get better recognition and feedback for your work.

## Module name

We recommend the following pattern: `MMM-MyNewCoolModule`. But it is not mandatory - your module will also work with other name patterns (as long as no other module has the same name).
We recommend the following pattern: `MMM-MyNewCoolModule`. But it is not
mandatory - your module will also work with other name patterns (as long as no
other module has the same name).

## Module structure

Expand Down
8 changes: 4 additions & 4 deletions development/node-helper.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,12 @@ module.

### `this.sendSocketNotification(notification, payload)`

**_notification_ String** - The notification identifier.<br>
**_payload_ AnyType** - Optional. A notification payload.
- `notification` - String - The notification identifier.
- `payload` - AnyType - (Optional) The payload of a notification.

If you want to send a notification to your module, use the
`sendSocketNotification(notification, payload)`.<br>
Only the module of your module type will receive the socket notification.
`sendSocketNotification(notification, payload)`. Only the module of your module
type will receive the socket notification.

**Note:** Since all instances of your module will receive the notifications,
it's your task to make sure the right module responds to your messages.
Expand Down
4 changes: 3 additions & 1 deletion getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ installers can be found under:

## Manual Installation

1. Download and install the latest _Node.js_ version, see the official documentation:
1. Download and install the latest _Node.js_ version, see the official
documentation:

- [Linux based distributions](https://github.com/nodesource/distributions)
- [Others](https://nodejs.org/en/download)

Expand Down
2 changes: 2 additions & 0 deletions modules/animate.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Animation Guide

(_Introduced in version: 2.25.0_)

::: tip Preview of animation
check the [animate.css](https://animate.style/) library to see a preview of the animation name result
:::

::: warning Where animation can be used?

- [global module configuration](configuration.html#animated) of a module
- [this.hide()](../development/core-module-file.html#this-hide-speed-callback-options) function in core module file
- [this.show()](../development/core-module-file.html#this-show-speed-callback-options) function in core module file
Expand Down
Loading

0 comments on commit 1f9ba7c

Please sign in to comment.