Skip to content

Commit

Permalink
Update PostComponent, fixes #2351
Browse files Browse the repository at this point in the history
  • Loading branch information
dansup committed Sep 22, 2020
1 parent 06f0f80 commit 7a62a42
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions resources/assets/js/components/PostComponent.vue
Expand Up @@ -40,6 +40,7 @@
<span class="fas fa-ellipsis-v text-muted"></span>
</button>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item font-weight-bold" @click="copyPostUrl()">Copy Post Url</a>
<a class="dropdown-item font-weight-bold" @click="showEmbedPostModal()">Embed</a>
<div v-if="!owner()">
<a class="dropdown-item font-weight-bold" :href="reportUrl()">Report</a>
Expand Down Expand Up @@ -112,6 +113,7 @@
<span class="fas fa-ellipsis-v text-muted"></span>
</button>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item font-weight-bold" @click="copyPostUrl()">Copy Post Url</a>
<a class="dropdown-item font-weight-bold" @click="showEmbedPostModal()">Embed</a>
<span v-if="!owner()">
<a class="dropdown-item font-weight-bold" :href="reportUrl()">Report</a>
Expand Down Expand Up @@ -1455,6 +1457,10 @@ export default {
}).catch(err => {
swal('An Error Occurred', 'Please try again later.', 'error');
});
},
copyPostUrl() {
navigator.clipboard.writeText(this.statusUrl);
return;
}
},
}
Expand Down

0 comments on commit 7a62a42

Please sign in to comment.