hides account name with ellipsis instead of line break, fixes colors

This commit is contained in:
Travis Kohlbeck 2020-02-18 17:23:42 -05:00
parent 37c01fc150
commit a168b614b2
2 changed files with 19 additions and 5 deletions

View File

@ -6,8 +6,21 @@ export const styles = (theme: Theme) =>
marginTop: theme.spacing.unit,
marginBottom: theme.spacing.unit
},
postHeaderContent: {
overflow: 'hidden',
whiteSpace: 'nowrap',
},
postHeaderTitle: {
overflow: 'hidden',
textOverflow: 'ellipsis',
color: theme.palette.text.secondary,
},
postAuthorName: {
whiteSpace: 'nowrap',
color: theme.palette.text.primary,
},
postAuthorAccount: {
marginLeft: theme.spacing.unit * 0.5,
},
postReblogChip: {
color: theme.palette.common.white,
@ -84,14 +97,11 @@ export const styles = (theme: Theme) =>
paddingTop: theme.spacing.unit,
paddingBottom: theme.spacing.unit
},
postAuthorAccount: {
color: theme.palette.grey[500],
marginLeft: theme.spacing.unit * 0.5,
},
postReblogIcon: {
marginBottom: theme.spacing.unit * -0.5,
marginLeft: theme.spacing.unit * 0.5,
marginRight: theme.spacing.unit * 0.5,
color: theme.palette.text.primary,
},
postAuthorEmoji: {
height: theme.typography.fontSize,

View File

@ -647,6 +647,10 @@ export class Post extends React.Component<any, IPostState> {
elevation={this.props.threadHeader ? 0 : 1}
>
<CardHeader
classes={{
content: classes.postHeaderContent,
title: classes.postHeaderTitle,
}}
avatar={
<LinkableAvatar
to={`/profile/${
@ -673,7 +677,7 @@ export class Post extends React.Component<any, IPostState> {
</Tooltip>
}
title={
<Typography>{this.getReblogAuthors(post)}</Typography>
this.getReblogAuthors(post)
}
subheader={moment(post.created_at).format(
"MMMM Do YYYY [at] h:mm A"