mirror of
https://github.com/discourse/discourse.git
synced 2024-12-25 04:33:45 +08:00
f75d119cd3
This change adds a progress bar to toast notifications when autoClose is enabled (true by default). The progress bar allows users to visually see how long is left before the notification disappears. When hovered on desktop, the progress and autoclose timer will be paused, it will resume again once the mouse is moved away from the toast notification.
16 lines
389 B
Plaintext
16 lines
389 B
Plaintext
import Component from "@glimmer/component";
|
|
import { service } from "@ember/service";
|
|
import DToast from "float-kit/components/d-toast";
|
|
|
|
export default class DToasts extends Component {
|
|
@service toasts;
|
|
|
|
<template>
|
|
<section class="fk-d-toasts">
|
|
{{#each this.toasts.activeToasts as |toast|}}
|
|
<DToast @toast={{toast}} />
|
|
{{/each}}
|
|
</section>
|
|
</template>
|
|
}
|