From 2b317d686b834789fb8732bc157462d4291d4c2f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 3 Sep 2026 18:03:50 +0200 Subject: [PATCH] feat(dashboard): Show triggered reminders instead of upcoming ones Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Joas Schilling --- src/components/Dashboard/TalkDashboard.vue | 24 +- .../SearchMessages/SearchMessageItem.vue | 4 +- src/services/CapabilitiesManager.ts | 9 + src/services/notificationsService.ts | 38 +++ src/stores/__tests__/dashboard.spec.js | 220 ++++++++++++++++++ src/stores/dashboard.ts | 94 ++++++-- src/types/index.ts | 28 +++ 7 files changed, 392 insertions(+), 25 deletions(-) create mode 100644 src/services/notificationsService.ts create mode 100644 src/stores/__tests__/dashboard.spec.js diff --git a/src/components/Dashboard/TalkDashboard.vue b/src/components/Dashboard/TalkDashboard.vue index 9abad6285b7..e6325a19b61 100644 --- a/src/components/Dashboard/TalkDashboard.vue +++ b/src/components/Dashboard/TalkDashboard.vue @@ -34,12 +34,13 @@ import { CONVERSATION } from '../../constants.ts' import { getTalkConfig, hasTalkFeature, localCapabilities } from '../../services/CapabilitiesManager.ts' import { EventBus } from '../../services/EventBus.ts' import { useActorStore } from '../../stores/actor.ts' -import { useDashboardStore } from '../../stores/dashboard.ts' +import { supportsTriggeredReminders, useDashboardStore } from '../../stores/dashboard.ts' import { hasUnreadMentions } from '../../utils/conversation.ts' import { convertToUnix } from '../../utils/formattedTime.ts' import { copyConversationLinkToClipboard } from '../../utils/handleUrl.ts' -const supportsUpcomingReminders = hasTalkFeature('local', 'upcoming-reminders') +const supportsReminders = hasTalkFeature('local', 'upcoming-reminders') || supportsTriggeredReminders +const remindersTitle = supportsTriggeredReminders ? t('spreed', 'Reminders') : t('spreed', 'Upcoming reminders') const canModerateSipDialOut = hasTalkFeature('local', 'sip-support-dialout') && getTalkConfig('local', 'call', 'sip-enabled') && getTalkConfig('local', 'call', 'sip-dialout-enabled') @@ -71,9 +72,9 @@ const forwardScrollable = ref(false) const backwardScrollable = ref(false) const eventCardsWrapper = ref(null) const eventRooms = computed(() => dashboardStore.eventRooms || []) -const upcomingReminders = computed(() => dashboardStore.upcomingReminders || []) +const reminders = computed(() => dashboardStore.reminders || []) const eventsInitialised = computed(() => dashboardStore.eventRoomsInitialised) -const remindersInitialised = computed(() => dashboardStore.upcomingRemindersInitialised) +const remindersInitialised = computed(() => dashboardStore.remindersInitialised) const conversationName = ref('') let actualizeDataInterval: ReturnType | null = null @@ -85,7 +86,7 @@ let actualizeDataInterval: ReturnType | null = null async function actualizeData() { await Promise.all([ dashboardStore.fetchDashboardEventRooms(), - dashboardStore.fetchUpcomingReminders(), + dashboardStore.fetchReminders(), ]) } @@ -378,18 +379,19 @@ function scrollEventCards({ direction }: { direction: 'backward' | 'forward' }) :backgroundImage="illustration('mentions')" />