Skip to content

Issue#3064 html alert title message#3065

Merged
rejas merged 9 commits intoMagicMirrorOrg:developfrom
nfogal:issue#3064-html-alert-title-message
Mar 19, 2023
Merged

Issue#3064 html alert title message#3065
rejas merged 9 commits intoMagicMirrorOrg:developfrom
nfogal:issue#3064-html-alert-title-message

Conversation

@nfogal
Copy link
Contributor

@nfogal nfogal commented Mar 14, 2023

Fixes #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."});

nfogal added 9 commits March 14, 2023 14:45
Fix alert nunjunks template to handle title and message as HTML
Fix nunjucks notification template to handle title and message as HTML
Fix default alert module to render HTML for title and message
Default to using html if 'titleType' and 'messageType' are null
Default to using html if 'titleType' and 'messageType' are null
Change '|' to use 'or'
Change '|' to use 'or'
Reversing logic to always render HTML unless type is set to 'text'
Reversing logic to always render HTML unless type is set to 'text'
@nfogal
Copy link
Contributor Author

nfogal commented Mar 14, 2023

@codecov-commenter
Copy link

Codecov Report

Merging #3065 (e0dacb1) into develop (6d77923) will increase coverage by 0.07%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff             @@
##           develop    #3065      +/-   ##
===========================================
+ Coverage    23.02%   23.10%   +0.07%     
===========================================
  Files           52       52              
  Lines        11582    11582              
===========================================
+ Hits          2667     2676       +9     
+ Misses        8915     8906       -9     

see 1 file with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@khassel khassel requested a review from rejas March 14, 2023 20:30
@rejas rejas merged commit 8f8945d into MagicMirrorOrg:develop Mar 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants