|
|
@ -576,75 +576,64 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/if} |
|
|
|
{/if} |
|
|
|
{:else if sub_menu === "text_code"} |
|
|
|
{:else if sub_menu === "text_code"} |
|
|
|
<Sidebar {nonActiveClass}> |
|
|
|
<div |
|
|
|
<SidebarWrapper |
|
|
|
class="flex flex-col justify-center max-w-md mx-6 mb-20 bg-gray-60 overflow-y-auto py-4 dark:bg-gray-800" |
|
|
|
divClass="mb-10 bg-gray-60 overflow-y-auto py-4 px-3 rounded dark:bg-gray-800" |
|
|
|
> |
|
|
|
> |
|
|
|
<div> |
|
|
|
<SidebarGroup ulClass="space-y-2" role="menu"> |
|
|
|
<h2 class="text-xl mb-6"> |
|
|
|
<li> |
|
|
|
{$t("pages.wallet_info.gen_text_code.title")} |
|
|
|
<h2 class="text-xl mb-6"> |
|
|
|
</h2> |
|
|
|
{$t("pages.wallet_info.gen_text_code.title")} |
|
|
|
</div> |
|
|
|
</h2> |
|
|
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Go Back --> |
|
|
|
<!-- Go Back --> |
|
|
|
<li |
|
|
|
<button |
|
|
|
tabindex="0" |
|
|
|
on:click={to_main_menu} |
|
|
|
role="menuitem" |
|
|
|
class="w-full text-gray-500 dark:text-gray-400 focus:ring-4 focus:ring-primary-100/50 rounded-lg text-lg px-5 py-2.5 text-center inline-flex items-center dark:focus:ring-primary-700/55" |
|
|
|
class="text-left flex items-center p-2 text-base font-normal text-gray-900 clickable rounded-lg dark:text-white hover:bg-gray-200 dark:hover:bg-gray-700" |
|
|
|
><ArrowLeft |
|
|
|
on:keypress={to_main_menu} |
|
|
|
tabindex="-1" |
|
|
|
on:click={to_main_menu} |
|
|
|
class="w-8 h-8 mr-2 -ml-1 transition duration-75 focus:outline-none group-hover:text-gray-900 dark:group-hover:text-white" |
|
|
|
> |
|
|
|
/>{$t("buttons.back")}</button |
|
|
|
<ArrowLeft |
|
|
|
> |
|
|
|
tabindex="-1" |
|
|
|
|
|
|
|
class="w-7 h-7 text-black transition duration-75 dark:text-white group-hover:text-gray-900 dark:group-hover:text-white" |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
<span class="ml-3">{$t("buttons.back")}</span> |
|
|
|
|
|
|
|
</li> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- Warning to prefer QR codes or wallet downloads --> |
|
|
|
<!-- Warning to prefer QR codes or wallet downloads --> |
|
|
|
{#if generation_state === "before_start"} |
|
|
|
{#if generation_state === "before_start"} |
|
|
|
<div class="text-left my-4"> |
|
|
|
<div class="text-left my-4"> |
|
|
|
<Alert color="yellow"> |
|
|
|
<Alert color="yellow"> |
|
|
|
{@html $t("wallet_sync.textcode.usage_warning")} |
|
|
|
{@html $t("wallet_sync.textcode.usage_warning")} |
|
|
|
</Alert> |
|
|
|
</Alert> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{/if} |
|
|
|
{/if} |
|
|
|
<!-- Warning if offline --> |
|
|
|
<!-- Warning if offline --> |
|
|
|
{#if !$online} |
|
|
|
<div class="text-left my-4"> |
|
|
|
<li class="text-left my-4"> |
|
|
|
{#if !$online} |
|
|
|
<Alert color="red"> |
|
|
|
<Alert color="red"> |
|
|
|
{@html $t("wallet_sync.offline_warning")} |
|
|
|
{@html $t("wallet_sync.offline_warning")} |
|
|
|
</Alert> |
|
|
|
</Alert> |
|
|
|
</li> |
|
|
|
{:else} |
|
|
|
{:else} |
|
|
|
{@html $t("wallet_sync.expiry")} |
|
|
|
<li class="text-left my-4"> |
|
|
|
{/if} |
|
|
|
{@html $t("wallet_sync.expiry")} |
|
|
|
</div> |
|
|
|
</li> |
|
|
|
|
|
|
|
{/if} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div class="mt-4"> |
|
|
|
<div class="mt-4"> |
|
|
|
{#if generation_state === "before_start"} |
|
|
|
{#if generation_state === "before_start"} |
|
|
|
<Button |
|
|
|
<Button |
|
|
|
on:click={generate_text_code} |
|
|
|
on:click={generate_text_code} |
|
|
|
disabled={!$online} |
|
|
|
disabled={!$online} |
|
|
|
class="my-4 w-full text-white bg-primary-700 hover:bg-primary-700/90 focus:ring-4 focus:ring-primary-100/50 rounded-lg text-lg px-5 py-2.5 text-center inline-flex items-center dark:focus:ring-primary-700/55" |
|
|
|
class="my-4 w-full text-white bg-primary-700 hover:bg-primary-700/90 focus:ring-4 focus:ring-primary-100/50 rounded-lg text-lg px-5 py-2.5 text-center inline-flex items-center dark:focus:ring-primary-700/55" |
|
|
|
> |
|
|
|
> |
|
|
|
{$t("pages.wallet_info.gen_text_code.gen_btn")} |
|
|
|
{$t("pages.wallet_info.gen_text_code.gen_btn")} |
|
|
|
</Button> |
|
|
|
</Button> |
|
|
|
{:else if generation_state == "loading"} |
|
|
|
{:else if generation_state == "loading"} |
|
|
|
<Spinner class="mx-auto" size="6" /> |
|
|
|
<Spinner class="mx-auto" size="6" /> |
|
|
|
{:else} |
|
|
|
{:else} |
|
|
|
<!-- TextCode Code --> |
|
|
|
<!-- TextCode Code --> |
|
|
|
<span>{$t("pages.wallet_info.gen_text_code.label")}</span> |
|
|
|
<span>{$t("pages.wallet_info.gen_text_code.label")}</span> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<CopyToClipboard rows={8} value={generated_text_code} /> |
|
|
|
<CopyToClipboard rows={8} value={generated_text_code} /> |
|
|
|
</div> |
|
|
|
|
|
|
|
{/if} |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</SidebarGroup> |
|
|
|
{/if} |
|
|
|
</SidebarWrapper> |
|
|
|
</div> |
|
|
|
</Sidebar> |
|
|
|
</div> |
|
|
|
{/if} |
|
|
|
{/if} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
{#if error} |
|
|
|
{#if error} |
|
|
|