aboutsummaryrefslogtreecommitdiff
path: root/src/components/notifications
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/notifications')
-rw-r--r--src/components/notifications/notifications.js19
-rw-r--r--src/components/notifications/notifications.scss37
2 files changed, 26 insertions, 30 deletions
diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js
index 26ffbab6..d951e2a8 100644
--- a/src/components/notifications/notifications.js
+++ b/src/components/notifications/notifications.js
@@ -1,3 +1,4 @@
+import { mapGetters } from 'vuex'
import Notification from '../notification/notification.vue'
import notificationsFetcher from '../../services/notifications_fetcher/notifications_fetcher.service.js'
import {
@@ -27,6 +28,11 @@ const Notifications = {
seenToDisplayCount: DEFAULT_SEEN_TO_DISPLAY_COUNT
}
},
+ created () {
+ const store = this.$store
+ const credentials = store.state.users.currentUser.credentials
+ notificationsFetcher.fetchAndUpdate({ store, credentials })
+ },
computed: {
mainClass () {
return this.minimalMode ? '' : 'panel panel-default'
@@ -46,23 +52,22 @@ const Notifications = {
unseenCount () {
return this.unseenNotifications.length
},
+ unseenCountTitle () {
+ return this.unseenCount + (this.unreadChatCount)
+ },
loading () {
return this.$store.state.statuses.notifications.loading
},
notificationsToDisplay () {
return this.filteredNotifications.slice(0, this.unseenCount + this.seenToDisplayCount)
- }
+ },
+ ...mapGetters(['unreadChatCount'])
},
components: {
Notification
},
- created () {
- const { dispatch } = this.$store
-
- dispatch('fetchAndUpdateNotifications')
- },
watch: {
- unseenCount (count) {
+ unseenCountTitle (count) {
if (count > 0) {
this.$store.dispatch('setPageTitle', `(${count})`)
} else {
diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss
index 9efcfcf8..c6b2a5b5 100644
--- a/src/components/notifications/notifications.scss
+++ b/src/components/notifications/notifications.scss
@@ -36,8 +36,10 @@
border-bottom: 1px solid;
border-color: $fallback--border;
border-color: var(--border, $fallback--border);
+ word-wrap: break-word;
+ word-break: break-word;
- &:hover .animated.avatar {
+ &:hover .animated.Avatar {
canvas {
display: none;
}
@@ -46,37 +48,20 @@
}
}
- .muted {
- padding: .25em .6em;
- }
-
.non-mention {
display: flex;
flex: 1;
flex-wrap: nowrap;
padding: 0.6em;
min-width: 0;
+
.avatar-container {
width: 32px;
height: 32px;
}
- .status-el {
- .status {
- padding: 0.25em 0;
- color: $fallback--faint;
- color: var(--faint, $fallback--faint);
- a {
- color: var(--faintLink);
- }
- .status-content a {
- color: var(--postFaintLink);
- }
- }
- padding: 0;
- .media-body {
- margin: 0;
- }
- }
+
+ --link: var(--faintLink);
+ --text: var(--faint);
}
.follow-request-accept {
@@ -113,7 +98,8 @@
}
}
- .status-el {
+ /* TODO cleanup this */
+ .Status {
flex: 1;
}
@@ -125,6 +111,11 @@
flex: 1;
padding-left: 0.8em;
min-width: 0;
+
+ .timeago {
+ min-width: 3em;
+ text-align: right;
+ }
}
.emoji-reaction-emoji {