mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-25 11:55:03 +03:00
e021843e3f
no issue - migrated `notifications` service from EmberObject to true native class - switched to tracked properties and use of `TrackedArray` - swapped computed properties to getters - dropped unnecessary usage of `get` and `set` - migrated alert/notification related components to Glimmer components
31 lines
1.2 KiB
Handlebars
31 lines
1.2 KiB
Handlebars
<article class="gh-notification gh-notification-passive {{this.typeClass}}" {{on "animationend" this.closeOnFadeOut}} ...attributes>
|
|
<div class="gh-notification-icon">
|
|
{{#if @message.icon}}
|
|
{{svg-jar @message.icon}}
|
|
{{else}}
|
|
{{#if (eq @message.type "success")}}
|
|
{{svg-jar "check-circle"}}
|
|
{{else if (eq @message.type "error")}}
|
|
{{svg-jar "warning-stroke"}}
|
|
{{else if (eq @message.type "warn")}}
|
|
{{svg-jar "warning-stroke"}}
|
|
{{else}}
|
|
{{svg-jar "check-circle"}}
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|
|
<div class="gh-notification-content" data-test-text="notification-content">
|
|
<span class="gh-notification-title">{{@message.message}}</span>
|
|
|
|
{{#if @message.description}}
|
|
<p>{{@message.description}}</p>
|
|
{{/if}}
|
|
|
|
{{#if @message.actions}}
|
|
<span class="gh-notification-actions">{{@message.actions}}</span>
|
|
{{/if}}
|
|
</div>
|
|
<button class="gh-notification-close" data-test-button="close-notification" type="button" {{on "click" this.closeNotification}}>
|
|
{{svg-jar "close"}}<span class="hidden">Close</span>
|
|
</button>
|
|
</article> |