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" unmarkAsSensitive: "Unmark as sensitive"
enterFileName: "Enter filename" enterFileName: "Enter filename"
mute: "Mute" mute: "Mute"
muted: "Muted"
unmute: "Unmute" unmute: "Unmute"
renoteMute: "Mute Boosts" renoteMute: "Mute Boosts"
renoteMuted: "Boosts muted"
renoteUnmute: "Unmute Boosts" renoteUnmute: "Unmute Boosts"
block: "Block" block: "Block"
unblock: "Unblock" unblock: "Unblock"

20
locales/index.d.ts vendored
View File

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

View File

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

View File

@ -30,7 +30,12 @@ SPDX-License-Identifier: AGPL-3.0-only
</button> </button>
</div> </div>
</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"> <div class="actions">
<button class="menu _button" @click="menu"><i class="ti ti-dots"></i></button> <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"/> <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)); background: linear-gradient(transparent, rgba(#000, 0.7));
} }
> .followed { > .info-badges {
position: absolute; position: absolute;
top: 12px; top: 12px;
left: 12px; left: 12px;
padding: 4px 8px;
color: #fff; display: flex;
background: rgba(0, 0, 0, 0.7); flex-direction: row;
font-size: 0.7em;
border-radius: var(--radius-sm); > * {
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 { > .actions {