From aa59adc81fcc3dc7959eb32c68ca5d20ebeeeb3d Mon Sep 17 00:00:00 2001 From: tusooa Date: Thu, 6 Apr 2023 12:35:51 -0400 Subject: [PATCH] Use neutral badge for drafts --- src/App.scss | 7 +++++++ src/components/navigation/navigation.js | 4 ++++ src/components/navigation/navigation_entry.vue | 3 ++- src/components/navigation/navigation_pins.vue | 13 +++++++++++-- src/components/side_drawer/side_drawer.vue | 2 +- 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/App.scss b/src/App.scss index 3f352e8d..cbf5d174 100644 --- a/src/App.scss +++ b/src/App.scss @@ -703,6 +703,13 @@ option { color: white; color: var(--badgeNotificationText, white); } + + &.badge-neutral { + background-color: $fallback--cGreen; + background-color: var(--badgeNeutral, $fallback--cGreen); + color: white; + color: var(--badgeNeutralText, white); + } } .alert { diff --git a/src/components/navigation/navigation.js b/src/components/navigation/navigation.js index c3071c8c..c16fe6dc 100644 --- a/src/components/navigation/navigation.js +++ b/src/components/navigation/navigation.js @@ -56,6 +56,7 @@ export const ROOT_ITEMS = { route: 'chats', icon: 'comments', label: 'nav.chats', + badgeStyle: 'notification', badgeGetter: 'unreadChatCount', criteria: ['chats'] }, @@ -63,6 +64,7 @@ export const ROOT_ITEMS = { route: 'friend-requests', icon: 'user-plus', label: 'nav.friend_requests', + badgeStyle: 'notification', criteria: ['lockedUser'], badgeGetter: 'followRequestCount' }, @@ -76,6 +78,7 @@ export const ROOT_ITEMS = { route: 'announcements', icon: 'bullhorn', label: 'nav.announcements', + badgeStyle: 'notification', badgeGetter: 'unreadAnnouncementCount', criteria: ['announcements'] }, @@ -83,6 +86,7 @@ export const ROOT_ITEMS = { route: 'drafts', icon: 'file-pen', label: 'nav.drafts', + badgeStyle: 'neutral', badgeGetter: 'draftCount' } } diff --git a/src/components/navigation/navigation_entry.vue b/src/components/navigation/navigation_entry.vue index 411ca536..f8521bb9 100644 --- a/src/components/navigation/navigation_entry.vue +++ b/src/components/navigation/navigation_entry.vue @@ -35,7 +35,8 @@
{{ getters[item.badgeGetter] }}
diff --git a/src/components/navigation/navigation_pins.vue b/src/components/navigation/navigation_pins.vue index 4fbb4f95..a153d82f 100644 --- a/src/components/navigation/navigation_pins.vue +++ b/src/components/navigation/navigation_pins.vue @@ -19,6 +19,7 @@
@@ -42,8 +43,16 @@ position: absolute; right: calc(50% - 0.75em); top: calc(50% - 0.5em); - background-color: $fallback--cRed; - background-color: var(--badgeNotification, $fallback--cRed); + + &.alert-dot-notification { + background-color: $fallback--cRed; + background-color: var(--badgeNotification, $fallback--cRed); + } + + &.alert-dot-neutral { + background-color: $fallback--cGreen; + background-color: var(--badgeNeutral, $fallback--cGreen); + } } .pinned-item { diff --git a/src/components/side_drawer/side_drawer.vue b/src/components/side_drawer/side_drawer.vue index 697bf64e..ad031866 100644 --- a/src/components/side_drawer/side_drawer.vue +++ b/src/components/side_drawer/side_drawer.vue @@ -225,7 +225,7 @@ /> {{ $t('nav.drafts') }} {{ draftCount }}