meilisearch-admin/app/components/task-toast.hbs
2022-09-15 14:12:53 +03:00

43 lines
1.1 KiB
Handlebars

<Toast
@autoClose={{this.autoClose}}
@onClose={{@onClose}}
@closeIndicatorClass={{this.bg}}
as |toast|
>
<div class='flex items-center'>
{{#if this.icon}}
<div
class='inline-flex flex-shrink-0 justify-center items-center self-start'
>
<this.icon @spin={{this.isEnqueued}} class='mr-4 {{this.color}}' />
</div>
{{/if}}
<div>
<div class='mb-2'>Task {{this.taskUid}} {{this.taskType}}</div>
<div class={{if this.task.error 'mb-2'}}>
Status:
<span class={{this.color}}>{{this.taskStatus}}</span>
</div>
{{#if this.task.error}}
Error:
<a
href={{this.task.error.link}}
class='text-danger'
target='_blank'
rel='noopener noreferrer'
>{{this.task.error.message}}</a>
{{/if}}
</div>
<button
type='button'
class='ml-auto self-start'
{{! data-dismiss-target='#toast-default' }}
aria-label='Close'
{{on 'click' toast.invokeOnClose}}
>
<Icons::Close />
</button>
</div>
</Toast>