+
@@ -139,7 +142,7 @@
border-bottom-right-radius: 0;
.panel-heading {
- padding: 0.6em 0em;
+ padding: .6em 0;
text-align: center;
box-shadow: none;
}
@@ -158,10 +161,10 @@
.user-info {
color: $fallback--lightText;
color: var(--lightText, $fallback--lightText);
- padding: 0 16px;
+ padding: 0 26px;
.container {
- padding: 16px 10px 6px 10px;
+ padding: 16px 0 6px;
display: flex;
max-height: 56px;
@@ -218,11 +221,15 @@
vertical-align: middle;
object-fit: contain
}
+ .top-line {
+ display: flex;
+ }
}
.user-name{
text-overflow: ellipsis;
overflow: hidden;
+ flex: 1 0 auto;
}
.user-screen-name {
@@ -232,27 +239,73 @@
font-weight: light;
font-size: 15px;
padding-right: 0.1em;
+ width: 100%;
+ display: flex;
+
+ .dailyAvg {
+ min-width: 1px;
+ flex: 0 0 auto;
+ }
+
+ .handle {
+ min-width: 1px;
+ flex: 0 1 auto;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
}
.user-meta {
- margin-bottom: .4em;
+ margin-bottom: .15em;
+ display: flex;
+ align-items: baseline;
+ font-size: 14px;
+ line-height: 22px;
+ flex-wrap: wrap;
.following {
- font-size: 14px;
- flex: 0 0 100%;
+ flex: 1 0 auto;
margin: 0;
- padding-left: 16px;
+ margin-bottom: .25em;
text-align: left;
- float: left;
- }
- .floater {
- margin: 0;
}
- &::after {
- display: block;
- content: '';
- clear: both;
+ .highlighter {
+ flex: 0 1 auto;
+ display: flex;
+ flex-wrap: wrap;
+ margin-right: -.5em;
+ align-self: start;
+
+ .userHighlightCl {
+ padding: 2px 10px;
+ flex: 1 0 auto;
+ }
+
+ .userHighlightSel,
+ .userHighlightSel.select {
+ padding-top: 0;
+ padding-bottom: 0;
+ flex: 1 0 auto;
+ }
+ .userHighlightSel.select i {
+ line-height: 22px;
+ }
+
+ .userHighlightText {
+ width: 70px;
+ flex: 1 0 auto;
+ }
+
+ .userHighlightCl,
+ .userHighlightText,
+ .userHighlightSel,
+ .userHighlightSel.select {
+ height: 22px;
+ vertical-align: top;
+ margin-right: .5em;
+ margin-bottom: .25em;
+ }
}
}
.user-interactions {
@@ -260,8 +313,13 @@
flex-flow: row wrap;
justify-content: space-between;
+ margin-right: -.75em;
+
div {
- flex: 1;
+ flex: 1 0 0;
+ margin-right: .75em;
+ margin-bottom: .6em;
+ white-space: nowrap;
}
.mute {
@@ -280,8 +338,9 @@
}
button {
- width: 92%;
+ width: 100%;
height: 100%;
+ margin: 0;
}
.remote-button {
@@ -304,10 +363,11 @@
justify-content: space-between;
color: $fallback--lightText;
color: var(--lightText, $fallback--lightText);
+ flex-wrap: wrap;
}
.user-count {
- flex: 1;
+ flex: 1 0 auto;
padding: .5em 0 .5em 0;
margin: 0 .5em;
@@ -327,32 +387,5 @@
color: #CCC;
}
.floater {
- float: right;
- margin-top: 16px;
-
- .userHighlightCl {
- padding: 2px 10px;
- }
- .userHighlightSel,
- .userHighlightSel.select {
- padding-top: 0;
- padding-bottom: 0;
- }
- .userHighlightSel.select i {
- line-height: 22px;
- }
-
- .userHighlightText {
- width: 70px;
- }
-
- .userHighlightCl,
- .userHighlightText,
- .userHighlightSel,
- .userHighlightSel.select {
- height: 22px;
- vertical-align: top;
- margin-right: 0
- }
}
diff --git a/src/modules/statuses.js b/src/modules/statuses.js
index 8c2d36bc57..dccccf7248 100644
--- a/src/modules/statuses.js
+++ b/src/modules/statuses.js
@@ -27,6 +27,7 @@ export const defaultState = {
maxId: 0,
minId: Number.POSITIVE_INFINITY,
data: [],
+ idStore: {},
error: false
},
favorites: new Set(),
@@ -307,6 +308,7 @@ const addNewNotifications = (state, { dispatch, notifications, older, visibleNot
}
state.notifications.data.push(result)
+ state.notifications.idStore[notification.id] = result
if ('Notification' in window && window.Notification.permission === 'granted') {
const title = action.user.name
diff --git a/src/modules/users.js b/src/modules/users.js
index f2b59aaa1b..666811b509 100644
--- a/src/modules/users.js
+++ b/src/modules/users.js
@@ -66,6 +66,9 @@ export const mutations = {
setUserForStatus (state, status) {
status.user = state.usersObject[status.user.id]
},
+ setUserForNotification (state, notification) {
+ notification.action.user = state.usersObject[notification.action.user.id]
+ },
setColor (state, { user: { id }, highlighted }) {
const user = state.usersObject[id]
set(user, 'highlight', highlighted)
@@ -136,6 +139,21 @@ const users = {
store.commit('setUserForStatus', status)
})
},
+ addNewNotifications (store, { notifications }) {
+ const users = compact(map(notifications, 'from_profile'))
+ const notificationIds = compact(notifications.map(_ => String(_.id)))
+ store.commit('addNewUsers', users)
+
+ const notificationsObject = store.rootState.statuses.notifications.idStore
+ const relevantNotifications = Object.entries(notificationsObject)
+ .filter(([k, val]) => notificationIds.includes(k))
+ .map(([k, val]) => val)
+
+ // Reconnect users to notifications
+ each(relevantNotifications, (notification) => {
+ store.commit('setUserForNotification', notification)
+ })
+ },
async signUp (store, userInfo) {
store.commit('signUpPending')