feat(profile): account-deletion flow + terminal deleted screen
Profile gains a Delete-account control (durable accounts) opening a step-up dialog: a
mailed code for an email account, or the typed DELETE phrase for a platform-only one.
On success the app swaps to a terminal AccountDeleted screen ('Учётная запись удалена')
with a Close that closes the host Mini App (telegramClose / vkClose; web = no close).
Wires deleteRequest/deleteConfirm through client/transport/mock/codec; ru/en i18n;
codec wire test + Chromium/WebKit e2e.
This commit is contained in:
@@ -52,6 +52,18 @@ export async function vkInit(): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* vkClose closes the VK Mini App (VKWebAppClose), used on the terminal account-deleted
|
||||
* screen. Best-effort: a no-op outside VK.
|
||||
*/
|
||||
export async function vkClose(): Promise<void> {
|
||||
try {
|
||||
await (await bridge()).send('VKWebAppClose', { status: 'success' });
|
||||
} catch {
|
||||
// Outside VK there is no client to receive it.
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* vkUserName fetches the launching user's display name via VKWebAppGetUserInfo, since VK omits it
|
||||
* from the signed launch params. Returns '' on any failure or outside VK, so the backend falls back
|
||||
|
||||
Reference in New Issue
Block a user