mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
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."});`
This commit is contained in:
@@ -8,11 +8,11 @@
|
||||
<br/>
|
||||
{% endif %}
|
||||
{% if title %}
|
||||
<span class="thin dimmed medium">{{ title }}</span>
|
||||
<span class="thin dimmed medium">{{ title if titleType == 'text' else title | safe }}</span>
|
||||
{% endif %}
|
||||
{% if message %}
|
||||
{% if title %}
|
||||
<br/>
|
||||
{% endif %}
|
||||
<span class="light bright small">{{ message | safe }}</span>
|
||||
<span class="light bright small">{{ message if messageType == 'text' else message | safe }}</span>
|
||||
{% endif %}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
{% if title %}
|
||||
<span class="thin dimmed medium">{{ title }}</span>
|
||||
<span class="thin dimmed medium">{{ title if titleType == 'text' else title | safe }}</span>
|
||||
{% endif %}
|
||||
{% if message %}
|
||||
{% if title %}
|
||||
<br/>
|
||||
{% endif %}
|
||||
<span class="light bright small">{{ message | safe }}</span>
|
||||
<span class="light bright small">{{ message if messageType == 'text' else message | safe }}</span>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user