34 lines
1.4 KiB
Handlebars
Raw Normal View History

2019-08-31 20:51:14 -07:00
{{! alias the active notification on the service --}}
{{#let this.service.activeNotification as |notification|}}
2019-08-31 20:51:14 -07:00
{{! Dialog Modals }}
{{#if (and this.service.isShowingNotification (eq notification.type this.notificationType.Modal))}}
2019-08-31 20:51:14 -07:00
<NotificationsConfirmDialog
@dismissButtonText={{notification.props.dismissButtonText}}
@confirmButtonText={{notification.props.confirmButtonText}}
@toggleText={{notification.props.toggleText}}
@onDialogToggle={{action notification.props.onDialogToggle target=this.service}}
@didConfirm={{action "confirmModal" target=this.service}}
@didClose={{action "dismissModal" target=this.service}} as |Dialog|
2019-08-31 20:51:14 -07:00
>
<Dialog.header @header={{notification.props.header}} />
<Dialog.content @content={{notification.props.content}} />
<Dialog.footer />
</NotificationsConfirmDialog>
{{/if}}
<div class="notifications__toast-wrapper">
{{! Toasts are hidden or show based on the flag, allows for css animation between states}}
{{#let (if this.service.isShowingToast "--visible" "--hidden") as |classModifier|}}
2019-08-31 20:51:14 -07:00
<NotificationsToast
class={{concat "notifications__toast" classModifier}}
@toast={{notification}}
@onDismiss={{action this.service.dismissToast}}
@onShowDetail={{action this.service.showContentDetail}}
2019-08-31 20:51:14 -07:00
/>
{{/let}}
</div>
{{/let}}