+ {#if wait === true}
+ Please wait...
+ {:else}
+ {wait}
{/if}
-
+
-
-
+
+ {/if}
-
-
- For the rest of the world
-
-
- {/if}
-
-
-
-
-
- Enter an invitation link
-
-
- {#if false && mobile}
-
-
-
- Scan an invitation QRcode
-
-
- {/if}
-
-
-
- Self-hosted broker
-
-
-
-
-
- NG Box (owned or invited)
-
-
- {:else if pin.length < 4}
-
- {#if registration_success}
-
- You have been successfully registered to {registration_success}
-
- {/if}
-
- Let's start creating your wallet by choosing a PIN code
-
- We recommend you to choose a PIN code that you already know very
- well.
-
- Your credit card PIN, by example, is a good choice.
We at
- NextGraph will never see your PIN.
-
-
-
Here are the rules for the PIN :
-
- - It cannot be a series like 1234 or 8765
- -
- The same digit cannot repeat more than once. By example 4484 is
- invalid
-
- -
- Try to avoid birth date, last digits of phone number, or zip code
-
-
-
-
- You have chosen: {#each pin as digit}{digit}{/each}
-
-
- {#each [0, 1, 2] as row}
-
- {#each [1, 2, 3] as num}
- sel_pin(num + row * 3)}
- >
- {num + row * 3}
-
- {/each}
-
- {/each}
-
sel_pin(0)}
- >
- 0
-
-
-
- {:else if pin_confirm.length < 4}
-
-
- Please confirm your PIN code.
- Enter the same PIN again
-
-
- You have chosen: {#each pin_confirm as digit}{digit}{/each}
-
-
- {#each [0, 1, 2] as row}
-
- {#each [1, 2, 3] as num}
- await confirm_pin(num + row * 3)}
- >
- {num + row * 3}
-
- {/each}
-
- {/each}
-
await confirm_pin(0)}
- >
- 0
-
-
-
- {:else if !options}
-
- {#if pin.toString() === pin_confirm.toString()}
-
- Your PIN is confirmed as : {#each pin_confirm as digit}{digit}{/each}
-
-
- Now let's enter a security phrase and a security image
-
-
- As a verification step, this phrase and image will be presented to
- you every time you are about to enter your pazzle and PIN in order
- to unlock your wallet.
- This security measure will prevent you from entering your pazzle and
- PIN on malicious sites and apps.
-
- Every time you will use your wallet, if you do not see and
- recognize your own security phrase and image before entering your
- pazzle, please stop and DO NOT enter your pazzle, as you would be
- the victim of a phishing attempt.
-
-
-
- Here are the rules for the security phrase and image :
-
-
- - The phrase should be at least 10 characters long
- -
- It should be something you will remember, but not something too
- personal.
-
- - Do not enter your full name, nor address, nor phone number.
- -
- Instead, you can enter a quote, a small sentence that you like, or
- something meaningless to others, but unique to you.
-
- -
- The image should be minimum 150x150px. There is no need to provide
- more than 400x400px as it will be scaled down anyway.
-
- -
- We accept several formats like JPEG, PNG, GIF, WEBP and more.
-
- -
- The image should be unique to you. But it should not be too
- personal neither.
-
- - Do not upload your face picture, this is not a profile pic.
- -
- The best would be a landscape you like or any other picture that
- you will recognize as unique.
-
- -
- Please be aware that other people who are sharing this device with
- you, will be able to see this image and phrase.
-
-
-
await security_phrase_ok()}>
- Ok
-
- {#if security_txt && security_img}
+
+ Enter an invitation link
+
+
+ {#if false && mobile}
+
-
- Save security phrase & image
+ Scan an invitation QRcode
- {/if}
-
{
- event.preventDefault();
- }}
- on:change={handleChange}
+
+ {/if}
+
+
-
- {#if mobile}
- Tap to upload an image
- {:else}
- Click to select an image or drag
- and drop
- {/if}
-
+
-
-
- {:else}
-
- You didn't enter the same PIN twice
-
+ d="M5.25 14.25h13.5m-13.5 0a3 3 0 01-3-3m3 3a3 3 0 100 6h13.5a3 3 0 100-6m-16.5-3a3 3 0 013-3h13.5a3 3 0 013 3m-19.5 0a4.5 4.5 0 01.9-2.7L5.737 5.1a3.375 3.375 0 012.7-1.35h7.126c1.062 0 2.062.5 2.7 1.35l2.587 3.45a4.5 4.5 0 01.9 2.7m0 0a3 3 0 01-3 3m0 3h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008zm-3 6h.008v.008h-.008v-.008zm0-6h.008v.008h-.008v-.008z"
+ />
+
+ Self-hosted broker
+
+
+
{
- pin_confirm = [];
- pin = [];
- }}
+ on:click={displayNGbox}
+ class="choice-button text-primary-700 bg-primary-100 hover:bg-primary-100/90 focus:ring-4 focus:ring-primary-100/50 font-medium rounded-lg text-lg px-5 py-2.5 text-center inline-flex items-center dark:focus:ring-primary-100/55 mb-2"
>
- Start over
+
+
+
+
+ NG Box (owned or invited)
- {/if}
-
- {:else if !creating}
-
-
- We are almost done !
- There are 4 options to choose before we can create your wallet. Those options
- can help you to use and keep your wallet. But we also want to be careful
- with your security and privacy.
- Remember that in any case, once your wallet will be created, you will download
- a file that you should keep privately somewhere on your device, USB key
- or hard-disk. This is the default way you can use and keep your wallet.
- Now let's look at some options that can make your life a bit easier.
-
-
- Do you trust this device?
- If you do, if this device is yours or is used by few trusted persons of
- your family or workplace, and you would like to login again from this device
- in the future, then you can save your wallet on this device. To the contrary,
- if this device is public and shared by strangers, do not save your wallet
- here. {#if !tauri_platform}By selecting this option, you agree to save
- some cookies on your browser.{/if}
- Save my wallet on this device?
-
-
- Keep a copy in the cloud?
- Are you afraid that you will loose the file containing your wallet? If
- this would happen, your wallet would be lost forever, together with all
- your documents. We can keep an encrypted copy of your wallet in our cloud.
- Only you will be able to download it with a special link. You would have
- to keep this link safely though. By selecting this option, you agree to
- the
- Terms of Service of our cloud.
-
- Save my wallet in the cloud?
-
-
- Create a PDF file of your wallet?
- We can prepare for you a PDF file containing all the information of your
- wallet, unencrypted. You should print this file and then delete the PDF
- (and empty the trash). Keep this printed document in a safe place. It contains
- all the information to regenerate your wallet in case you lost access to
- it.
-
- Create a PDF of my wallet?
-
- {#if !options.cloud}
-
+
+ {:else if pin.length < 4}
+
+ {#if registration_success}
+
+ You have been successfully registered to {registration_success}
+
+ {/if}
+
Create a link to access your wallet easily?
-
- When you want to use your wallet on the web or from other devices, we
- can help you find your wallet by creating a simple link accessible from
- anywhere. Only you will have access to this link. In order to do so,
- we will keep your wallet ID and some information about your broker on
- our cloud servers. If you prefer to opt out, just uncheck this option.
- By selecting this option, you agree to the
- Terms of Service of our cloud.
-
- Create a link to my wallet?Let's start creating your wallet by choosing a PIN code
+
+ We recommend you to choose a PIN code that you already know very
+ well.
+
+ Your credit card PIN, by example, is a good choice.
We at
+ NextGraph will never see your PIN.
+
- {/if}
-
-
-
-
+ Here are the rules for the PIN :
+
+ - It cannot be a series like 1234 or 8765
+ -
+ The same digit cannot repeat more than once. By example 4484 is
+ invalid
+
+ -
+ Try to avoid birth date, last digits of phone number, or zip code
+
+
- Let's create this wallet
-
-
- {:else if !error}
- {#if !ready}
-
- Your wallet is being created...
-
-
-
-
+
+ You have chosen: {#each pin as digit}{digit}{/each}
+
+
+ {#each [0, 1, 2] as row}
+
+ {#each [1, 2, 3] as num}
+ sel_pin(num + row * 3)}
+ >
+ {num + row * 3}
+
+ {/each}
+
+ {/each}
+
sel_pin(0)}
+ >
+ 0
+
+
- {:else}
-
- Your wallet is ready!
-
-
-
- {#if download_link}
- Please download your wallet and keep it in a safe location
-
+ {:else if pin_confirm.length < 4}
+
+
+ Please confirm your PIN code.
+ Enter the same PIN again
+
+
+ You have chosen: {#each pin_confirm as digit}{digit}{/each}
+
+
+ {#each [0, 1, 2] as row}
+
+ {#each [1, 2, 3] as num}
+ await confirm_pin(num + row * 3)}
+ >
+ {num + row * 3}
+
+ {/each}
+
+ {/each}
+
await confirm_pin(0)}
+ >
+ 0
+
+
+
+ {:else if !options}
+
+ {#if pin.toString() === pin_confirm.toString()}
+
+ Your PIN is confirmed as : {#each pin_confirm as digit}{digit}{/each}
+
+
+ Now let's enter a security phrase and a security image
+
+
+ As a verification step, this phrase and image will be presented to
+ you every time you are about to enter your pazzle and PIN in order
+ to unlock your wallet.
+ This security measure will prevent you from entering your pazzle and
+ PIN on malicious sites and apps.
+
+ Every time you will use your wallet, if you do not see and
+ recognize your own security phrase and image before entering
+ your pazzle, please stop and DO NOT enter your pazzle, as you
+ would be the victim of a phishing attempt.
+
+
+
+ Here are the rules for the security phrase and image :
+
+
+ - The phrase should be at least 10 characters long
+ -
+ It should be something you will remember, but not something too
+ personal.
+
+ -
+ Do not enter your full name, nor address, nor phone number.
+
+ -
+ Instead, you can enter a quote, a small sentence that you like,
+ or something meaningless to others, but unique to you.
+
+ -
+ The image should be minimum 150x150px. There is no need to
+ provide more than 400x400px as it will be scaled down anyway.
+
+ -
+ We accept several formats like JPEG, PNG, GIF, WEBP and more.
+
+ -
+ The image should be unique to you. But it should not be too
+ personal neither.
+
+ -
+ Do not upload your face picture, this is not a profile pic.
+
+ -
+ The best would be a landscape you like or any other picture that
+ you will recognize as unique.
+
+ -
+ Please be aware that other people who are sharing this device
+ with you, will be able to see this image and phrase.
+
+
+
await security_phrase_ok()}>
+ Ok
+
+ {#if security_txt && security_img}
(animateDownload = false)}
- class="mt-10 mb-8 text-white bg-primary-700 hover:bg-primary-700/90 focus:ring-4 focus:outline-none focus:ring-primary-700/50 font-medium rounded-lg text-lg px-5 py-2.5 text-center inline-flex items-center dark:focus:ring-primary-700/55"
+ on:click|once={save_security}
+ bind:this={validate_button}
+ class="animate-bounce mt-10 text-white bg-primary-700 hover:bg-primary-700/90 focus:ring-4 focus:ring-primary-700/50 font-medium rounded-lg text-lg px-5 py-2.5 text-center inline-flex items-center dark:focus:ring-primary-700/55 mb-2"
>
- Download my wallet
+ Save security phrase & image
-
- {:else if !options.trusted}
- Your wallet file has been downloaded into your "Downloads" folder,
- with the name
- {download_name}
- Please move it to a safe and durable place.
- {/if}
- Here is your Pazzle:
- {#each display_pazzle(ready.pazzle) as emoji}
-
{emoji}
- {/each}
-
- Copy it on a piece of paper.
Use that until you memorized it,
- then throw it away.
The order of each image is important.
- Now click on "Continue to Login"
-
- {
+ event.preventDefault();
+ }}
+ on:change={handleChange}
>
+
+ {#if mobile}
+ Tap to upload an image
+ {:else}
+ Click to select an image or
+ drag and drop
+ {/if}
+
-
-
- Continue to Login
+ stroke-width="2"
+ d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"
+ />
+
+
+ {:else}
+
+ You didn't enter the same PIN twice
+
+ {
+ pin_confirm = [];
+ pin = [];
+ }}
+ >
+ Start over
-
+ {/if}
+
+ {:else if !creating}
+
+
+ We are almost done !
+ There are 4 options to choose before we can create your wallet. Those
+ options can help you to use and keep your wallet. But we also want to
+ be careful with your security and privacy.
+ Remember that in any case, once your wallet will be created, you will
+ download a file that you should keep privately somewhere on your device,
+ USB key or hard-disk. This is the default way you can use and keep your
+ wallet. Now let's look at some options that can make your life a bit
+ easier.
+
+
+ Do you trust this device?
+ If you do, if this device is yours or is used by few trusted persons
+ of your family or workplace, and you would like to login again from this
+ device in the future, then you can save your wallet on this device. To
+ the contrary, if this device is public and shared by strangers, do not
+ save your wallet here. {#if !tauri_platform}By selecting this
+ option, you agree to save some cookies on your browser.{/if}
+ Save my wallet on this device?
+
+
+ Keep a copy in the cloud?
+ Are you afraid that you will loose the file containing your wallet? If
+ this would happen, your wallet would be lost forever, together with all
+ your documents. We can keep an encrypted copy of your wallet in our cloud.
+ Only you will be able to download it with a special link. You would have
+ to keep this link safely though. By selecting this option, you agree
+ to the
+ Terms of Service of our cloud.
+
+ Save my wallet in the cloud?
+
+
+ Create a PDF file of your wallet?
+
+ We can prepare for you a PDF file containing all the information of your
+ wallet, unencrypted. You should print this file and then delete the PDF
+ (and empty the trash). Keep this printed document in a safe place. It
+ contains all the information to regenerate your wallet in case you lost
+ access to it.
+
+ Create a PDF of my wallet?
+
+ {#if !options.cloud}
+
+ Create a link to access your wallet easily?
+
+ When you want to use your wallet on the web or from other devices,
+ we can help you find your wallet by creating a simple link accessible
+ from anywhere. Only you will have access to this link. In order to
+ do so, we will keep your wallet ID and some information about your
+ broker on our cloud servers. If you prefer to opt out, just uncheck
+ this option. By selecting this option, you agree to the
+ Terms of Service of our cloud.
+
+ Create a link to my wallet?
+
+ {/if}
+
+
+
+
+
+ Let's create this wallet
+
+
+ {:else if !error}
+ {#if !ready}
+
+ Your wallet is being created...
+
+
+
+
+
+ {:else}
+
+ Your wallet is ready!
+
+
+
+ {#if download_link}
+ Please download your wallet and keep it in a safe location
+
+ (animateDownload = false)}
+ class="mt-10 mb-8 text-white bg-primary-700 hover:bg-primary-700/90 focus:ring-4 focus:ring-primary-700/50 font-medium rounded-lg text-lg px-5 py-2.5 text-center inline-flex items-center dark:focus:ring-primary-700/55"
+ >
+
+
+
+
+ Download my wallet
+
+
+ {:else if !options.trusted}
+ Your wallet file has been downloaded into your "Downloads" folder,
+ with the name
+ {download_name}
+ Please move it to a safe and durable place.
+ {/if}
+ Here is your Pazzle:
+ {#each display_pazzle(ready.pazzle) as emoji}
+
{emoji}
+ {/each}
+
+ Copy it on a piece of paper.
Use that until you memorized it,
+ then throw it away.
The order of each image is important.
+ Now click on "Continue to Login"
+
+
+
+
+
+ Continue to Login
+
+
+
+ {/if}
+ {:else}
+
+ An error occurred !
+
+
+
+
+ {error}
+
+
{
+ pin_confirm = [];
+ pin = [];
+ options = undefined;
+ creating = false;
+ error = undefined;
+ animateDownload = true;
+ }}
+ >
+ Start over
+
{/if}
- {:else}
-
- An error occurred !
-
-
-
-
- {error}
-
-
{
- pin_confirm = [];
- pin = [];
- options = undefined;
- creating = false;
- error = undefined;
- animateDownload = true;
- }}
- >
- Start over
-
-
- {/if}
-
-{/if}
+
+ {/if}
+
diff --git a/ng-app/src/routes/WalletLogin.svelte b/ng-app/src/routes/WalletLogin.svelte
index ae3bdb7..4233911 100644
--- a/ng-app/src/routes/WalletLogin.svelte
+++ b/ng-app/src/routes/WalletLogin.svelte
@@ -13,6 +13,7 @@
import { onMount, onDestroy } from "svelte";
import { link, push } from "svelte-spa-router";
import Login from "../lib/Login.svelte";
+ import CenteredLayout from "../lib/CenteredLayout.svelte";
import ng from "../api";
import { Fileupload, Button } from "flowbite-svelte";
// @ts-ignore
@@ -135,47 +136,47 @@
}
-{#if error}
-
-
-
-
+
+ {#if error}
+
+
+
+
-
- An error occurred:
{error}
-
-
{
- importing = false;
- error = undefined;
- wallet = undefined;
- }}
- class="text-white bg-primary-700 hover:bg-primary-700/90 focus:ring-4 focus:outline-none focus:ring-primary-700/50 font-medium rounded-lg text-lg px-5 py-2.5 text-center inline-flex items-center dark:focus:ring-primary-700/55 mb-2"
- >
- Start over
-
-
-{:else if wallet}
-
-{:else if !$active_wallet && !selected}
-
+
+ An error occurred:
{error}
+
+ {
+ importing = false;
+ error = undefined;
+ wallet = undefined;
+ }}
+ class="text-white bg-primary-700 hover:bg-primary-700/90 focus:ring-4 focus:ring-primary-700/50 font-medium rounded-lg text-lg px-5 py-2.5 text-center inline-flex items-center dark:focus:ring-primary-700/55 mb-2"
+ >
+ Start over
+
+
+ {:else if wallet}
+
+ {:else if !$active_wallet && !selected}
@@ -217,7 +218,7 @@
on:change={handleWalletUpload}
/>
{
document.getElementById("import_wallet_file").click();
}}
@@ -242,7 +243,7 @@