diff options
| author | Shpuld Shpuldson <shp@cock.li> | 2020-11-02 15:46:49 +0200 |
|---|---|---|
| committer | Shpuld Shpuldson <shp@cock.li> | 2020-11-02 15:46:49 +0200 |
| commit | 350eb489c22e6bac20de92284193a87af63c52a9 (patch) | |
| tree | cb49f07065bffa8fed03af68edb41679aeb0f88f /src/components/notifications/notifications.js | |
| parent | f0a66448eeedb348f71b09334b6e7b3c411baeea (diff) | |
add favicon badge for unread notifs
Diffstat (limited to 'src/components/notifications/notifications.js')
| -rw-r--r-- | src/components/notifications/notifications.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index 4b479e13..49258563 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -6,6 +6,7 @@ import { filteredNotificationsFromStore, unseenNotificationsFromStore } from '../../services/notification_utils/notification_utils.js' +import FaviconService from '../../services/favicon_service/favicon_service.js' import { library } from '@fortawesome/fontawesome-svg-core' import { faCircleNotch } from '@fortawesome/free-solid-svg-icons' @@ -75,8 +76,10 @@ const Notifications = { watch: { unseenCountTitle (count) { if (count > 0) { + FaviconService.drawFaviconBadge() this.$store.dispatch('setPageTitle', `(${count})`) } else { + FaviconService.clearFaviconBadge() this.$store.dispatch('setPageTitle', '') } } |
