From 0d34ffa142051da3ed1f06e37bd9a17d4c3dc8c4 Mon Sep 17 00:00:00 2001
From: Daniel Supernault
Date: Sun, 28 Apr 2019 22:36:28 -0600
Subject: [PATCH] Update Profile, add unfollow button to following modal
---
resources/assets/js/components/Profile.vue | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/resources/assets/js/components/Profile.vue b/resources/assets/js/components/Profile.vue
index 4507056f..3dad3960 100644
--- a/resources/assets/js/components/Profile.vue
+++ b/resources/assets/js/components/Profile.vue
@@ -397,8 +397,16 @@
{{user.display_name}}
+
+
+
+
You are not following anyone.
+
+
@@ -1025,6 +1033,17 @@ export default {
return;
}
this.$refs.visitorContextMenu.show();
+ },
+
+ followModalAction(id, index, type = 'following') {
+ axios.post('/i/follow', {
+ item: id
+ }).then(res => {
+ if(type == 'following') {
+ this.following.splice(index, 1);
+ this.profile.following_count--;
+ }
+ })
}
}
}