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 relationship!.domainBlocking = !relationship!.domainBlocking
await masto.v1.domainBlocks[relationship!.domainBlocking ? 'block' : 'unblock'](getServerName(account)) 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> </script>
<template> <template>
@ -68,6 +75,21 @@ const toggleBlockDomain = async () => {
@click="directMessageUser(account)" @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 <CommonDropdownItem
v-if="!relationship?.muting" v-if="!relationship?.muting"
:text="$t('menu.mute_account', [`@${account.acct}`])" :text="$t('menu.mute_account', [`@${account.acct}`])"

View file

@ -139,12 +139,14 @@
}, },
"direct_message_account": "Direct message {0}", "direct_message_account": "Direct message {0}",
"edit": "Edit", "edit": "Edit",
"hide_reblogs": "Hide boosts from {0}",
"mention_account": "Mention {0}", "mention_account": "Mention {0}",
"mute_account": "Mute {0}", "mute_account": "Mute {0}",
"mute_conversation": "Mute this post", "mute_conversation": "Mute this post",
"open_in_original_site": "Open in original site", "open_in_original_site": "Open in original site",
"pin_on_profile": "Pin on profile", "pin_on_profile": "Pin on profile",
"share_post": "Share this post", "share_post": "Share this post",
"show_reblogs": "Show boosts from {0}",
"show_untranslated": "Show untranslated", "show_untranslated": "Show untranslated",
"toggle_theme": { "toggle_theme": {
"dark": "Toggle dark mode", "dark": "Toggle dark mode",