mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 02:42:25 +08:00
feat(core): add account deletion entry to account settings (#12385)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Implemented account deletion functionality with confirmation dialogs and success notifications. - Added a warning modal for team workspace owners before account deletion. - Introduced a new, richly formatted internationalized message for account deletion confirmation. - Added a new dialog component to inform users of successful account deletion. - **Improvements** - Updated localization strings to provide detailed guidance and warnings for account deletion. - Enhanced error handling by converting errors into user-friendly notifications. - Simplified and improved the sign-out process with better error handling and streamlined navigation. - **Style** - Added new style constants for success and warning modals related to account deletion. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -4830,13 +4830,49 @@ export function useAFFiNEI18N(): {
|
||||
*/
|
||||
["com.affine.setting.account"](): string;
|
||||
/**
|
||||
* `Delete account`
|
||||
* `Delete your account`
|
||||
*/
|
||||
["com.affine.setting.account.delete"](): string;
|
||||
/**
|
||||
* `Permanently delete this account and the Workspace data backup in AFFiNE Cloud. This action can not be undone.`
|
||||
* `Once deleted, your account will no longer be accessible, and all data in your personal cloud space will be permanently deleted.`
|
||||
*/
|
||||
["com.affine.setting.account.delete.message"](): string;
|
||||
/**
|
||||
* `Cannot delete account`
|
||||
*/
|
||||
["com.affine.setting.account.delete.team-warning-title"](): string;
|
||||
/**
|
||||
* `You’re the owner of a team workspace. To delete your account, please delete the workspace or transfer ownership first.`
|
||||
*/
|
||||
["com.affine.setting.account.delete.team-warning-description"](): string;
|
||||
/**
|
||||
* `Delete your account?`
|
||||
*/
|
||||
["com.affine.setting.account.delete.confirm-title"](): string;
|
||||
/**
|
||||
* `Are you sure you want to delete your account?`
|
||||
*/
|
||||
["com.affine.setting.account.delete.confirm-description-1"](): string;
|
||||
/**
|
||||
* `Please type your email to confirm`
|
||||
*/
|
||||
["com.affine.setting.account.delete.input-placeholder"](): string;
|
||||
/**
|
||||
* `Delete`
|
||||
*/
|
||||
["com.affine.setting.account.delete.confirm-button"](): string;
|
||||
/**
|
||||
* `Account deleted`
|
||||
*/
|
||||
["com.affine.setting.account.delete.success-title"](): string;
|
||||
/**
|
||||
* `Your account and cloud data have been deleted.`
|
||||
*/
|
||||
["com.affine.setting.account.delete.success-description-1"](): string;
|
||||
/**
|
||||
* `Local data can be deleted by uninstalling app and clearing browser data.`
|
||||
*/
|
||||
["com.affine.setting.account.delete.success-description-2"](): string;
|
||||
/**
|
||||
* `Your personal information`
|
||||
*/
|
||||
@@ -9152,6 +9188,12 @@ export const TypedTrans: {
|
||||
}, {
|
||||
["1"]: JSX.Element;
|
||||
}>>;
|
||||
/**
|
||||
* `Your account will be inaccessible, and your personal cloud space will be permanently deleted. You can remove local data by uninstalling the app or clearing your browser storage. <1>This action is irreversible.</1>`
|
||||
*/
|
||||
["com.affine.setting.account.delete.confirm-description-2"]: ComponentType<TypedTransProps<Readonly<{}>, {
|
||||
["1"]: JSX.Element;
|
||||
}>>;
|
||||
/**
|
||||
* `Don't have the app? <1>Click to download</1>.`
|
||||
*/
|
||||
|
||||
@@ -1199,8 +1199,18 @@
|
||||
"com.affine.setting.notifications.email.invites.title": "Invites",
|
||||
"com.affine.setting.notifications.email.invites.subtitle": "Invitation related messages will be sent through emails.",
|
||||
"com.affine.setting.account": "Account settings",
|
||||
"com.affine.setting.account.delete": "Delete account",
|
||||
"com.affine.setting.account.delete.message": "Permanently delete this account and the Workspace data backup in AFFiNE Cloud. This action can not be undone.",
|
||||
"com.affine.setting.account.delete": "Delete your account",
|
||||
"com.affine.setting.account.delete.message": "Once deleted, your account will no longer be accessible, and all data in your personal cloud space will be permanently deleted.",
|
||||
"com.affine.setting.account.delete.team-warning-title": "Cannot delete account",
|
||||
"com.affine.setting.account.delete.team-warning-description": "You’re the owner of a team workspace. To delete your account, please delete the workspace or transfer ownership first.",
|
||||
"com.affine.setting.account.delete.confirm-title": "Delete your account?",
|
||||
"com.affine.setting.account.delete.confirm-description-1": "Are you sure you want to delete your account?",
|
||||
"com.affine.setting.account.delete.confirm-description-2": "Your account will be inaccessible, and your personal cloud space will be permanently deleted. You can remove local data by uninstalling the app or clearing your browser storage. <1>This action is irreversible.</1>",
|
||||
"com.affine.setting.account.delete.input-placeholder": "Please type your email to confirm",
|
||||
"com.affine.setting.account.delete.confirm-button": "Delete",
|
||||
"com.affine.setting.account.delete.success-title": "Account deleted",
|
||||
"com.affine.setting.account.delete.success-description-1": "Your account and cloud data have been deleted.",
|
||||
"com.affine.setting.account.delete.success-description-2": "Local data can be deleted by uninstalling app and clearing browser data.",
|
||||
"com.affine.setting.account.message": "Your personal information",
|
||||
"com.affine.setting.sign.message": "Sync with AFFiNE Cloud",
|
||||
"com.affine.setting.sign.out.message": "Securely sign out of your account.",
|
||||
|
||||
Reference in New Issue
Block a user