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"
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 {