mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-05 00:19:59 +00:00
feat: add 'copy original link to this post' menu item (#1318)
This commit is contained in:
parent
61f2237121
commit
c200abcc90
3 changed files with 15 additions and 0 deletions
|
@ -42,6 +42,12 @@ const copyLink = async (status: mastodon.v1.Status) => {
|
|||
await clipboard.copy(url)
|
||||
}
|
||||
|
||||
const copyOriginalLink = async (status: mastodon.v1.Status) => {
|
||||
const url = status.url
|
||||
if (url)
|
||||
await clipboard.copy(url)
|
||||
}
|
||||
|
||||
const { share, isSupported: isShareSupported } = useShare()
|
||||
const shareLink = async (status: mastodon.v1.Status) => {
|
||||
const url = getPermalinkUrl(status)
|
||||
|
@ -169,6 +175,13 @@ const showFavoritedAndBoostedBy = () => {
|
|||
@click="copyLink(status)"
|
||||
/>
|
||||
|
||||
<CommonDropdownItem
|
||||
:text="$t('menu.copy_original_link_to_post')"
|
||||
icon="i-ri:links-fill"
|
||||
:command="command"
|
||||
@click="copyOriginalLink(status)"
|
||||
/>
|
||||
|
||||
<CommonDropdownItem
|
||||
v-if="isShareSupported"
|
||||
:text="$t('menu.share_post')"
|
||||
|
|
|
@ -117,6 +117,7 @@
|
|||
"block_account": "Block {0}",
|
||||
"block_domain": "Block domain {0}",
|
||||
"copy_link_to_post": "Copy link to this post",
|
||||
"copy_original_link_to_post": "Copy original link to this post",
|
||||
"delete": "Delete",
|
||||
"delete_and_redraft": "Delete & re-draft",
|
||||
"direct_message_account": "Direct message {0}",
|
||||
|
|
|
@ -172,6 +172,7 @@
|
|||
"block_account": "Block {0}",
|
||||
"block_domain": "Block domain {0}",
|
||||
"copy_link_to_post": "Copy link to this post",
|
||||
"copy_original_link_to_post": "Copy original link to this post",
|
||||
"delete": "Delete",
|
||||
"delete_and_redraft": "Delete & re-draft",
|
||||
"direct_message_account": "Direct message {0}",
|
||||
|
|
Loading…
Reference in a new issue