Small fixes

This commit is contained in:
Stanislav Romanov 2022-09-14 14:43:09 +03:00
parent cfdfbdfac8
commit b7791572bf
2 changed files with 11 additions and 3 deletions

View file

@ -1,4 +1,9 @@
<Toast @autoClose={{this.autoClose}} @onClose={{@onClose}} @closeIndicatorClass={{this.bg}} as |toast|>
<Toast
@autoClose={{this.autoClose}}
@onClose={{@onClose}}
@closeIndicatorClass={{this.bg}}
as |toast|
>
<div class='flex items-center'>
{{#if this.icon}}
<div
@ -9,7 +14,7 @@
{{/if}}
<div>
<div class='mb-2'>Task {{this.taskType}} Uid:{{this.taskUid}}</div>
<div class='mb-2'>Task {{this.taskType}} uid:{{this.taskUid}}</div>
<div class={{if this.task.error 'mb-2'}}>
Status:
<span class={{this.color}}>{{this.taskStatus}}</span>

View file

@ -99,8 +99,11 @@ export default class TaskToastComponent extends Component {
this.meilisearch.getTask(this.taskUid).then((task) => {
this.task = task;
if (this.isSucceeded) {
if (!this.isEnqueued) {
this.clearInterval();
}
if (this.isSucceeded) {
this.autoClose = true;
}
});