Contacts section reformatting

pull/840/head
Vincent 5 years ago
parent 24839b3bf9
commit 582bc71b99

@ -2626,6 +2626,9 @@
"newSession": { "newSession": {
"message": "New Session" "message": "New Session"
}, },
"freindRequestsButton": {
"message": "Requests"
},
"searchForAKeyPhrase": { "searchForAKeyPhrase": {
"message": "Search for a key phrase or contact" "message": "Search for a key phrase or contact"
}, },

@ -178,6 +178,8 @@ $session-compose-margin: 20px;
&__header { &__header {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 15px 7px 14px 0px; padding: 15px 7px 14px 0px;
height: 63px; height: 63px;
@ -461,11 +463,13 @@ $session-compose-margin: 20px;
} }
.contact-notification-count-bubble { .contact-notification-count-bubble {
display: flex;
align-items: center;
justify-content: center;
background: $session-color-danger; background: $session-color-danger;
line-height: 30px; width: 22px;
width: 30px; height: 22px;
height: 30px; font-size: $session-font-xs;
font-size: 14px;
margin-left: auto; margin-left: auto;
text-align: center; text-align: center;
border-radius: 50%; border-radius: 50%;
@ -489,6 +493,10 @@ $session-compose-margin: 20px;
.module-conversation-list-item { .module-conversation-list-item {
background-color: $session-shade-4; background-color: $session-shade-4;
&--is-selected {
background-color: $session-shade-5;
}
&--has-friend-request { &--has-friend-request {
&:first-child { &:first-child {
border-top: none !important; border-top: none !important;

@ -79,15 +79,35 @@ export class LeftPaneSectionHeader extends React.Component<Props, State> {
); );
} }
if (buttonLabel) { if (buttonLabel && !notificationCount) {
children.push( children.push(
<SessionButton <SessionButton
text={window.i18n('newSession')} text={buttonLabel}
onClick={buttonClicked} onClick={buttonClicked}
key="compose" key="compose"
disabled={false} disabled={false}
/> />
); );
} else if (buttonLabel && notificationCount && notificationCount > 0) {
const shortenedNotificationCount =
notificationCount > 9 ? 9 : notificationCount;
children.push(
<div className="contact-notification-section">
<SessionButton
text={buttonLabel}
onClick={buttonClicked}
key="compose"
disabled={false}
/>
<div
className="contact-notification-count-bubble"
onClick={this.props.buttonClicked}
role="button"
>
{shortenedNotificationCount}
</div>
</div>
);
} else if (notificationCount && notificationCount > 0) { } else if (notificationCount && notificationCount > 0) {
const shortenedNotificationCount = const shortenedNotificationCount =
notificationCount > 9 ? 9 : notificationCount; notificationCount > 9 ? 9 : notificationCount;

Loading…
Cancel
Save