Skip to content

feat(ui): snooze notifications for 1 hour, 4 hours, or until tomorrow#2961

Draft
karlitschek wants to merge 1 commit intomasterfrom
split/06-snooze
Draft

feat(ui): snooze notifications for 1 hour, 4 hours, or until tomorrow#2961
karlitschek wants to merge 1 commit intomasterfrom
split/06-snooze

Conversation

@karlitschek
Copy link
Copy Markdown
Member

Each notification now exposes a clock-icon NcActions menu with 1 hour / 4 hours / Tomorrow snooze options. Snoozed items are hidden from the panel until their wake time, with the snooze map persisted in localStorage so reloads (and other tabs after a fetch) honor it.

  • NotificationItem.vue: snooze NcActions menu in the heading, emits 'snooze' with the chosen minutes
  • NotificationsApp.vue: snoozed map, visibleNotifications computed filters them out, expired entries are pruned at the start of every _fetch
  • onRemove(index) becomes onRemove(notification) so the v-for over visibleNotifications doesn't have to thread an index back into the full notifications array
  • styles.scss: spacing for the snooze action button

Note: this is the client-side version. Snooze state is per-browser; moving it to the server requires API support, which is tracked as follow-up.

Each notification now exposes a clock-icon NcActions menu with
1 hour / 4 hours / Tomorrow snooze options. Snoozed items are hidden
from the panel until their wake time, with the snooze map persisted
in localStorage so reloads (and other tabs after a fetch) honor it.

* NotificationItem.vue: snooze NcActions menu in the heading,
  emits 'snooze' with the chosen minutes
* NotificationsApp.vue: snoozed map, visibleNotifications computed
  filters them out, expired entries are pruned at the start of every
  _fetch
* onRemove(index) becomes onRemove(notification) so the v-for over
  visibleNotifications doesn't have to thread an index back into the
  full notifications array
* styles.scss: spacing for the snooze action button

Note: this is the client-side version. Snooze state is per-browser;
moving it to the server requires API support, which is tracked as
follow-up.

Signed-off-by: Frank Karlitschek <frank@nextcloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants