entitity -> entity

This commit is contained in:
kakkokari-gtyih 2024-09-01 15:01:30 +09:00
parent 2444b52892
commit dacf79191e
14 changed files with 16 additions and 16 deletions

View File

@ -83,7 +83,7 @@ export type MiNotification = {
type: 'exportCompleted'; type: 'exportCompleted';
id: string; id: string;
createdAt: string; createdAt: string;
exportedEntitity: typeof exportableEntities[number]; exportedEntity: typeof exportableEntities[number];
fileId: MiDriveFile['id']; fileId: MiDriveFile['id'];
} | { } | {
type: 'app'; type: 'app';

View File

@ -307,7 +307,7 @@ export const packedNotificationSchema = {
optional: false, nullable: false, optional: false, nullable: false,
enum: ['exportCompleted'], enum: ['exportCompleted'],
}, },
exportedEntitity: { exportedEntity: {
type: 'string', type: 'string',
optional: false, nullable: false, optional: false, nullable: false,
enum: exportableEntities, enum: exportableEntities,

View File

@ -99,7 +99,7 @@ export class ExportAntennasProcessorService {
this.logger.succ('Exported to: ' + driveFile.id); this.logger.succ('Exported to: ' + driveFile.id);
this.notificationService.createNotification(user.id, 'exportCompleted', { this.notificationService.createNotification(user.id, 'exportCompleted', {
exportedEntitity: 'antenna', exportedEntity: 'antenna',
fileId: driveFile.id, fileId: driveFile.id,
}); });
} finally { } finally {

View File

@ -113,7 +113,7 @@ export class ExportBlockingProcessorService {
this.logger.succ(`Exported to: ${driveFile.id}`); this.logger.succ(`Exported to: ${driveFile.id}`);
this.notificationService.createNotification(user.id, 'exportCompleted', { this.notificationService.createNotification(user.id, 'exportCompleted', {
exportedEntitity: 'blocking', exportedEntity: 'blocking',
fileId: driveFile.id, fileId: driveFile.id,
}); });
} finally { } finally {

View File

@ -83,7 +83,7 @@ export class ExportClipsProcessorService {
this.logger.succ(`Exported to: ${driveFile.id}`); this.logger.succ(`Exported to: ${driveFile.id}`);
this.notificationService.createNotification(user.id, 'exportCompleted', { this.notificationService.createNotification(user.id, 'exportCompleted', {
exportedEntitity: 'clip', exportedEntity: 'clip',
fileId: driveFile.id, fileId: driveFile.id,
}); });
} finally { } finally {

View File

@ -138,7 +138,7 @@ export class ExportCustomEmojisProcessorService {
this.logger.succ(`Exported to: ${driveFile.id}`); this.logger.succ(`Exported to: ${driveFile.id}`);
this.notificationService.createNotification(user.id, 'exportCompleted', { this.notificationService.createNotification(user.id, 'exportCompleted', {
exportedEntitity: 'customEmoji', exportedEntity: 'customEmoji',
fileId: driveFile.id, fileId: driveFile.id,
}); });

View File

@ -127,7 +127,7 @@ export class ExportFavoritesProcessorService {
this.logger.succ(`Exported to: ${driveFile.id}`); this.logger.succ(`Exported to: ${driveFile.id}`);
this.notificationService.createNotification(user.id, 'exportCompleted', { this.notificationService.createNotification(user.id, 'exportCompleted', {
exportedEntitity: 'favorite', exportedEntity: 'favorite',
fileId: driveFile.id, fileId: driveFile.id,
}); });
} finally { } finally {

View File

@ -117,7 +117,7 @@ export class ExportFollowingProcessorService {
this.logger.succ(`Exported to: ${driveFile.id}`); this.logger.succ(`Exported to: ${driveFile.id}`);
this.notificationService.createNotification(user.id, 'exportCompleted', { this.notificationService.createNotification(user.id, 'exportCompleted', {
exportedEntitity: 'following', exportedEntity: 'following',
fileId: driveFile.id, fileId: driveFile.id,
}); });
} finally { } finally {

View File

@ -114,7 +114,7 @@ export class ExportMutingProcessorService {
this.logger.succ(`Exported to: ${driveFile.id}`); this.logger.succ(`Exported to: ${driveFile.id}`);
this.notificationService.createNotification(user.id, 'exportCompleted', { this.notificationService.createNotification(user.id, 'exportCompleted', {
exportedEntitity: 'muting', exportedEntity: 'muting',
fileId: driveFile.id, fileId: driveFile.id,
}); });
} finally { } finally {

View File

@ -154,7 +154,7 @@ export class ExportNotesProcessorService {
this.logger.succ(`Exported to: ${driveFile.id}`); this.logger.succ(`Exported to: ${driveFile.id}`);
this.notificationService.createNotification(user.id, 'exportCompleted', { this.notificationService.createNotification(user.id, 'exportCompleted', {
exportedEntitity: 'note', exportedEntity: 'note',
fileId: driveFile.id, fileId: driveFile.id,
}); });
} finally { } finally {

View File

@ -93,7 +93,7 @@ export class ExportUserListsProcessorService {
this.logger.succ(`Exported to: ${driveFile.id}`); this.logger.succ(`Exported to: ${driveFile.id}`);
this.notificationService.createNotification(user.id, 'exportCompleted', { this.notificationService.createNotification(user.id, 'exportCompleted', {
exportedEntitity: 'userList', exportedEntity: 'userList',
fileId: driveFile.id, fileId: driveFile.id,
}); });
} finally { } finally {

View File

@ -60,7 +60,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<span v-else-if="notification.type === 'roleAssigned'">{{ i18n.ts._notification.roleAssigned }}</span> <span v-else-if="notification.type === 'roleAssigned'">{{ i18n.ts._notification.roleAssigned }}</span>
<span v-else-if="notification.type === 'achievementEarned'">{{ i18n.ts._notification.achievementEarned }}</span> <span v-else-if="notification.type === 'achievementEarned'">{{ i18n.ts._notification.achievementEarned }}</span>
<span v-else-if="notification.type === 'test'">{{ i18n.ts._notification.testNotification }}</span> <span v-else-if="notification.type === 'test'">{{ i18n.ts._notification.testNotification }}</span>
<span v-else-if="notification.type === 'exportCompleted'">{{ i18n.tsx._notification.exportOfXCompleted({ x: exportEntityName[notification.exportedEntitity] }) }}</span> <span v-else-if="notification.type === 'exportCompleted'">{{ i18n.tsx._notification.exportOfXCompleted({ x: exportEntityName[notification.exportedEntity] }) }}</span>
<MkA v-else-if="notification.type === 'follow' || notification.type === 'mention' || notification.type === 'reply' || notification.type === 'renote' || notification.type === 'quote' || notification.type === 'reaction' || notification.type === 'receiveFollowRequest' || notification.type === 'followRequestAccepted'" v-user-preview="notification.user.id" :class="$style.headerName" :to="userPage(notification.user)"><MkUserName :user="notification.user"/></MkA> <MkA v-else-if="notification.type === 'follow' || notification.type === 'mention' || notification.type === 'reply' || notification.type === 'renote' || notification.type === 'quote' || notification.type === 'reaction' || notification.type === 'receiveFollowRequest' || notification.type === 'followRequestAccepted'" v-user-preview="notification.user.id" :class="$style.headerName" :to="userPage(notification.user)"><MkUserName :user="notification.user"/></MkA>
<span v-else-if="notification.type === 'reaction:grouped' && notification.note.reactionAcceptance === 'likeOnly'">{{ i18n.tsx._notification.likedBySomeUsers({ n: getActualReactedUsersCount(notification) }) }}</span> <span v-else-if="notification.type === 'reaction:grouped' && notification.note.reactionAcceptance === 'likeOnly'">{{ i18n.tsx._notification.likedBySomeUsers({ n: getActualReactedUsersCount(notification) }) }}</span>
<span v-else-if="notification.type === 'reaction:grouped'">{{ i18n.tsx._notification.reactedBySomeUsers({ n: getActualReactedUsersCount(notification) }) }}</span> <span v-else-if="notification.type === 'reaction:grouped'">{{ i18n.tsx._notification.reactedBySomeUsers({ n: getActualReactedUsersCount(notification) }) }}</span>
@ -180,7 +180,7 @@ const exportEntityName = {
muting: i18n.ts.mutedUsers, muting: i18n.ts.mutedUsers,
note: i18n.ts.notes, note: i18n.ts.notes,
userList: i18n.ts.lists, userList: i18n.ts.lists,
} as const satisfies Record<ExportCompletedNotification['exportedEntitity'], string>; } as const satisfies Record<ExportCompletedNotification['exportedEntity'], string>;
const followRequestDone = ref(false); const followRequestDone = ref(false);

View File

@ -4262,7 +4262,7 @@ export type components = {
/** @enum {string} */ /** @enum {string} */
type: 'exportCompleted'; type: 'exportCompleted';
/** @enum {string} */ /** @enum {string} */
exportedEntitity: 'antenna' | 'blocking' | 'clip' | 'customEmoji' | 'favorite' | 'following' | 'muting' | 'note' | 'userList'; exportedEntity: 'antenna' | 'blocking' | 'clip' | 'customEmoji' | 'favorite' | 'following' | 'muting' | 'note' | 'userList';
/** Format: id */ /** Format: id */
fileId: string; fileId: string;
}) | ({ }) | ({

View File

@ -221,9 +221,9 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
muting: i18n.ts.mutedUsers, muting: i18n.ts.mutedUsers,
note: i18n.ts.notes, note: i18n.ts.notes,
userList: i18n.ts.lists, userList: i18n.ts.lists,
} as const satisfies Record<typeof data.body.exportedEntitity, string>; } as const satisfies Record<typeof data.body.exportedEntity, string>;
return [i18n.tsx._notification.exportOfXCompleted({ x: entityName[data.body.exportedEntitity] }), { return [i18n.tsx._notification.exportOfXCompleted({ x: entityName[data.body.exportedEntity] }), {
badge: iconUrl('users'), badge: iconUrl('users'),
data, data,
}]; }];