entitity -> entity
This commit is contained in:
parent
2444b52892
commit
dacf79191e
|
@ -83,7 +83,7 @@ export type MiNotification = {
|
|||
type: 'exportCompleted';
|
||||
id: string;
|
||||
createdAt: string;
|
||||
exportedEntitity: typeof exportableEntities[number];
|
||||
exportedEntity: typeof exportableEntities[number];
|
||||
fileId: MiDriveFile['id'];
|
||||
} | {
|
||||
type: 'app';
|
||||
|
|
|
@ -307,7 +307,7 @@ export const packedNotificationSchema = {
|
|||
optional: false, nullable: false,
|
||||
enum: ['exportCompleted'],
|
||||
},
|
||||
exportedEntitity: {
|
||||
exportedEntity: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
enum: exportableEntities,
|
||||
|
|
|
@ -99,7 +99,7 @@ export class ExportAntennasProcessorService {
|
|||
this.logger.succ('Exported to: ' + driveFile.id);
|
||||
|
||||
this.notificationService.createNotification(user.id, 'exportCompleted', {
|
||||
exportedEntitity: 'antenna',
|
||||
exportedEntity: 'antenna',
|
||||
fileId: driveFile.id,
|
||||
});
|
||||
} finally {
|
||||
|
|
|
@ -113,7 +113,7 @@ export class ExportBlockingProcessorService {
|
|||
this.logger.succ(`Exported to: ${driveFile.id}`);
|
||||
|
||||
this.notificationService.createNotification(user.id, 'exportCompleted', {
|
||||
exportedEntitity: 'blocking',
|
||||
exportedEntity: 'blocking',
|
||||
fileId: driveFile.id,
|
||||
});
|
||||
} finally {
|
||||
|
|
|
@ -83,7 +83,7 @@ export class ExportClipsProcessorService {
|
|||
this.logger.succ(`Exported to: ${driveFile.id}`);
|
||||
|
||||
this.notificationService.createNotification(user.id, 'exportCompleted', {
|
||||
exportedEntitity: 'clip',
|
||||
exportedEntity: 'clip',
|
||||
fileId: driveFile.id,
|
||||
});
|
||||
} finally {
|
||||
|
|
|
@ -138,7 +138,7 @@ export class ExportCustomEmojisProcessorService {
|
|||
this.logger.succ(`Exported to: ${driveFile.id}`);
|
||||
|
||||
this.notificationService.createNotification(user.id, 'exportCompleted', {
|
||||
exportedEntitity: 'customEmoji',
|
||||
exportedEntity: 'customEmoji',
|
||||
fileId: driveFile.id,
|
||||
});
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ export class ExportFavoritesProcessorService {
|
|||
this.logger.succ(`Exported to: ${driveFile.id}`);
|
||||
|
||||
this.notificationService.createNotification(user.id, 'exportCompleted', {
|
||||
exportedEntitity: 'favorite',
|
||||
exportedEntity: 'favorite',
|
||||
fileId: driveFile.id,
|
||||
});
|
||||
} finally {
|
||||
|
|
|
@ -117,7 +117,7 @@ export class ExportFollowingProcessorService {
|
|||
this.logger.succ(`Exported to: ${driveFile.id}`);
|
||||
|
||||
this.notificationService.createNotification(user.id, 'exportCompleted', {
|
||||
exportedEntitity: 'following',
|
||||
exportedEntity: 'following',
|
||||
fileId: driveFile.id,
|
||||
});
|
||||
} finally {
|
||||
|
|
|
@ -114,7 +114,7 @@ export class ExportMutingProcessorService {
|
|||
this.logger.succ(`Exported to: ${driveFile.id}`);
|
||||
|
||||
this.notificationService.createNotification(user.id, 'exportCompleted', {
|
||||
exportedEntitity: 'muting',
|
||||
exportedEntity: 'muting',
|
||||
fileId: driveFile.id,
|
||||
});
|
||||
} finally {
|
||||
|
|
|
@ -154,7 +154,7 @@ export class ExportNotesProcessorService {
|
|||
this.logger.succ(`Exported to: ${driveFile.id}`);
|
||||
|
||||
this.notificationService.createNotification(user.id, 'exportCompleted', {
|
||||
exportedEntitity: 'note',
|
||||
exportedEntity: 'note',
|
||||
fileId: driveFile.id,
|
||||
});
|
||||
} finally {
|
||||
|
|
|
@ -93,7 +93,7 @@ export class ExportUserListsProcessorService {
|
|||
this.logger.succ(`Exported to: ${driveFile.id}`);
|
||||
|
||||
this.notificationService.createNotification(user.id, 'exportCompleted', {
|
||||
exportedEntitity: 'userList',
|
||||
exportedEntity: 'userList',
|
||||
fileId: driveFile.id,
|
||||
});
|
||||
} finally {
|
||||
|
|
|
@ -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 === 'achievementEarned'">{{ i18n.ts._notification.achievementEarned }}</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>
|
||||
<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>
|
||||
|
@ -180,7 +180,7 @@ const exportEntityName = {
|
|||
muting: i18n.ts.mutedUsers,
|
||||
note: i18n.ts.notes,
|
||||
userList: i18n.ts.lists,
|
||||
} as const satisfies Record<ExportCompletedNotification['exportedEntitity'], string>;
|
||||
} as const satisfies Record<ExportCompletedNotification['exportedEntity'], string>;
|
||||
|
||||
const followRequestDone = ref(false);
|
||||
|
||||
|
|
|
@ -4262,7 +4262,7 @@ export type components = {
|
|||
/** @enum {string} */
|
||||
type: 'exportCompleted';
|
||||
/** @enum {string} */
|
||||
exportedEntitity: 'antenna' | 'blocking' | 'clip' | 'customEmoji' | 'favorite' | 'following' | 'muting' | 'note' | 'userList';
|
||||
exportedEntity: 'antenna' | 'blocking' | 'clip' | 'customEmoji' | 'favorite' | 'following' | 'muting' | 'note' | 'userList';
|
||||
/** Format: id */
|
||||
fileId: string;
|
||||
}) | ({
|
||||
|
|
|
@ -221,9 +221,9 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif
|
|||
muting: i18n.ts.mutedUsers,
|
||||
note: i18n.ts.notes,
|
||||
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'),
|
||||
data,
|
||||
}];
|
||||
|
|
Loading…
Reference in New Issue