{#if flow.state.error}
{flow.state.error}
{/if} {#if flow.state.step === 'welcome'}

{$_('migration.inbound.welcome.title')}

{$_('migration.inbound.welcome.desc')}

{$_('migration.inbound.common.whatWillHappen')}

  1. {$_('migration.inbound.common.step1')}
  2. {$_('migration.inbound.common.step2')}
  3. {$_('migration.inbound.common.step3')}
  4. {$_('migration.inbound.common.step4')}
  5. {$_('migration.inbound.common.step5')}
{$_('migration.inbound.common.beforeProceed')}
  • {$_('migration.inbound.common.warning1')}
  • {$_('migration.inbound.common.warning2')}
  • {$_('migration.inbound.common.warning3')}
{:else if flow.state.step === 'source-handle'}

{isResuming ? $_('migration.inbound.sourceAuth.titleResume') : $_('migration.inbound.sourceAuth.title')}

{isResuming ? $_('migration.inbound.sourceAuth.descResume') : $_('migration.inbound.sourceAuth.desc')}

{#if isResuming && resumeInfo}

{$_('migration.inbound.sourceAuth.resumeTitle')}

{$_('migration.inbound.sourceAuth.resumeFrom')}: @{resumeInfo.sourceHandle}
{$_('migration.inbound.sourceAuth.resumeTo')}: @{resumeInfo.targetHandle}
{$_('migration.inbound.sourceAuth.resumeProgress')}: {resumeInfo.progressSummary}

{$_('migration.inbound.sourceAuth.resumeOAuthNote')}

{/if}

{$_('migration.inbound.sourceAuth.handleHint')}

{:else if flow.state.step === 'choose-handle'} flow.checkHandleAvailability(h)} onHandleChange={(h) => handleInput = h} onDomainChange={(d) => selectedDomain = d} onEmailChange={(e) => flow.updateField('targetEmail', e)} onPasswordChange={(p) => flow.updateField('targetPassword', p)} onAuthMethodChange={(m) => selectedAuthMethod = m} onInviteCodeChange={(c) => flow.updateField('inviteCode', c)} onVerificationChannelChange={(ch) => flow.updateField('verificationChannel', ch)} onDiscordChange={(v) => flow.updateField('discordUsername', v)} onTelegramChange={(v) => flow.updateField('telegramUsername', v)} onSignalChange={(v) => flow.updateField('signalUsername', v)} onHandlePreservationChange={handlePreservationChange} onVerifyExistingHandle={verifyExistingHandle} onBack={() => flow.setStep('source-handle')} onContinue={proceedToReviewWithAuth} /> {:else if flow.state.step === 'review'} flow.setStep('choose-handle')} onContinue={startMigration} > {#snippet warning()} {$_('migration.inbound.review.warning')} {/snippet} {:else if flow.state.step === 'migrating'} 0, active: flow.state.progress.repoImported && !flow.state.progress.prefsMigrated }, { label: $_('migration.inbound.migrating.migratePrefs'), completed: flow.state.progress.prefsMigrated }, ]} statusText={flow.state.progress.currentOperation} progressBar={flow.state.progress.blobsTotal > 0 ? { current: flow.state.progress.blobsMigrated, total: flow.state.progress.blobsTotal } : undefined} /> {:else if flow.state.step === 'passkey-setup'} passkeyName = n} onRegister={registerPasskey} /> {:else if flow.state.step === 'app-password'} {:else if flow.state.step === 'email-verify'} flow.updateField('emailVerifyToken', t)} onSubmit={submitEmailVerify} onResend={resendEmailVerify} /> {:else if flow.state.step === 'plc-token'}

{$_('migration.inbound.plcToken.title')}

{$_('migration.inbound.plcToken.desc')}

{$_('migration.inbound.plcToken.info')}

flow.updateField('plcToken', (e.target as HTMLInputElement).value)} disabled={loading} required />
{:else if flow.state.step === 'did-web-update'}

{$_('migration.inbound.didWebUpdate.title')}

{$_('migration.inbound.didWebUpdate.desc')}

{$_('migration.inbound.didWebUpdate.yourDid')} {flow.state.sourceDid}

{$_('migration.inbound.didWebUpdate.updateInstructions')}

{`{
  "@context": [
    "https://www.w3.org/ns/did/v1",
    "https://w3id.org/security/multikey/v1",
    "https://w3id.org/security/suites/secp256k1-2019/v1"
  ],
  "id": "${flow.state.sourceDid}",
  "alsoKnownAs": [
    "at://${flow.state.targetHandle || '...'}"
  ],
  "verificationMethod": [
    {
      "id": "${flow.state.sourceDid}#atproto",
      "type": "Multikey",
      "controller": "${flow.state.sourceDid}",
      "publicKeyMultibase": "${flow.state.targetVerificationMethod?.replace('did:key:', '') || '...'}"
    }
  ],
  "service": [
    {
      "id": "#atproto_pds",
      "type": "AtprotoPersonalDataServer",
      "serviceEndpoint": "${window.location.origin}"
    }
  ]
}`}
{$_('migration.inbound.didWebUpdate.important')} {$_('migration.inbound.didWebUpdate.verifyFirst')} {$_('migration.inbound.didWebUpdate.fileLocation')} https://{flow.state.sourceDid.replace('did:web:', '')}/.well-known/did.json
{:else if flow.state.step === 'finalizing'} {:else if flow.state.step === 'success'} {#snippet extraContent()} {#if flow.state.progress.blobsFailed.length > 0}
{$_('migration.inbound.success.blobsWarning', { values: { count: flow.state.progress.blobsFailed.length } })}
{/if} {/snippet}
{:else if flow.state.step === 'error'} {/if}