2025-03-18 20:08:23 +04:00
|
|
|
# Notification module {#js_notification}
|
2024-04-09 12:06:37 +03:00
|
|
|
|
|
|
|
|
```js
|
|
|
|
|
let notify = require("notification");
|
|
|
|
|
```
|
2025-03-26 17:29:26 +03:00
|
|
|
## Methods
|
2024-04-09 12:06:37 +03:00
|
|
|
|
2025-03-26 17:29:26 +03:00
|
|
|
### success()
|
2025-03-18 20:08:23 +04:00
|
|
|
"Success" flipper notification message.
|
2024-04-09 12:06:37 +03:00
|
|
|
|
2025-03-26 17:29:26 +03:00
|
|
|
**Example**
|
2024-04-09 12:06:37 +03:00
|
|
|
```js
|
|
|
|
|
notify.success();
|
|
|
|
|
```
|
|
|
|
|
|
2025-03-26 17:29:26 +03:00
|
|
|
<br>
|
|
|
|
|
|
|
|
|
|
### error()
|
2025-03-18 20:08:23 +04:00
|
|
|
"Error" flipper notification message.
|
2024-04-09 12:06:37 +03:00
|
|
|
|
2025-03-26 17:29:26 +03:00
|
|
|
**Example**
|
2024-04-09 12:06:37 +03:00
|
|
|
```js
|
|
|
|
|
notify.error();
|
|
|
|
|
```
|
|
|
|
|
|
2025-03-26 17:29:26 +03:00
|
|
|
<br>
|
|
|
|
|
|
|
|
|
|
### blink()
|
2025-03-18 20:08:23 +04:00
|
|
|
Blink notification LED.
|
2024-04-09 12:06:37 +03:00
|
|
|
|
2025-03-26 17:29:26 +03:00
|
|
|
**Parameters**
|
2024-04-09 12:06:37 +03:00
|
|
|
- Blink color (blue/red/green/yellow/cyan/magenta)
|
|
|
|
|
- Blink type (short/long)
|
|
|
|
|
|
2025-03-26 17:29:26 +03:00
|
|
|
**Examples**
|
2024-04-09 12:06:37 +03:00
|
|
|
```js
|
|
|
|
|
notify.blink("red", "short"); // Short blink of red LED
|
|
|
|
|
notify.blink("green", "short"); // Long blink of green LED
|
|
|
|
|
```
|