feat(account): more actions for user
This commit is contained in:
parent
b58d204199
commit
dfdf95da61
5 changed files with 105 additions and 28 deletions
|
@ -77,9 +77,6 @@ const toggleTranslation = async () => {
|
|||
const copyLink = async () => {
|
||||
await clipboard.copy(`${location.origin}${getStatusPath(status)}`)
|
||||
}
|
||||
const openInOriginal = () => {
|
||||
window.open(status.url!, '_blank')
|
||||
}
|
||||
const deleteStatus = async () => {
|
||||
// TODO confirm to delete
|
||||
|
||||
|
@ -115,16 +112,6 @@ function editStatus() {
|
|||
attachments: [],
|
||||
})
|
||||
}
|
||||
|
||||
function mention() {
|
||||
openPublishDialog({
|
||||
params: {
|
||||
...getParamsFromStatus(status),
|
||||
status: `@${status.account.acct} `,
|
||||
},
|
||||
attachments: [],
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -189,9 +176,11 @@ function mention() {
|
|||
Copy link to this post
|
||||
</CommonDropdownItem>
|
||||
|
||||
<CommonDropdownItem v-if="status.url" icon="i-ri:arrow-right-up-line" @click="openInOriginal">
|
||||
Open in original site
|
||||
</CommonDropdownItem>
|
||||
<NuxtLink :to="status.url" target="_blank">
|
||||
<CommonDropdownItem v-if="status.url" icon="i-ri:arrow-right-up-line">
|
||||
Open in original site
|
||||
</CommonDropdownItem>
|
||||
</NuxtLink>
|
||||
|
||||
<CommonDropdownItem v-if="isTranslationEnabled && status.language !== languageCode" icon="i-ri:translate" @click="toggleTranslation">
|
||||
<template v-if="!translation.visible">
|
||||
|
@ -232,7 +221,7 @@ function mention() {
|
|||
<template v-else>
|
||||
<CommonDropdownItem
|
||||
icon="i-ri:at-line"
|
||||
@click="mention"
|
||||
@click="mentionUser(status.account)"
|
||||
>
|
||||
Mention @{{ status.account.acct }}
|
||||
</CommonDropdownItem>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue