diff --git a/client/src/components/Notifications/NotificationsList.vue b/client/src/components/Notifications/NotificationsList.vue index 945141215d9b..b9268e6c41f5 100644 --- a/client/src/components/Notifications/NotificationsList.vue +++ b/client/src/components/Notifications/NotificationsList.vue @@ -19,9 +19,17 @@ library.add(faCog, faHourglassHalf, faRetweet); const notificationsStore = useNotificationsStore(); const { notifications, loadingNotifications } = storeToRefs(notificationsStore); +interface Props { + shouldOpenPreferences?: boolean; +} + +const props = withDefaults(defineProps(), { + shouldOpenPreferences: false, +}); + const showUnread = ref(false); const showShared = ref(false); -const preferencesOpen = ref(false); +const preferencesOpen = ref(props.shouldOpenPreferences); const selectedNotificationIds = ref([]); const haveSelected = computed(() => selectedNotificationIds.value.length > 0); diff --git a/client/src/entry/analysis/router.js b/client/src/entry/analysis/router.js index 0a2995916845..dec661825916 100644 --- a/client/src/entry/analysis/router.js +++ b/client/src/entry/analysis/router.js @@ -450,6 +450,9 @@ export function getRouter(Galaxy) { path: "user/notifications", component: NotificationsList, redirect: redirectIf(!Galaxy.config.enable_notification_system, "/") || redirectAnon(), + props: (route) => ({ + shouldOpenPreferences: Boolean(route.query.preferences), + }), }, { path: "user/notifications/preferences", diff --git a/lib/galaxy/managers/notification.py b/lib/galaxy/managers/notification.py index 4e25036c5d48..5d5ed589d093 100644 --- a/lib/galaxy/managers/notification.py +++ b/lib/galaxy/managers/notification.py @@ -689,7 +689,9 @@ def build_context(self, template_format: TemplateFormats) -> NotificationContext urlparse(self.notification.galaxy_url).hostname if self.notification.galaxy_url else self.config.server_name ) notification_settings_url = ( - f"{self.notification.galaxy_url}/user/notifications" if self.notification.galaxy_url else None + f"{self.notification.galaxy_url}/user/notifications?preferences=true" + if self.notification.galaxy_url + else None ) contact_email = self.config.error_email_to or None return NotificationContext(