enhance: プロキシアカウントであることを表示するように
This commit is contained in:
parent
b1073714ba
commit
a7ddf6aed2
|
@ -28,6 +28,7 @@ import type {
|
|||
FollowingsRepository,
|
||||
FollowRequestsRepository,
|
||||
MiFollowing,
|
||||
MiMeta,
|
||||
MiUserNotePining,
|
||||
MiUserProfile,
|
||||
MutingsRepository,
|
||||
|
@ -98,6 +99,9 @@ export class UserEntityService implements OnModuleInit {
|
|||
@Inject(DI.config)
|
||||
private config: Config,
|
||||
|
||||
@Inject(DI.meta)
|
||||
private meta: MiMeta,
|
||||
|
||||
@Inject(DI.redis)
|
||||
private redisClient: Redis.Redis,
|
||||
|
||||
|
@ -490,6 +494,7 @@ export class UserEntityService implements OnModuleInit {
|
|||
}))) : [],
|
||||
isBot: user.isBot,
|
||||
isCat: user.isCat,
|
||||
isProxy: this.meta.proxyAccountId === user.id,
|
||||
requireSigninToViewContents: user.requireSigninToViewContents === false ? undefined : true,
|
||||
makeNotesFollowersOnlyBefore: user.makeNotesFollowersOnlyBefore ?? undefined,
|
||||
makeNotesHiddenBefore: user.makeNotesHiddenBefore ?? undefined,
|
||||
|
|
|
@ -115,6 +115,10 @@ export const packedUserLiteSchema = {
|
|||
type: 'boolean',
|
||||
nullable: false, optional: true,
|
||||
},
|
||||
isProxy: {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: true,
|
||||
},
|
||||
requireSigninToViewContents: {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: true,
|
||||
|
|
|
@ -40,6 +40,7 @@ describe('ユーザー', () => {
|
|||
avatarDecorations: user.avatarDecorations,
|
||||
isBot: user.isBot,
|
||||
isCat: user.isCat,
|
||||
isProxy: user.isProxy,
|
||||
instance: user.instance,
|
||||
emojis: user.emojis,
|
||||
onlineStatus: user.onlineStatus,
|
||||
|
@ -310,6 +311,7 @@ describe('ユーザー', () => {
|
|||
assert.deepStrictEqual(response.avatarDecorations, []);
|
||||
assert.strictEqual(response.isBot, false);
|
||||
assert.strictEqual(response.isCat, false);
|
||||
assert.strictEqual(response.isProxy, false);
|
||||
assert.strictEqual(response.instance, undefined);
|
||||
assert.deepStrictEqual(response.emojis, {});
|
||||
assert.strictEqual(response.onlineStatus, 'unknown');
|
||||
|
|
|
@ -26,6 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<span v-if="user.isAdmin" :title="i18n.ts.isAdmin" style="color: var(--MI_THEME-badge);"><i class="ti ti-shield"></i></span>
|
||||
<span v-if="user.isLocked" :title="i18n.ts.isLocked"><i class="ti ti-lock"></i></span>
|
||||
<span v-if="user.isBot" :title="i18n.ts.isBot"><i class="ti ti-robot"></i></span>
|
||||
<span v-if="user.isProxy" :title="i18n.ts.proxyAccount"><i class="ti ti-ghost"></i></span>
|
||||
<button v-if="$i && !isEditingMemo && !memoDraft" class="_button add-note-button" @click="showMemoTextarea">
|
||||
<i class="ti ti-edit"/> {{ i18n.ts.addMemo }}
|
||||
</button>
|
||||
|
|
|
@ -3736,6 +3736,7 @@ export type components = {
|
|||
}[];
|
||||
isBot?: boolean;
|
||||
isCat?: boolean;
|
||||
isProxy?: boolean;
|
||||
requireSigninToViewContents?: boolean;
|
||||
makeNotesFollowersOnlyBefore?: number | null;
|
||||
makeNotesHiddenBefore?: number | null;
|
||||
|
|
Loading…
Reference in New Issue