Skip to content

Commit f320a77

Browse files
committed
feat(web): remove notification indicator pulse
the pulse was initially added to provide visual feedback when: 1. a new notification arrived 2. an alert notification was unread because we began using the legacy notify script, we now get a toast on new notifications. re:2, feedback on the pulse was mixed, so i'm removing it.
1 parent 2fe4303 commit f320a77

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

web/components/Notifications/Indicator.vue

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { BellIcon, ExclamationTriangleIcon, ShieldExclamationIcon } from '@heroicons/vue/24/solid';
33
import { cn } from '~/components/shadcn/utils';
44
import { Importance, type OverviewQuery } from '~/composables/gql/graphql';
5-
import { onWatcherCleanup } from 'vue';
65
76
const props = defineProps<{ overview?: OverviewQuery['notifications']['overview'] }>();
87
@@ -37,25 +36,6 @@ const icon = computed<{ component: Component; color: string } | null>(() => {
3736
}
3837
return null;
3938
});
40-
41-
/** whether new notifications ocurred */
42-
const hasNewNotifications = ref(false);
43-
// watch for new notifications, set a temporary indicator when they're reveived
44-
watch(
45-
() => props.overview?.unread,
46-
(newVal, oldVal) => {
47-
if (!newVal || !oldVal) {
48-
return;
49-
}
50-
hasNewNotifications.value = newVal.total > oldVal.total;
51-
// lifetime of 'new notification' state
52-
const msToLive = 30_000;
53-
const timeout = setTimeout(() => {
54-
hasNewNotifications.value = false;
55-
}, msToLive);
56-
onWatcherCleanup(() => clearTimeout(timeout));
57-
}
58-
);
5939
</script>
6040

6141
<template>

0 commit comments

Comments
 (0)