mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-23 04:41:19 +00:00
commit
3b6b2c274d
1 changed files with 38 additions and 34 deletions
24
ui/src/components/user.tsx
vendored
24
ui/src/components/user.tsx
vendored
|
@ -93,7 +93,7 @@ export class User extends Component<any, UserState> {
|
|||
username: null,
|
||||
follows: [],
|
||||
moderates: [],
|
||||
loading: false,
|
||||
loading: true,
|
||||
avatarLoading: false,
|
||||
view: User.getViewFromProps(this.props.match.view),
|
||||
sort: User.getSortTypeFromProps(this.props.match.sort),
|
||||
|
@ -208,13 +208,6 @@ export class User extends Component<any, UserState> {
|
|||
render() {
|
||||
return (
|
||||
<div class="container">
|
||||
{this.state.loading ? (
|
||||
<h5>
|
||||
<svg class="icon icon-spinner spin">
|
||||
<use xlinkHref="#icon-spinner"></use>
|
||||
</svg>
|
||||
</h5>
|
||||
) : (
|
||||
<div class="row">
|
||||
<div class="col-12 col-md-8">
|
||||
<h5>
|
||||
|
@ -228,7 +221,15 @@ export class User extends Component<any, UserState> {
|
|||
)}
|
||||
<span>/u/{this.state.username}</span>
|
||||
</h5>
|
||||
{this.selects()}
|
||||
{this.state.loading ? (
|
||||
<h5>
|
||||
<svg class="icon icon-spinner spin">
|
||||
<use xlinkHref="#icon-spinner"></use>
|
||||
</svg>
|
||||
</h5>
|
||||
) : (
|
||||
this.selects()
|
||||
)}
|
||||
<UserDetails
|
||||
user_id={this.state.user_id}
|
||||
username={this.state.username}
|
||||
|
@ -241,15 +242,17 @@ export class User extends Component<any, UserState> {
|
|||
onPageChange={this.handlePageChange}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{!this.state.loading && (
|
||||
<div class="col-12 col-md-4">
|
||||
{this.userInfo()}
|
||||
{this.isCurrentUser && this.userSettings()}
|
||||
{this.moderates()}
|
||||
{this.follows()}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1042,6 +1045,7 @@ export class User extends Component<any, UserState> {
|
|||
UserService.Instance.user.show_avatars;
|
||||
this.state.userSettingsForm.matrix_user_id = this.state.user.matrix_user_id;
|
||||
}
|
||||
this.state.loading = false;
|
||||
this.setState(this.state);
|
||||
}
|
||||
} else if (res.op == UserOperation.SaveUserSettings) {
|
||||
|
|
Loading…
Reference in a new issue