mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-03-21 03:30:42 +00:00
refactor
This commit is contained in:
@@ -471,8 +471,8 @@ export class UserEntityService implements OnModuleInit {
|
||||
(profile.followersVisibility === 'followers') && (relation && relation.isFollowing) ? user.followersCount :
|
||||
null;
|
||||
|
||||
const isModerator = isMe && isDetailed ? this.roleService.isModerator(user) : null;
|
||||
const isAdmin = isMe && isDetailed ? this.roleService.isAdministrator(user) : null;
|
||||
const isModerator = isMe && isDetailed ? this.roleService.isModerator(user) : false; // この場合undefinedにしたい(レスポンスに含める必要がないため)が、念のため後方互換性を確保
|
||||
const isAdmin = isMe && isDetailed ? this.roleService.isAdministrator(user) : false; // この場合undefinedにしたい(レスポンスに含める必要がないため)が、念のため後方互換性を確保
|
||||
const unreadAnnouncements = isMe && isDetailed ?
|
||||
(await this.announcementService.getUnreadAnnouncements(user)).map((announcement) => ({
|
||||
createdAt: this.idService.parse(announcement.id).date.toISOString(),
|
||||
|
||||
@@ -465,11 +465,11 @@ export const packedMeDetailedOnlySchema = {
|
||||
},
|
||||
isModerator: {
|
||||
type: 'boolean',
|
||||
nullable: true, optional: false,
|
||||
nullable: false, optional: false, // optionalにしたいが念のため後方互換性を確保
|
||||
},
|
||||
isAdmin: {
|
||||
type: 'boolean',
|
||||
nullable: true, optional: false,
|
||||
nullable: false, optional: false, // optionalにしたいが念のため後方互換性を確保
|
||||
},
|
||||
injectFeaturedNote: {
|
||||
type: 'boolean',
|
||||
|
||||
@@ -34,7 +34,7 @@ const props = withDefaults(defineProps<{
|
||||
limit: 50,
|
||||
});
|
||||
|
||||
const chartSrc = ref('per-user-notes');
|
||||
const chartSrc = ref<'per-user-notes' | 'per-user-pv'>('per-user-notes');
|
||||
|
||||
function showMenu(ev: MouseEvent) {
|
||||
os.popupMenu([{
|
||||
|
||||
Reference in New Issue
Block a user