parent
10533ff005
commit
655c5db59a
2 changed files with 14 additions and 18 deletions
21
ui/src/components/user.tsx
vendored
21
ui/src/components/user.tsx
vendored
|
@ -130,14 +130,7 @@ export class User extends Component<any, UserState> {
|
||||||
this.state.username = this.props.match.params.username;
|
this.state.username = this.props.match.params.username;
|
||||||
|
|
||||||
this.subscription = WebSocketService.Instance.subject
|
this.subscription = WebSocketService.Instance.subject
|
||||||
.pipe(
|
.pipe(retryWhen(errors => errors.pipe(delay(3000), take(10))))
|
||||||
retryWhen(errors =>
|
|
||||||
errors.pipe(
|
|
||||||
delay(3000),
|
|
||||||
take(10)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.subscribe(
|
.subscribe(
|
||||||
msg => this.parseMessage(msg),
|
msg => this.parseMessage(msg),
|
||||||
err => console.error(err),
|
err => console.error(err),
|
||||||
|
@ -449,16 +442,18 @@ export class User extends Component<any, UserState> {
|
||||||
htmlFor="file-upload"
|
htmlFor="file-upload"
|
||||||
class="pointer ml-4 text-muted small font-weight-bold"
|
class="pointer ml-4 text-muted small font-weight-bold"
|
||||||
>
|
>
|
||||||
|
{!this.state.userSettingsForm.avatar ? (
|
||||||
|
<span class="btn btn-sm btn-secondary">
|
||||||
|
<T i18nKey="upload_avatar">#</T>
|
||||||
|
</span>
|
||||||
|
) : (
|
||||||
<img
|
<img
|
||||||
height="80"
|
height="80"
|
||||||
width="80"
|
width="80"
|
||||||
src={
|
src={this.state.userSettingsForm.avatar}
|
||||||
this.state.userSettingsForm.avatar
|
|
||||||
? this.state.userSettingsForm.avatar
|
|
||||||
: 'https://via.placeholder.com/300/000?text=Avatar'
|
|
||||||
}
|
|
||||||
class="rounded-circle"
|
class="rounded-circle"
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
id="file-upload"
|
id="file-upload"
|
||||||
|
|
1
ui/src/translations/en.ts
vendored
1
ui/src/translations/en.ts
vendored
|
@ -29,6 +29,7 @@ export const en = {
|
||||||
preview: 'Preview',
|
preview: 'Preview',
|
||||||
upload_image: 'upload image',
|
upload_image: 'upload image',
|
||||||
avatar: 'Avatar',
|
avatar: 'Avatar',
|
||||||
|
upload_avatar: 'Upload Avatar',
|
||||||
show_avatars: 'Show Avatars',
|
show_avatars: 'Show Avatars',
|
||||||
formatting_help: 'formatting help',
|
formatting_help: 'formatting help',
|
||||||
view_source: 'view source',
|
view_source: 'view source',
|
||||||
|
|
Reference in a new issue