Pop-up to confirm migration

This commit is contained in:
ThatOneCalculator 2022-12-11 17:28:11 -08:00
parent 3181d7571c
commit 49b41cd412
3 changed files with 9 additions and 4 deletions

View File

@ -923,12 +923,13 @@ showAdminUpdates: "Indicate a new Calckey version is avaliable (admin only)"
replayTutorial: "Replay tutorial"
migration: "Migration"
moveTo: "Move current account to new account"
moveToLabel: "Account you're moving to"
moveToLabel: "Account you're moving to:"
moveAccount: "Move account!"
moveAccountDescription: "This process is irriversable. Make sure you've set up an alias for this account on your new account before moving. Please enter the tag of the account formatted like @person@instance.com"
moveFrom: "Move to this account from an older account"
moveFromLabel: "Old account"
moveFromLabel: "Account you're moving from:"
moveFromDescription: "This will set an alias of your old account so that you can move from that account to this current one. Please enter the tag of the account formatted like @person@instance.com"
migrationConfirm: "Are you absolutely sure you want to migrate your acccount to {account}? Once you do this, you won't be able to reverse it, and you won't be able to use your account normally again."
_sensitiveMediaDetection:
description: "Reduces the effort of server moderation through automatically recognizing NSFW media via Machine Learning. This will slightly increase the load on the server."

View File

@ -1,6 +1,6 @@
{
"name": "calckey",
"version": "13.0.0-rc1",
"version": "13.0.0-rc2",
"codename": "aqua",
"repository": {
"type": "git",

View File

@ -40,7 +40,11 @@ async function save(): Promise<void> {
}
async function move(): Promise<void> {
// TODO: PROMPT FOR CONFIRMATION
const confirm = await os.confirm({
type: 'warning',
text: i18n.t('migrationConfirm', { account: moveToAccount.toString() }),
});
if (confirm.canceled) return;
os.api('i/move', {
moveToAccount: moveToAccount,
});