Implement indicator for groups

This commit is contained in:
tusooa 2023-12-27 22:54:44 -05:00
parent fd77270564
commit cc4aaccf38
No known key found for this signature in database
GPG Key ID: 42AEC43D48433C51
6 changed files with 20 additions and 19 deletions

View File

@ -51,7 +51,7 @@
</li> </li>
<li> <li>
<BooleanSetting path="hideBotIndication"> <BooleanSetting path="hideBotIndication">
{{ $t('settings.hide_bot_indication') }} {{ $t('settings.hide_actor_type_indication') }}
</BooleanSetting> </BooleanSetting>
</li> </li>
<ChoiceSetting <ChoiceSetting

View File

@ -232,17 +232,11 @@ const Status = {
muteWordHits () { muteWordHits () {
return muteWordHits(this.status, this.muteWords) return muteWordHits(this.status, this.muteWords)
}, },
rtBotStatus () {
return this.statusoid.user.bot
},
botStatus () { botStatus () {
return this.status.user.bot return this.status.user.bot
}, },
botIndicator () { showActorTypeIndicator () {
return this.botStatus && !this.hideBotIndication return !this.hideBotIndication
},
rtBotIndicator () {
return this.rtBotStatus && !this.hideBotIndication
}, },
mentionsLine () { mentionsLine () {
if (!this.headTailLinks) return [] if (!this.headTailLinks) return []

View File

@ -79,7 +79,7 @@
<UserAvatar <UserAvatar
v-if="retweet" v-if="retweet"
class="left-side repeater-avatar" class="left-side repeater-avatar"
:bot="rtBotIndicator" :show-actor-type-indicator="showActorTypeIndicator"
:better-shadow="betterShadow" :better-shadow="betterShadow"
:user="statusoid.user" :user="statusoid.user"
/> />
@ -133,7 +133,7 @@
> >
<UserAvatar <UserAvatar
class="post-avatar" class="post-avatar"
:bot="botIndicator" :show-actor-type-indicator="showActorTypeIndicator"
:compact="compact" :compact="compact"
:better-shadow="betterShadow" :better-shadow="betterShadow"
:user="status.user" :user="status.user"
@ -559,7 +559,7 @@
<UserAvatar <UserAvatar
class="post-avatar" class="post-avatar"
:compact="compact" :compact="compact"
:bot="botIndicator" :show-actor-type-indicator="showActorTypeIndicator"
/> />
</div> </div>
<div class="right-side"> <div class="right-side">

View File

@ -3,11 +3,13 @@ import StillImage from '../still-image/still-image.vue'
import { library } from '@fortawesome/fontawesome-svg-core' import { library } from '@fortawesome/fontawesome-svg-core'
import { import {
faRobot faRobot,
faPeopleGroup
} from '@fortawesome/free-solid-svg-icons' } from '@fortawesome/free-solid-svg-icons'
library.add( library.add(
faRobot faRobot,
faPeopleGroup
) )
const UserAvatar = { const UserAvatar = {
@ -15,7 +17,7 @@ const UserAvatar = {
'user', 'user',
'betterShadow', 'betterShadow',
'compact', 'compact',
'bot' 'showActorTypeIndicator'
], ],
data () { data () {
return { return {

View File

@ -18,9 +18,14 @@
:class="{ '-compact': compact }" :class="{ '-compact': compact }"
/> />
<FAIcon <FAIcon
v-if="bot" v-if="showActorTypeIndicator && user?.actor_type === 'Service'"
icon="robot" icon="robot"
class="bot-indicator" class="actor-type-indicator"
/>
<FAIcon
v-if="showActorTypeIndicator && user?.actor_type === 'Group'"
icon="people-group"
class="actor-type-indicator"
/> />
</span> </span>
</template> </template>
@ -79,7 +84,7 @@
height: 100%; height: 100%;
} }
.bot-indicator { .actor-type-indicator {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
right: 0; right: 0;

View File

@ -499,7 +499,7 @@
"hide_media_previews": "Hide media previews", "hide_media_previews": "Hide media previews",
"hide_muted_posts": "Hide posts of muted users", "hide_muted_posts": "Hide posts of muted users",
"mute_bot_posts": "Mute bot posts", "mute_bot_posts": "Mute bot posts",
"hide_bot_indication": "Hide bot indication in posts", "hide_actor_type_indication": "Hide actor type (bots, groups, etc.) indication in posts",
"hide_scrobbles": "Hide scrobbles", "hide_scrobbles": "Hide scrobbles",
"hide_all_muted_posts": "Hide muted posts", "hide_all_muted_posts": "Hide muted posts",
"max_thumbnails": "Maximum amount of thumbnails per post (empty = no limit)", "max_thumbnails": "Maximum amount of thumbnails per post (empty = no limit)",