indicate if a user is blocked / muted by the current user

This commit is contained in:
Hazel K 2024-10-05 19:13:09 -04:00
parent ac1e5a0fb5
commit e622ab7cc7
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 {