feat: 🎸 display toast notifications for rdp sessions
This commit is contained in:
1 parent
4a179ac3e3
commit
0a75e05b28
15 files changed
+240
-83
No files matched your search
+2
-1
@@ -56,7 +56,8 @@ export default class ScopesScopeSessionRecordingsSessionRecordingChannelsByConne
|
||||
}
|
||||
} else {
|
||||
this.flashMessages.danger(this.intl.t('errors.404.title'), {
|
||||
notificationType: 'error',
|
||||
color: 'critical',
|
||||
title: this.intl.t('states.error'),
|
||||
sticky: true,
|
||||
dismiss: (flash) => flash.destroyMessage(),
|
||||
});
|
||||
|
||||
+3
-1
@@ -10,6 +10,7 @@ export default class ScopesScopeSessionRecordingsSessionRecordingChannelsByConne
|
||||
// =services
|
||||
@service can;
|
||||
@service flashMessages;
|
||||
@service intl;
|
||||
|
||||
// =methods
|
||||
/**
|
||||
@@ -28,7 +29,8 @@ export default class ScopesScopeSessionRecordingsSessionRecordingChannelsByConne
|
||||
// Alert user of error occurred during download.
|
||||
const error = e.errors[0];
|
||||
this.flashMessages.danger(error.detail, {
|
||||
notificationType: 'error',
|
||||
color: 'critical',
|
||||
title: this.intl.t('states.error'),
|
||||
sticky: true,
|
||||
dismiss: (flash) => flash.destroyMessage(),
|
||||
});
|
||||
|
||||
@@ -137,12 +137,12 @@
|
||||
{{#each this.flashMessages.queue as |flash|}}
|
||||
<div class='ember-notify-show ember-notify'>
|
||||
<Hds::Toast
|
||||
@color={{map-type-to-color flash.notificationType}}
|
||||
@color={{flash.color}}
|
||||
@onDismiss={{fn flash.dismiss flash}}
|
||||
data-test-toast-notification
|
||||
as |T|
|
||||
>
|
||||
<T.Title>{{t (concat 'states.' flash.notificationType)}}</T.Title>
|
||||
<T.Title>{{flash.title}}</T.Title>
|
||||
<T.Description>{{flash.message}}</T.Description>
|
||||
</Hds::Toast>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user