diff --git a/resources/assets/js/components/PostMenu.vue b/resources/assets/js/components/PostMenu.vue
index b219978ad..20a7472a9 100644
--- a/resources/assets/js/components/PostMenu.vue
+++ b/resources/assets/js/components/PostMenu.vue
@@ -12,8 +12,8 @@
Report
- Mute Profile
- Block Profile
+ Mute Profile
+ Block Profile
@@ -187,6 +187,36 @@
});
break;
}
+ },
+
+ muteProfile(status) {
+ if($('body').hasClass('loggedIn') == false) {
+ return;
+ }
+
+ axios.post('/i/mute', {
+ type: 'user',
+ item: status.account.id
+ }).then(res => {
+ swal('Success', 'You have successfully muted ' + status.account.acct, 'success');
+ }).catch(err => {
+ swal('Error', 'Something went wrong. Please try again later.', 'error');
+ });
+ },
+
+ blockProfile(status) {
+ if($('body').hasClass('loggedIn') == false) {
+ return;
+ }
+
+ axios.post('/i/block', {
+ type: 'user',
+ item: status.account.id
+ }).then(res => {
+ swal('Success', 'You have successfully blocked ' + status.account.acct, 'success');
+ }).catch(err => {
+ swal('Error', 'Something went wrong. Please try again later.', 'error');
+ });
}
}
}