fix: Responsive issue in activity message (#2090)

This commit is contained in:
Sivin Varghese 2021-04-13 22:58:54 +05:30 committed by GitHub
parent 3e8c25b4a0
commit 997447364c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View file

@ -230,6 +230,10 @@
} }
} }
&.center {
justify-content: center;
}
.wrap { .wrap {
@include margin($zero $space-normal); @include margin($zero $space-normal);
max-width: 69%; max-width: 69%;
@ -258,17 +262,12 @@
margin: var(--space-small) var(--space-normal); margin: var(--space-small) var(--space-normal);
padding: var(--space-small) var(--space-normal); padding: var(--space-small) var(--space-normal);
@include breakpoint(xlarge up) {
margin: var(--space-small) auto;
}
.is-text { .is-text {
display: inline-block; display: inline-block;
text-align: start; text-align: start;
@include breakpoint(xlarge up) { @include breakpoint(xxxlarge up) {
display: flex; display: flex;
text-align: center;
} }
} }
} }

View file

@ -143,6 +143,10 @@ export default {
return `https://twitter.com/${screenName}`; return `https://twitter.com/${screenName}`;
}, },
alignBubble() { alignBubble() {
const { message_type: messageType } = this.data;
if (messageType === MESSAGE_TYPE.ACTIVITY) {
return 'center';
}
return !this.data.message_type ? 'left' : 'right'; return !this.data.message_type ? 'left' : 'right';
}, },
readableTime() { readableTime() {