forked from Mirrors/elk
feat: add account share
This commit is contained in:
parent
be446f5433
commit
112502155e
1 changed files with 12 additions and 0 deletions
|
@ -18,6 +18,11 @@ const isSelf = $(useSelfAccount(() => account))
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
const { client } = $(useMasto())
|
const { client } = $(useMasto())
|
||||||
const useStarFavoriteIcon = usePreferences('useStarFavoriteIcon')
|
const useStarFavoriteIcon = usePreferences('useStarFavoriteIcon')
|
||||||
|
const { share, isSupported: isShareSupported } = useShare()
|
||||||
|
|
||||||
|
function shareAccount() {
|
||||||
|
share({ url: location.href })
|
||||||
|
}
|
||||||
|
|
||||||
async function toggleReblogs() {
|
async function toggleReblogs() {
|
||||||
if (!relationship!.showingReblogs && await openConfirmDialog({
|
if (!relationship!.showingReblogs && await openConfirmDialog({
|
||||||
|
@ -61,6 +66,13 @@ async function removeUserNote() {
|
||||||
:command="command"
|
:command="command"
|
||||||
/>
|
/>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
|
<CommonDropdownItem
|
||||||
|
v-if="isShareSupported"
|
||||||
|
:text="`Share @${account.acct}`"
|
||||||
|
icon="i-ri:share-line"
|
||||||
|
:command="command"
|
||||||
|
@click="shareAccount()"
|
||||||
|
/>
|
||||||
|
|
||||||
<template v-if="currentUser">
|
<template v-if="currentUser">
|
||||||
<template v-if="!isSelf">
|
<template v-if="!isSelf">
|
||||||
|
|
Loading…
Reference in a new issue