forked from Mirrors/elk
feat(profile): hide user's boosts toogle (#865)
Co-authored-by: 三咲智子 <sxzz@sxzz.moe>
This commit is contained in:
parent
fd2c433644
commit
7e17bdfd83
2 changed files with 24 additions and 0 deletions
|
@ -34,6 +34,13 @@ const toggleBlockDomain = async () => {
|
|||
relationship!.domainBlocking = !relationship!.domainBlocking
|
||||
await masto.v1.domainBlocks[relationship!.domainBlocking ? 'block' : 'unblock'](getServerName(account))
|
||||
}
|
||||
|
||||
const toggleReblogs = async () => {
|
||||
// TODO: Add confirmation
|
||||
|
||||
const showingReblogs = !relationship?.showingReblogs
|
||||
relationship = await masto.v1.accounts.follow(account.id, { reblogs: showingReblogs })
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -68,6 +75,21 @@ const toggleBlockDomain = async () => {
|
|||
@click="directMessageUser(account)"
|
||||
/>
|
||||
|
||||
<CommonDropdownItem
|
||||
v-if="!relationship?.showingReblogs"
|
||||
icon="i-ri:repeat-line"
|
||||
:text="$t('menu.show_reblogs', [`@${account.acct}`])"
|
||||
:command="command"
|
||||
@click="toggleReblogs"
|
||||
/>
|
||||
<CommonDropdownItem
|
||||
v-else
|
||||
:text="$t('menu.hide_reblogs', [`@${account.acct}`])"
|
||||
icon="i-ri:repeat-line"
|
||||
:command="command"
|
||||
@click="toggleReblogs"
|
||||
/>
|
||||
|
||||
<CommonDropdownItem
|
||||
v-if="!relationship?.muting"
|
||||
:text="$t('menu.mute_account', [`@${account.acct}`])"
|
||||
|
|
|
@ -139,12 +139,14 @@
|
|||
},
|
||||
"direct_message_account": "Direct message {0}",
|
||||
"edit": "Edit",
|
||||
"hide_reblogs": "Hide boosts from {0}",
|
||||
"mention_account": "Mention {0}",
|
||||
"mute_account": "Mute {0}",
|
||||
"mute_conversation": "Mute this post",
|
||||
"open_in_original_site": "Open in original site",
|
||||
"pin_on_profile": "Pin on profile",
|
||||
"share_post": "Share this post",
|
||||
"show_reblogs": "Show boosts from {0}",
|
||||
"show_untranslated": "Show untranslated",
|
||||
"toggle_theme": {
|
||||
"dark": "Toggle dark mode",
|
||||
|
|
Loading…
Reference in a new issue