107 Commits

Author SHA1 Message Date
Kristjan ESPERANTO
0b70274a1a
Replace prettier by stylistic to lint JavaScript (#3303)
In the latest versions of ESLint, more and more formatting rules were
removed or declared deprecated. These rules have been integrated into
the new Stylistic package (https://eslint.style/guide/why) and expanded.

Stylistic acts as a better formatter  for JavaScript as Prettier.

With this PR there are many changes that make the code more uniform, but
it may be difficult to review due to the large amount. Even if I have no
worries about the changes, perhaps this would be something for the
release after next.

Let me know what you think.
2023-12-25 08:17:11 +01:00
Veeck
c0a5f35a00
Cleanup nunjuck templates (#3109)
Ran a linter over it (djlint) which fixed intendation and a few errors

---------

Co-authored-by: veeck <michael@veeck.de>
2023-09-02 22:18:57 +02:00
Karsten Hassel
a41aa48dd1
add .gitattributes and fix prettier/js warnings (#3094)
see title, as discussed in
https://github.com/MichMich/MagicMirror/pull/3093
2023-04-22 09:29:51 +02:00
Kristjan ESPERANTO
d276a7ddb9
Use template literals instead of string concatenation (#3066)
We have used it inconsistently till now. Template literals are more
modern and easier to maintain in my opinion.

Because that's a large amount of changes, here's a way to reproduce it:
I added the rule `"prefer-template": "error"` to the `.eslintrc.json`
and did an autofix. Since this caused a new problem in line 409 of
`newsfeed.js`, I reversed it in that line and also removed the rule from
the eslint config file.

The rule is described here:
https://eslint.org/docs/latest/rules/prefer-template

Note: I've played around with some other linter rules as well, and some
seem to point to some specific, non-cosmetic, issues. But before I dive
even deeper and then introduce even bigger and hardly understandable
changes at once, I thought I'd start with this simple cosmetic rule.
2023-03-19 14:32:23 +01:00
Nicholas Fogal
8f8945d418
Issue#3064 html alert title message (#3065)
Fixes [#3064](https://github.com/MichMich/MagicMirror/issues/3064)

- Fixes default alert module nunjucks templates to render HTML by
default unless 'titleType' and 'messageType' are set to 'text' in the
payload data

e.g. 

Display Text:
`this.sendNotification('SHOW_ALERT', {type: "notification", title:
"<u>YoLink LeakSensor</u>", titleType: "text", message: "<b>" +
deviceName + "</b> reported an alarm that needs attention.",
messageType: "text"});`

Display HTML:
`this.sendNotification('SHOW_ALERT', {type: "notification", title:
"<u>YoLink LeakSensor</u>", message: "<b>" + deviceName + "</b> reported
an alarm that needs attention."});`
2023-03-19 13:23:37 +01:00
Veeck
498b440174
Convert module-start to async (#3049)
Similar to the node_helper async start PR...

---------

Co-authored-by: veeck <michael@veeck.de>
2023-02-22 18:58:29 +01:00
Veeck
390e5d6490
Update thai language (#3044)
actually add it to the tanslation list
and also add the alert translations from
https://github.com/MichMich/MagicMirror/pull/3029 since the OP didnt
seem to work on it (yet)

---------

Co-authored-by: veeck <michael@veeck.de>
Co-authored-by: Suthep Yonphimai <tomzt@users.noreply.github.com>
2023-02-20 20:03:42 +01:00
Kristjan ESPERANTO
b08a4737af
Update stylelint (#3042)
1. Update `stylelint` dependencies
- As of stylelint v15, we do not need `stylelint-config-prettier`
anymore:
https://github.com/prettier/stylelint-config-prettier/releases/tag/v9.0.5
2. Switch to `stylelint-config-standard`:
`stylelint-prettier/recommended` has not been updated for a long time
and still needs the old `stylelint-config-prettier`
3. Handle new `stylelint` issues
2023-02-19 21:36:50 +01:00
Piotr Rajnisz
7198ae5eae
Add (in Alert module) templateName parameter (#3009)
This simple change allows to use your own templates (under "templates"
directory). The parameter `templateName` is optional (ignored on falsy
value - undefined, null, empty string, etc.) and independent of `type`.

Co-authored-by: Veeck <github@veeck.de>
2023-01-26 13:00:49 +01:00
grenagit
cd4ba428da
[Alert Module] Fix HTML message (#3018)
Solve #2828 by adding nunjucks safe filter to the message

Co-authored-by: Grena <grena@grenabox.fr>
Co-authored-by: Veeck <github@veeck.de>
2023-01-21 12:46:03 +01:00
Kristjan SCHMIDT
6f27e5ae07 MagicMirror -> MagicMirror² 2022-01-26 23:47:51 +01:00
Kristjan SCHMIDT
a5668b1b99 Magic Mirror -> MagicMirror²
Consistent spelling
2022-01-26 23:09:26 +01:00
Christopher Fenner
9e4997aa81
Merge branch 'develop' into patch-1 2022-01-12 20:39:09 +01:00
Karsten Hassel
f3cefde7cb update deps and add CHANGELOG 2022-01-10 22:42:07 +01:00
Christopher Fenner
404343de1d
use solid type for font awesome icons 2022-01-05 13:19:55 +01:00
Felix Wiedenbach
d0cc0a4034 move notificationReceived 2021-10-15 06:50:54 +02:00
Felix Wiedenbach
15fd2021bb blur modules instead of black overlay 2021-10-15 06:43:53 +02:00
Felix Wiedenbach
75cf1d610e migrate manual DOM creation for alerts to nunjuck template 2021-10-15 06:31:07 +02:00
Felix Wiedenbach
8f5ee9466a move notificationFx styles into styles directory 2021-10-15 06:26:23 +02:00
Felix Wiedenbach
467720f1c4 migrate manual DOM creation for notifications to nunjuck template 2021-10-15 06:23:50 +02:00
Felix Wiedenbach
026e624e23 use alert as default in notificationReceived 2021-10-15 06:17:03 +02:00
Felix Wiedenbach
460a9fc5f7 move notification effect override into start function 2021-10-15 06:14:45 +02:00
Felix Wiedenbach
3695e64ce9 migrate set position DOM manipulation to css 2021-10-15 06:11:24 +02:00
Felix Wiedenbach
b3bb829e4d fix missing translation files 2021-10-15 06:05:06 +02:00
Felix Wiedenbach
1b9f8c23d2 shorthand camelcase functions 2021-10-15 06:03:51 +02:00
rejas
4b1c7da171 Update jsdoc 2021-05-19 11:12:56 +02:00
rejas
aeefe28710 Update jsdoc 2021-05-19 11:12:56 +02:00
rejas
7bfaf07980 Use custom properties colors more often 2021-04-17 09:50:12 +02:00
Ezequiel Holzweissig
a3ed24c766 Prettifier 2021-04-10 20:38:33 -03:00
Ezequiel Holzweissig
82727b825c Fix alerts
Fixes #2522
2021-04-10 20:15:32 -03:00
Michael Teeuw
a0366e794b Stupid commit to check github actions. 2020-12-21 10:57:18 +01:00
veeck
b373aa6250 Hide alert overlay when dismissed manually 2020-12-17 18:31:18 +01:00
rejas
e489b7101c Cleanup notificationFx jsdoc 2020-07-30 09:33:19 +02:00
rejas
43bcf4ab98 Run eslint over files, see what gets fixed automatically and clean up 2020-07-27 14:25:43 +02:00
Veeck
abb5dc5739 Run prettier over ALL files once
No other changes done in this commit
2020-05-11 22:22:32 +02:00
Veeck
7fc7d626bc Add Module to globals, cleanup comments 2020-05-05 14:55:15 +02:00
rejas
d8f093b226 Cleanup some globals 2020-05-02 10:33:24 +02:00
rejas
e7fc4ef1e7 Replace unsecure links with https ones 2020-04-28 23:05:28 +02:00
Veeck
ec187fe109 Update changelog and commen tags 2020-04-21 12:23:50 +02:00
rejas
ef8d85773c Run automatic fix 2020-04-21 12:23:50 +02:00
Veeck
a1285b120b Remove some other prefixed styles since we are at it 2020-04-20 12:13:13 +02:00
Veeck
7a976c0239 Fix tests, use non-spread object extend version again 2020-04-20 11:24:03 +02:00
Veeck
5819ef346b Rename stylesheet for clarity that its about the notificationFX 2020-04-20 10:58:27 +02:00
Veeck
b3dcc82c71 Remove old webkit prefix styles 2020-04-20 10:52:53 +02:00
Veeck
06e8308dc2 Replace old js files with modern code 2020-04-20 10:51:27 +02:00
Michael Teeuw
a85ed709af Remove newlines. 2020-01-18 21:09:18 +01:00
Michael Teeuw
e24d1a1261 Fix newlines? 2020-01-18 21:02:49 +01:00
Adi Miller
63950f572a Adding trailing enter to avoid build warning. 2020-01-16 16:47:49 +02:00
Michael Teeuw
1152689f34 Remove docs and link to docs.magicmirror.builders. 2020-01-12 13:01:56 +01:00
rejas
515c183070 Fix a comparison that was an assignement 2019-06-05 17:01:54 +02:00