Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
transfer formatting on activities
Browse files Browse the repository at this point in the history
  • Loading branch information
talhasch committed Mar 13, 2019
1 parent 59f8e40 commit a2c06c9
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 9 deletions.
37 changes: 29 additions & 8 deletions app/components/dialogs/Activities.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,28 @@ class ActivityListItem extends Component {
</div>
</div>
)}

{/* Transfer */}
{activity.type === 'transfer' && (
<div className="activity-content">
<div className="first-line">
<AccountLink {...this.props} username={activity.source}>
<a className="source-name"> {activity.source}</a>
</AccountLink>
<span className="activity-action">
<FormattedMessage id="activities.transfer-str" />{' '}
<span className="transfer-amount">{activity.amount}</span>
</span>
</div>
{activity.memo && typeof activity.memo === 'string' && (
<div className="second-line">
<div className="transfer-memo">
{activity.memo.substring(0, 120)}
</div>
</div>
)}
</div>
)}
</div>
</div>
</Fragment>
Expand Down Expand Up @@ -475,14 +497,13 @@ class Activities extends Component {
</div>

{loading && <LinearProgress />}
{!loading &&
activities.length === 0 && (
<div className="activity-list empty-list">
<span className="empty-text">
<FormattedMessage id="activities.empty-list" />
</span>
</div>
)}
{!loading && activities.length === 0 && (
<div className="activity-list empty-list">
<span className="empty-text">
<FormattedMessage id="activities.empty-list" />
</span>
</div>
)}
{activities.length > 0 && (
<div className="activity-list">
{activities.map(ac => (
Expand Down
7 changes: 6 additions & 1 deletion app/components/dialogs/Activities.scss
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,13 @@
white-space: nowrap;
}

.transfer-amount {
font-weight: 500;
}

.second-line {
.reply-body {
.reply-body,
.transfer-memo {
border-left: 5px solid lighten($steel-grey, 30);
color: $steel-grey;
cursor: pointer;
Expand Down
1 change: 1 addition & 0 deletions app/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@
"unfollowed-str": "unfollowed",
"ignored-str": "ignored",
"reblog-str": "reblogged your post:",
"transfer-str": "sent you",
"empty-list": "Nothing here",
"refresh": "Refresh",
"mark-all-read": "Mark All as Read",
Expand Down

0 comments on commit a2c06c9

Please sign in to comment.