summaryrefslogtreecommitdiffstats
path: root/ui/src/components/private-message-form.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-04-14 16:07:20 -0400
committerDessalines <tyhou13@gmx.com>2020-04-14 16:07:20 -0400
commit1336b4ed6023e7fcf0fd40be63569966ee4b1b45 (patch)
treee62e4422e0ba0430ea6d060f01d20dee22d6e564 /ui/src/components/private-message-form.tsx
parentf040dac647d50c97e3f9ab8058563a7fe0f29261 (diff)
parent641e4c5d96d9d152bc75318b3ea08f789d920b2b (diff)
Merge branch 'dev' into federation
Diffstat (limited to 'ui/src/components/private-message-form.tsx')
-rw-r--r--ui/src/components/private-message-form.tsx30
1 files changed, 10 insertions, 20 deletions
diff --git a/ui/src/components/private-message-form.tsx b/ui/src/components/private-message-form.tsx
index 7e498bae..14abacf6 100644
--- a/ui/src/components/private-message-form.tsx
+++ b/ui/src/components/private-message-form.tsx
@@ -21,14 +21,13 @@ import {
capitalizeFirstLetter,
markdownHelpUrl,
mdToHtml,
- showAvatars,
- pictshareAvatarThumbnail,
wsJsonToRes,
toast,
randomStr,
setupTribute,
setupTippy,
} from '../utils';
+import { UserListing } from './user-listing';
import Tribute from 'tributejs/src/Tribute.js';
import autosize from 'autosize';
import { i18n } from '../i18next';
@@ -132,22 +131,12 @@ export class PrivateMessageForm extends Component<
{this.state.recipient && (
<div class="col-sm-10 form-control-plaintext">
- <Link
- className="text-body font-weight-bold"
- to={`/u/${this.state.recipient.name}`}
- >
- {this.state.recipient.avatar && showAvatars() && (
- <img
- height="32"
- width="32"
- src={pictshareAvatarThumbnail(
- this.state.recipient.avatar
- )}
- class="rounded-circle mr-1"
- />
- )}
- <span>{this.state.recipient.name}</span>
- </Link>
+ <UserListing
+ user={{
+ name: this.state.recipient.name,
+ avatar: this.state.recipient.avatar,
+ }}
+ />
</div>
)}
</div>
@@ -233,8 +222,9 @@ export class PrivateMessageForm extends Component<
</button>
{this.state.privateMessageForm.content && (
<button
- className={`btn btn-secondary mr-2 ${this.state.previewMode &&
- 'active'}`}
+ className={`btn btn-secondary mr-2 ${
+ this.state.previewMode && 'active'
+ }`}
onClick={linkEvent(this, this.handlePreviewToggle)}
>
{i18n.t('preview')}