Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep track of amount of duplicate notifications #63

Closed
matsn0w opened this issue Feb 16, 2024 · 2 comments
Closed

Keep track of amount of duplicate notifications #63

matsn0w opened this issue Feb 16, 2024 · 2 comments

Comments

@matsn0w
Copy link

matsn0w commented Feb 16, 2024

In addition to ignoreDuplicates, it would be nice if you could keep track of the duplication count inside the Notification component. If you know this number, you can style the notification somewhat like this:

image

The counter would then increase when a new notification is spawned, as long as the duration of the last occurrence hasn't passed.

@matsn0w matsn0w changed the title Show appearance counter in notification Keep track of amount of duplicate notifications Feb 16, 2024
kyvg added a commit that referenced this issue Feb 16, 2024
@kyvg
Copy link
Owner

kyvg commented Feb 16, 2024

Hi! I added duplicates count to notification item, you can use it like that

<notification>
  <template #body={ item }>
    {{ item.duplicates }}
  </template>
</notification>

Unfortunately, it's not possible to add it to the default body without causing breaking changes, so I decided to just provide that field for custom body for now.

@kyvg kyvg closed this as completed Feb 16, 2024
@matsn0w
Copy link
Author

matsn0w commented Feb 19, 2024

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants