Merge branch 'main' into more-upgrade-apub-3
This commit is contained in:
commit
04be93d2a3
4 changed files with 48 additions and 34 deletions
3
ui/src/components/post-listing.tsx
vendored
3
ui/src/components/post-listing.tsx
vendored
|
@ -101,6 +101,9 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
this.state.upvotes = nextProps.post.upvotes;
|
this.state.upvotes = nextProps.post.upvotes;
|
||||||
this.state.downvotes = nextProps.post.downvotes;
|
this.state.downvotes = nextProps.post.downvotes;
|
||||||
this.state.score = nextProps.post.score;
|
this.state.score = nextProps.post.score;
|
||||||
|
if (this.props.post.id !== nextProps.post.id) {
|
||||||
|
this.state.imageExpanded = false;
|
||||||
|
}
|
||||||
this.setState(this.state);
|
this.setState(this.state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
ui/src/components/sponsors.tsx
vendored
2
ui/src/components/sponsors.tsx
vendored
|
@ -17,6 +17,8 @@ interface SilverUser {
|
||||||
}
|
}
|
||||||
|
|
||||||
let general = [
|
let general = [
|
||||||
|
'Rachel Schmitz',
|
||||||
|
'comradeda',
|
||||||
'ybaumy',
|
'ybaumy',
|
||||||
'dude in phx',
|
'dude in phx',
|
||||||
'twilight loki',
|
'twilight loki',
|
||||||
|
|
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,
|
username: null,
|
||||||
follows: [],
|
follows: [],
|
||||||
moderates: [],
|
moderates: [],
|
||||||
loading: false,
|
loading: true,
|
||||||
avatarLoading: false,
|
avatarLoading: false,
|
||||||
view: User.getViewFromProps(this.props.match.view),
|
view: User.getViewFromProps(this.props.match.view),
|
||||||
sort: User.getSortTypeFromProps(this.props.match.sort),
|
sort: User.getSortTypeFromProps(this.props.match.sort),
|
||||||
|
@ -208,13 +208,6 @@ export class User extends Component<any, UserState> {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div class="container">
|
<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="row">
|
||||||
<div class="col-12 col-md-8">
|
<div class="col-12 col-md-8">
|
||||||
<h5>
|
<h5>
|
||||||
|
@ -228,7 +221,15 @@ export class User extends Component<any, UserState> {
|
||||||
)}
|
)}
|
||||||
<span>/u/{this.state.username}</span>
|
<span>/u/{this.state.username}</span>
|
||||||
</h5>
|
</h5>
|
||||||
{this.selects()}
|
{this.state.loading ? (
|
||||||
|
<h5>
|
||||||
|
<svg class="icon icon-spinner spin">
|
||||||
|
<use xlinkHref="#icon-spinner"></use>
|
||||||
|
</svg>
|
||||||
|
</h5>
|
||||||
|
) : (
|
||||||
|
this.selects()
|
||||||
|
)}
|
||||||
<UserDetails
|
<UserDetails
|
||||||
user_id={this.state.user_id}
|
user_id={this.state.user_id}
|
||||||
username={this.state.username}
|
username={this.state.username}
|
||||||
|
@ -241,15 +242,17 @@ export class User extends Component<any, UserState> {
|
||||||
onPageChange={this.handlePageChange}
|
onPageChange={this.handlePageChange}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{!this.state.loading && (
|
||||||
<div class="col-12 col-md-4">
|
<div class="col-12 col-md-4">
|
||||||
{this.userInfo()}
|
{this.userInfo()}
|
||||||
{this.isCurrentUser && this.userSettings()}
|
{this.isCurrentUser && this.userSettings()}
|
||||||
{this.moderates()}
|
{this.moderates()}
|
||||||
{this.follows()}
|
{this.follows()}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1042,6 +1045,7 @@ export class User extends Component<any, UserState> {
|
||||||
UserService.Instance.user.show_avatars;
|
UserService.Instance.user.show_avatars;
|
||||||
this.state.userSettingsForm.matrix_user_id = this.state.user.matrix_user_id;
|
this.state.userSettingsForm.matrix_user_id = this.state.user.matrix_user_id;
|
||||||
}
|
}
|
||||||
|
this.state.loading = false;
|
||||||
this.setState(this.state);
|
this.setState(this.state);
|
||||||
}
|
}
|
||||||
} else if (res.op == UserOperation.SaveUserSettings) {
|
} else if (res.op == UserOperation.SaveUserSettings) {
|
||||||
|
|
5
ui/src/utils.ts
vendored
5
ui/src/utils.ts
vendored
|
@ -825,6 +825,11 @@ export function editPostRes(data: PostResponse, post: Post) {
|
||||||
post.url = data.post.url;
|
post.url = data.post.url;
|
||||||
post.name = data.post.name;
|
post.name = data.post.name;
|
||||||
post.nsfw = data.post.nsfw;
|
post.nsfw = data.post.nsfw;
|
||||||
|
post.deleted = data.post.deleted;
|
||||||
|
post.removed = data.post.removed;
|
||||||
|
post.stickied = data.post.stickied;
|
||||||
|
post.body = data.post.body;
|
||||||
|
post.locked = data.post.locked;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue