浏览代码

Update ContextMenu, add missing statusUrl method

Daniel Supernault 4 年之前
父节点
当前提交
3cffdb116f
共有 1 个文件被更改,包括 9 次插入0 次删除
  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');
 									swal('Success', 'Successfully marked account as spammer', 'success');
 									self.ctxModMenuClose();
 									self.ctxModMenuClose();
 								}).catch(err => {
 								}).catch(err => {
+									console.log(err);
 									self.ctxModMenuClose();
 									self.ctxModMenuClose();
 									swal(
 									swal(
 										'Error',
 										'Error',
@@ -617,6 +618,14 @@
 					swal('Error', 'Something went wrong, please try again later.', 'error');
 					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>
 </script>