summaryrefslogtreecommitdiffstats
path: root/ui/src/components/user.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2020-01-14 16:58:14 -0500
committerDessalines <tyhou13@gmx.com>2020-01-14 16:58:14 -0500
commitf7580f5337a6199c1003fe800fe3f07510e66f94 (patch)
treec738fefdd6a6bd48cff29b72b920835c77b5c66a /ui/src/components/user.tsx
parent1c4022456ec4c0c748d2e013458a96798d2f5aee (diff)
Removing placeholder image for avatar upload.
- Fixes #419
Diffstat (limited to 'ui/src/components/user.tsx')
-rw-r--r--ui/src/components/user.tsx31
1 files changed, 13 insertions, 18 deletions
diff --git a/ui/src/components/user.tsx b/ui/src/components/user.tsx
index 30ee3dcf..c95b18bb 100644
--- a/ui/src/components/user.tsx
+++ b/ui/src/components/user.tsx
@@ -130,14 +130,7 @@ export class User extends Component<any, UserState> {
this.state.username = this.props.match.params.username;
this.subscription = WebSocketService.Instance.subject
- .pipe(
- retryWhen(errors =>
- errors.pipe(
- delay(3000),
- take(10)
- )
- )
- )
+ .pipe(retryWhen(errors => errors.pipe(delay(3000), take(10))))
.subscribe(
msg => this.parseMessage(msg),
err => console.error(err),
@@ -449,16 +442,18 @@ export class User extends Component<any, UserState> {
htmlFor="file-upload"
class="pointer ml-4 text-muted small font-weight-bold"
>
- <img
- height="80"
- width="80"
- src={
- this.state.userSettingsForm.avatar
- ? this.state.userSettingsForm.avatar
- : 'https://via.placeholder.com/300/000?text=Avatar'
- }
- class="rounded-circle"
- />
+ {!this.state.userSettingsForm.avatar ? (
+ <span class="btn btn-sm btn-secondary">
+ <T i18nKey="upload_avatar">#</T>
+ </span>
+ ) : (
+ <img
+ height="80"
+ width="80"
+ src={this.state.userSettingsForm.avatar}
+ class="rounded-circle"
+ />
+ )}
</label>
<input
id="file-upload"