Browse Source

Update ContextMenu, add missing statusUrl method

Daniel Supernault 4 năm trước cách đây
mục cha
commit
3cffdb116f
1 tập tin đã thay đổi với 9 bổ sung0 xóa
  1. 9 0
      resources/assets/js/components/partials/ContextMenu.vue

+ 9 - 0
resources/assets/js/components/partials/ContextMenu.vue

@@ -583,6 +583,7 @@
 									swal('Success', 'Successfully marked account as spammer', 'success');
 									self.ctxModMenuClose();
 								}).catch(err => {
+									console.log(err);
 									self.ctxModMenuClose();
 									swal(
 										'Error',
@@ -617,6 +618,14 @@
 					swal('Error', 'Something went wrong, please try again later.', 'error');
 				});
 			},
+
+			statusUrl(status) {
+				if(status.local == true) {
+					return status.url;
+				}
+
+				return '/i/web/post/_/' + status.account.id + '/' + status.id;
+			}
 		}
 	}
 </script>