Modular logistics and supply chain operating system (LSOS)
JavaScript driver-appfleet-managementfreight-managementinfrastructureinventory-managementlast-mile-deliverylogisticsondemandopen-sourceorder-managementroute-optimizationsupply-chain-managementtracking-and-monitoringtransport-management-systemtransportationwarehouse-management
<Modal::Default @modalIsOpened={{@modalIsOpened}} @options={{@options}} @confirm={{@onConfirm}} @decline={{@onDecline}}>
<div class="px-5 pb-4 space-y-4">
{{#if (eq this.step "password")}}
<p class="text-sm text-gray-700 dark:text-gray-300">
{{#if (eq this.mode "disable")}}
Enter your password to remove your authenticator app. If it is your two-factor method, two-factor authentication is turned off.
{{else if (eq this.mode "recovery-codes")}}
Enter your password to get new recovery codes. Your current recovery codes will stop working.
{{else}}
Enter your password to set up an authenticator app, such as Google Authenticator, Microsoft Authenticator, Authy or 1Password.
{{/if}}
</p>
<InputGroup @name="Current Password" @type="password" @value={{this.password}} @wrapperClass="mb-0i" />
{{else if (eq this.step "scan")}}
<p class="text-sm text-gray-700 dark:text-gray-300">Scan this QR code with your authenticator app, then enter the 6-digit code it shows.</p>
<div class="flex flex-col items-center">
<img src={{this.setup.qr_code}} alt="QR code for your authenticator app" class="w-48 h-48" />
<p class="text-xs text-gray-600 dark:text-gray-400 mt-3">Can't scan it? Enter this key in your app instead:</p>
<code class="mt-1 text-sm font-mono tracking-wider select-all text-gray-900 dark:text-gray-100">{{this.formattedSecret}}</code>
</div>
<InputGroup @name="6-digit code" @value={{this.code}} @placeholder="123456" @wrapperClass="mb-0i" />
{{else}}
<p class="text-sm text-gray-700 dark:text-gray-300">
Save these recovery codes somewhere safe. If you lose your phone, you can sign in with one of them. Each code works once, and they are only shown now.
</p>
<div class="grid grid-cols-2 gap-2 p-3 rounded-md bg-gray-100 dark:bg-gray-800 font-mono text-sm text-gray-900 dark:text-gray-100 select-all">
{{#each this.recoveryCodes as |recoveryCode|}}
<span>{{recoveryCode}}</span>
{{/each}}
</div>
<div class="flex flex-row space-x-2">
<Button @icon="copy" @text="Copy" @size="sm" @onClick={{this.copyRecoveryCodes}} />
<Button @icon="download" @text="Download" @size="sm" @onClick={{this.downloadRecoveryCodes}} />
</div>
{{/if}}
</div>
</Modal::Default>