enhance(frontend): チャットが開放されていない場合のUIを改善
This commit is contained in:
parent
30e0259062
commit
0c14250678
|
@ -5472,6 +5472,10 @@ export interface Locale extends ILocale {
|
||||||
* ルームを削除
|
* ルームを削除
|
||||||
*/
|
*/
|
||||||
"deleteRoom": string;
|
"deleteRoom": string;
|
||||||
|
/**
|
||||||
|
* このサーバー、またはこのアカウントでチャットは有効化されていません。
|
||||||
|
*/
|
||||||
|
"chatNotAvailableForThisAccountOrServer": string;
|
||||||
/**
|
/**
|
||||||
* このユーザーとのチャットを開始できません
|
* このユーザーとのチャットを開始できません
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1365,6 +1365,7 @@ _chat:
|
||||||
newline: "改行"
|
newline: "改行"
|
||||||
muteThisRoom: "このルームをミュート"
|
muteThisRoom: "このルームをミュート"
|
||||||
deleteRoom: "ルームを削除"
|
deleteRoom: "ルームを削除"
|
||||||
|
chatNotAvailableForThisAccountOrServer: "このサーバー、またはこのアカウントでチャットは有効化されていません。"
|
||||||
cannotChatWithTheUser: "このユーザーとのチャットを開始できません"
|
cannotChatWithTheUser: "このユーザーとのチャットを開始できません"
|
||||||
cannotChatWithTheUser_description: "チャットが使えない状態になっているか、相手がチャットを開放していません。"
|
cannotChatWithTheUser_description: "チャットが使えない状態になっているか、相手がチャットを開放していません。"
|
||||||
chatWithThisUser: "チャットする"
|
chatWithThisUser: "チャットする"
|
||||||
|
|
|
@ -5,7 +5,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="_gaps">
|
<div class="_gaps">
|
||||||
<MkButton primary gradate rounded :class="$style.start" @click="start"><i class="ti ti-plus"></i> {{ i18n.ts.startChat }}</MkButton>
|
<MkButton v-if="$i.policies.canChat" primary gradate rounded :class="$style.start" @click="start"><i class="ti ti-plus"></i> {{ i18n.ts.startChat }}</MkButton>
|
||||||
|
|
||||||
|
<MkInfo v-else>{{ i18n.ts._chat.chatNotAvailableForThisAccountOrServer }}</MkInfo>
|
||||||
|
|
||||||
<MkAd :prefer="['horizontal', 'horizontal-big']"/>
|
<MkAd :prefer="['horizontal', 'horizontal-big']"/>
|
||||||
|
|
||||||
|
@ -78,6 +80,7 @@ import * as os from '@/os.js';
|
||||||
import { updateCurrentAccountPartial } from '@/accounts.js';
|
import { updateCurrentAccountPartial } from '@/accounts.js';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
||||||
|
import MkInfo from '@/components/MkInfo.vue';
|
||||||
|
|
||||||
const $i = ensureSignin();
|
const $i = ensureSignin();
|
||||||
|
|
||||||
|
|
|
@ -362,12 +362,18 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router
|
||||||
const canonical = user.host === null ? `@${user.username}` : `@${user.username}@${user.host}`;
|
const canonical = user.host === null ? `@${user.username}` : `@${user.username}@${user.host}`;
|
||||||
os.post({ specified: user, initialText: `${canonical} ` });
|
os.post({ specified: user, initialText: `${canonical} ` });
|
||||||
},
|
},
|
||||||
}, {
|
});
|
||||||
|
|
||||||
|
if ($i.policies.canChat) {
|
||||||
|
menuItems.push({
|
||||||
type: 'link',
|
type: 'link',
|
||||||
icon: 'ti ti-messages',
|
icon: 'ti ti-messages',
|
||||||
text: i18n.ts._chat.chatWithThisUser,
|
text: i18n.ts._chat.chatWithThisUser,
|
||||||
to: `/chat/user/${user.id}`,
|
to: `/chat/user/${user.id}`,
|
||||||
}, { type: 'divider' }, {
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
menuItems.push({ type: 'divider' }, {
|
||||||
icon: user.isMuted ? 'ti ti-eye' : 'ti ti-eye-off',
|
icon: user.isMuted ? 'ti ti-eye' : 'ti ti-eye-off',
|
||||||
text: user.isMuted ? i18n.ts.unmute : i18n.ts.mute,
|
text: user.isMuted ? i18n.ts.unmute : i18n.ts.mute,
|
||||||
action: toggleMute,
|
action: toggleMute,
|
||||||
|
|
Loading…
Reference in New Issue