merge: Indicate that a user is blocked / muted (resolves #557) (!659)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/659

Closes #557

Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
Marie 2024-10-06 10:48:48 +00:00
commit 88f3f0c7eb
4 changed files with 40 additions and 13 deletions

View File

@ -143,8 +143,10 @@ markAsSensitive: "Mark as sensitive"
unmarkAsSensitive: "Unmark as sensitive"
enterFileName: "Enter filename"
mute: "Mute"
muted: "Muted"
unmute: "Unmute"
renoteMute: "Mute Boosts"
renoteMuted: "Boosts muted"
renoteUnmute: "Unmute Boosts"
block: "Block"
unblock: "Unblock"

20
locales/index.d.ts vendored
View File

@ -588,6 +588,10 @@ export interface Locale extends ILocale {
*
*/
"mute": string;
/**
* Muted
*/
"muted": string;
/**
*
*/
@ -596,6 +600,10 @@ export interface Locale extends ILocale {
*
*/
"renoteMute": string;
/**
* Boosts muted
*/
"renoteMuted": string;
/**
*
*/
@ -3128,6 +3136,10 @@ export interface Locale extends ILocale {
*
*/
"showTickerOnReplies": string;
/**
*
*/
"disableCatSpeak": string;
/**
* MFMの検索エンジン
*/
@ -4429,10 +4441,6 @@ export interface Locale extends ILocale {
*
*/
"disableFederationOk": string;
/**
*
*/
"disableCatSpeak": string;
/**
*
*/
@ -5777,7 +5785,7 @@ export interface Locale extends ILocale {
*/
"social": string;
/**
*
* 稿
*/
"bubble": string;
/**
@ -9139,7 +9147,7 @@ export interface Locale extends ILocale {
*/
"global": string;
/**
*
*
*/
"bubble": string;
};

View File

@ -143,8 +143,10 @@ markAsSensitive: "センシティブとして設定"
unmarkAsSensitive: "センシティブを解除する"
enterFileName: "ファイル名を入力"
mute: "ミュート"
muted: "Muted"
unmute: "ミュート解除"
renoteMute: "ブーストをミュート"
renoteMuted: "Boosts muted"
renoteUnmute: "ブーストのミュートを解除"
block: "ブロック"
unblock: "ブロック解除"

View File

@ -30,7 +30,12 @@ SPDX-License-Identifier: AGPL-3.0-only
</button>
</div>
</div>
<span v-if="$i && $i.id != user.id && user.isFollowed" class="followed">{{ i18n.ts.followsYou }}</span>
<div v-if="$i && $i.id != user.id" class="info-badges">
<span v-if="user.isFollowed">{{ i18n.ts.followsYou }}</span>
<span v-if="user.isMuted">{{ i18n.ts.muted }}</span>
<span v-if="user.isRenoteMuted">{{ i18n.ts.renoteMuted }}</span>
<span v-if="user.isBlocking">{{ i18n.ts.blocked }}</span>
</div>
<div class="actions">
<button class="menu _button" @click="menu"><i class="ti ti-dots"></i></button>
<MkFollowButton v-if="$i?.id != user.id" v-model:user="user" :inline="true" :transparent="false" :full="true" class="koudoku"/>
@ -445,15 +450,25 @@ onUnmounted(() => {
background: linear-gradient(transparent, rgba(#000, 0.7));
}
> .followed {
> .info-badges {
position: absolute;
top: 12px;
left: 12px;
padding: 4px 8px;
color: #fff;
background: rgba(0, 0, 0, 0.7);
font-size: 0.7em;
border-radius: var(--radius-sm);
display: flex;
flex-direction: row;
> * {
padding: 4px 8px;
color: #fff;
background: rgba(0, 0, 0, 0.7);
font-size: 0.7em;
border-radius: var(--radius-sm);
}
> :not(:first-child) {
margin-left: 8px;
}
}
> .actions {