1
0

feat(profile): hide user's boosts toogle (#865)

Co-authored-by: 三咲智子 <sxzz@sxzz.moe>
This commit is contained in:
Piotrek Tomczewski 2023-01-08 14:33:25 +01:00 committed by GitHub
parent fd2c433644
commit 7e17bdfd83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View File

@ -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}`])"

View File

@ -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",