Add character deletion functionality with confirmation workflow
- Added `handleDeleteCharacter` method to handle character deletion with confirmation prompts. - Updated `CharacterComponent` and `CharacterDetail` to include delete button and related logic. - Localized new strings for character deletion (e.g., confirmation prompts, success/error messages). - Enhanced database repository methods (`deleteCharacter`) to handle character deletion securely. - Improved synchronization workflows to accommodate character deletion.
This commit is contained in:
@@ -74,4 +74,15 @@ ipcMain.handle('db:character:update', createHandler<UpdateCharacterData, boolean
|
||||
return Character.updateCharacter(userId, data.character, lang);
|
||||
}
|
||||
)
|
||||
);
|
||||
|
||||
// DELETE /character/delete - Delete character
|
||||
interface DeleteCharacterData {
|
||||
characterId: string;
|
||||
}
|
||||
ipcMain.handle('db:character:delete', createHandler<DeleteCharacterData, boolean>(
|
||||
function(userId: string, data: DeleteCharacterData, lang: 'fr' | 'en'): boolean {
|
||||
return Character.deleteCharacter(userId, data.characterId, lang);
|
||||
}
|
||||
)
|
||||
);
|
||||
Reference in New Issue
Block a user