mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-30 10:52:18 +00:00
Update Timeline.vue component, remove posts after muting or blocking an account
This commit is contained in:
parent
cdee4f863f
commit
45f52ece0a
1 changed files with 4 additions and 3 deletions
|
@ -405,11 +405,11 @@
|
||||||
if($('body').hasClass('loggedIn') == false) {
|
if($('body').hasClass('loggedIn') == false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
axios.post('/i/mute', {
|
axios.post('/i/mute', {
|
||||||
type: 'user',
|
type: 'user',
|
||||||
item: status.account.id
|
item: status.account.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
this.feed = this.feed.filter(s => s.account.id !== status.account.id);
|
||||||
swal('Success', 'You have successfully muted ' + status.account.acct, 'success');
|
swal('Success', 'You have successfully muted ' + status.account.acct, 'success');
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
swal('Error', 'Something went wrong. Please try again later.', 'error');
|
swal('Error', 'Something went wrong. Please try again later.', 'error');
|
||||||
|
@ -425,7 +425,8 @@
|
||||||
type: 'user',
|
type: 'user',
|
||||||
item: status.account.id
|
item: status.account.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
swal('Success', 'You have successfully blocked ' + status.account.acct, 'success.');
|
this.feed = this.feed.filter(s => s.account.id !== status.account.id);
|
||||||
|
swal('Success', 'You have successfully blocked ' + status.account.acct, 'success');
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
swal('Error', 'Something went wrong. Please try again later.', 'error');
|
swal('Error', 'Something went wrong. Please try again later.', 'error');
|
||||||
});
|
});
|
||||||
|
@ -440,8 +441,8 @@
|
||||||
type: 'status',
|
type: 'status',
|
||||||
item: status.id
|
item: status.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
swal('Success', 'You have successfully deleted this post', 'success');
|
|
||||||
this.feed.splice(index,1);
|
this.feed.splice(index,1);
|
||||||
|
swal('Success', 'You have successfully deleted this post', 'success');
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
swal('Error', 'Something went wrong. Please try again later.', 'error');
|
swal('Error', 'Something went wrong. Please try again later.', 'error');
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue