feat: add account share

pull/2194/head
三咲智子 Kevin Deng 2023-07-03 15:58:48 +08:00
rodzic be446f5433
commit 112502155e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 69992F2250DFD93E
1 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -18,6 +18,11 @@ const isSelf = $(useSelfAccount(() => account))
const { t } = useI18n()
const { client } = $(useMasto())
const useStarFavoriteIcon = usePreferences('useStarFavoriteIcon')
const { share, isSupported: isShareSupported } = useShare()
function shareAccount() {
share({ url: location.href })
}
async function toggleReblogs() {
if (!relationship!.showingReblogs && await openConfirmDialog({
@ -61,6 +66,13 @@ async function removeUserNote() {
:command="command"
/>
</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="!isSelf">