From 8544bcbda6d2ba195dd66ebf9cd226d96f48eb43 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Thu, 15 Jul 2021 23:18:40 -0600 Subject: [PATCH] Update ContextMenu, add View Profile link --- .../js/components/partials/ContextMenu.vue | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/resources/assets/js/components/partials/ContextMenu.vue b/resources/assets/js/components/partials/ContextMenu.vue index f5d966b62..9cdfd0809 100644 --- a/resources/assets/js/components/partials/ContextMenu.vue +++ b/resources/assets/js/components/partials/ContextMenu.vue @@ -12,6 +12,7 @@
View Post
+
View Profile
Share
@@ -279,6 +280,13 @@ return; }, + ctxMenuGoToProfile() { + let status = this.ctxMenuStatus; + window.location.href = this.profileUrl(status); + this.closeCtxMenu(); + return; + }, + ctxMenuFollow() { let id = this.ctxMenuStatus.account.id; axios.post('/i/follow', { @@ -633,6 +641,14 @@ return '/i/web/post/_/' + status.account.id + '/' + status.id; }, + profileUrl(status) { + if(status.local == true) { + return status.account.url; + } + + return '/i/web/profile/_/' + status.account.id; + }, + deletePost(status) { if($('body').hasClass('loggedIn') == false || this.ownerOrAdmin(status) == false) { return;