Skip to content

Commit

Permalink
fix: some cuddles to the unlock page (#139)
Browse files Browse the repository at this point in the history
closes: #121

Co-authored-by: Puria Nafisi Azizi <[email protected]>
  • Loading branch information
phoebus-84 and puria authored Feb 12, 2024
1 parent 36fa6a7 commit 179b50f
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 10 deletions.
3 changes: 3 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
"Wallet": "Wallet",
"Scan_QR_code_to_claim_credential_or_request_one_below": "Scan QR code to claim credential or request one below",
"Language": "Language",
"DidroomWallet": "DidroomWallet",
"Open_Wallet": "Open Wallet",
"Biometry_not_available": "Biometry not available!"
"Login": "Login",
"Login_with_your_personal_questions_Tap_here": "Login with your personal questions? Tap here",
"Where_did_your_parents_meet": "",
Expand Down
5 changes: 4 additions & 1 deletion messages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"Claim_credential": "Richiedi credenziale",
"Wallet": "Portafoglio",
"Scan_QR_code_to_claim_credential_or_request_one_below": "Scennerizza il QR code per ottenere una credenziale o verificarne una",
"Language": "Lingua"
"Language": "Lingua",
"DidroomWallet": "DidroomWallet",
"Open_Wallet": "Apri il Wallet",
"Biometry_not_available": "Biometria non disponibile!"
}
51 changes: 51 additions & 0 deletions src/lib/components/atoms/LogoAccent.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<svg width="80" height="87" viewBox="0 0 80 87" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 1">
<g id="Group">
<g id="Group_2">
<path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M21.6436 26.9209V17.103L58.3657 17.2908V33.5178C58.3374 33.4552 58.3055 33.3889 58.2737 33.3263C55.68 28.1321 51.9823 24.2152 47.6336 21.8776C43.5502 19.6799 38.8935 18.8774 34.0388 19.7131C31.852 20.0886 29.8068 20.8211 27.8854 21.8776C25.6314 23.1219 23.5543 24.8152 21.6436 26.9209ZM58.3657 54.188V71.928H46.4588C46.4977 71.8838 46.5331 71.8286 46.5756 71.8028C47.3611 71.3353 47.6866 70.5291 47.6548 69.5094C47.6229 68.4897 47.1276 67.8786 46.3668 67.5547C46.1934 67.481 46.0165 67.4184 45.8431 67.3522C44.2932 66.7448 42.8106 65.9644 41.4094 64.9852C41.3988 64.9778 41.3882 64.9704 41.3775 64.963C40.7937 64.5544 40.2205 64.109 39.6649 63.6268C34.8632 59.4817 32.2695 53.9119 32.2731 46.6414C32.2731 45.5444 32.4571 44.51 32.9312 43.5676C34.1661 41.1122 36.7492 39.8974 39.12 40.6668C40.9069 41.2484 43.0229 43.2326 42.9734 46.7593C42.9451 48.9238 43.5466 50.8859 44.6436 52.605C47.2196 56.6544 51.8762 58.2043 55.726 56.1612C56.7203 55.6311 57.612 54.9758 58.3657 54.188ZM45.5777 71.928H21.6436V50.9522C21.9408 53.8162 22.6095 56.6176 23.6428 59.3307C24.4 61.3259 25.3059 63.1924 26.332 64.963L26.3355 64.9704C27.4466 66.892 28.6992 68.6996 30.0403 70.4224C30.8365 71.4458 31.8626 71.5304 32.7154 70.5954C33.5328 69.6935 33.5646 68.4419 32.7862 67.3853C32.2979 66.719 31.7883 66.0711 31.3035 65.4011C31.2009 65.2612 31.0983 65.1177 30.9992 64.9741L30.9886 64.963C27.3688 59.8203 25.0511 54.0518 25.2528 47.7311C25.1608 44.5247 25.4828 42.1246 26.5266 39.971C28.7948 35.2958 32.1528 32.6564 36.6077 32.2478C41.2325 31.8244 45.0469 33.8123 47.9945 38.1856C49.6363 40.6189 50.2874 43.483 50.3086 46.6047C50.3157 47.9005 51.1508 48.7766 52.2831 48.7545C53.2597 48.7324 54.0311 47.8194 54.0346 46.6156C54.0417 43.3062 53.4614 40.1624 52.0213 37.3315C46.933 27.3148 36.8837 25.4852 29.9448 29.9653C25.4014 32.8956 22.3618 37.3868 21.6683 43.7517C21.6612 43.8364 21.6506 43.9173 21.6436 44.002V33.2491C21.7356 33.1129 21.8311 32.9729 21.9266 32.8367C27.5245 24.8263 36.7386 21.8445 45.0257 25.7099C51.4622 28.7101 55.8711 34.1436 57.1732 42.7246C57.3679 44.0167 57.4245 45.353 57.4174 46.6672C57.4068 49.1521 56.0091 51.3203 53.9815 52.167C51.7771 53.091 49.2542 52.2111 47.7609 50.0208C47.0072 48.9127 46.7383 47.6317 46.7207 46.2255C46.6923 43.9578 46.1085 41.9221 44.9373 40.1514C42.1206 35.8885 37.0748 34.6589 33.1683 37.3536C30.5286 39.1722 28.8584 41.8926 28.678 45.6622C28.4763 49.8368 29.0885 53.8751 30.6136 57.6448C31.7706 60.4977 33.2532 62.9236 35.026 64.963L35.0366 64.9778C37.0323 67.2712 39.396 69.0714 42.0746 70.4371C43.214 71.0151 44.41 71.4347 45.5777 71.928ZM51.77 64.963H52.2406C52.9696 64.8195 54.0842 64.6465 55.174 64.3483C56.1259 64.0906 56.5929 63.1225 56.4549 61.9702C56.3275 60.91 55.5455 60.0817 54.6432 60.1075C54.1514 60.1259 53.6631 60.2363 53.1713 60.3026C48.5111 60.9358 44.6754 59.0141 41.6748 54.6518C40.0471 52.2885 39.4774 49.454 39.4314 46.4169C39.4137 45.0585 38.6388 44.1824 37.5737 44.2119C36.5405 44.2413 35.8045 45.1505 35.7939 46.4574C35.7656 49.4171 36.1972 52.2775 37.4038 54.8543C40.4965 61.4622 45.2663 64.5986 51.77 64.963Z" fill="#DBD7CB"/>
</g>
<g id="Group_3">
<path id="Vector_2" fill-rule="evenodd" clip-rule="evenodd" d="M58.3656 0.0180664L80.0002 21.8773H47.6347C43.549 19.6796 38.8896 18.8771 34.0353 19.7128C31.8509 20.0883 29.8026 20.8208 27.8866 21.8773H0.00390625L21.5834 0.0180664H58.3656Z" fill="#DBD7CB"/>
</g>
<g id="Group_4">
<path id="Vector_3" fill-rule="evenodd" clip-rule="evenodd" d="M-0.000366211 0.0180664H21.6416V26.9206H21.6379C21.5423 27.0311 21.443 27.1379 21.3474 27.2483C18.1848 30.8339 15.9048 35.0856 14.9045 40.2578C13.599 47.0056 14.5073 53.5435 16.2725 59.982C16.563 61.0459 17.464 61.5944 18.3466 61.3735C19.5785 61.068 20.2074 59.798 19.7735 58.3586C18.6849 54.7399 18.0267 51.0181 17.931 47.1602C17.7986 41.9585 18.957 37.2871 21.6379 33.2525L21.6416 33.2488V44.0017C21.6379 44.0128 21.6379 44.0201 21.6379 44.0275C21.4026 46.3541 21.4026 48.6548 21.6379 50.9188C21.6379 50.9298 21.6379 50.9408 21.6416 50.9519V86.8221L-0.000366211 64.9628V0.0180664Z" fill="#DBD7CB"/>
</g>
<g id="Group_5">
<path id="Vector_4" fill-rule="evenodd" clip-rule="evenodd" d="M79.9961 64.9635L58.4166 86.8228L-0.000167847 86.8228V64.9635L21.6344 64.9635H21.6381H26.3269L26.3306 64.9709C27.4449 66.8925 28.6952 68.6999 30.0338 70.4227C30.8319 71.4461 31.8578 71.5309 32.711 70.5958C33.5311 69.6939 33.5605 68.4422 32.7846 67.3857C32.2918 66.7194 31.7843 66.0715 31.2989 65.4015C31.1959 65.2617 31.0966 65.1181 30.9937 64.9745L30.9863 64.9635H35.0205L35.0352 64.9782C37.0284 67.2717 39.393 69.0717 42.0702 70.4338C43.2102 71.0154 44.4054 71.4351 45.5749 71.9284H46.4538C46.4942 71.8842 46.5273 71.829 46.5715 71.8032C47.3584 71.3357 47.682 70.5258 47.6526 69.5098C47.6195 68.4901 47.1231 67.8791 46.3618 67.5551C46.189 67.4815 46.0125 67.4189 45.8396 67.3526C44.2877 66.7452 42.8094 65.9648 41.4083 64.9856C41.3972 64.9782 41.3862 64.9709 41.3752 64.9635H79.9961Z" fill="#DBD7CB"/>
</g>
<g id="Group_6">
<path id="Vector_5" fill-rule="evenodd" clip-rule="evenodd" d="M58.3643 0.0180664V21.8761H52.9609L58.3643 0.0180664Z" fill="#DBD7CB"/>
</g>
<g id="Group_7">
<path id="Vector_6" fill-rule="evenodd" clip-rule="evenodd" d="M58.3643 86.8193L58.3643 64.9613H52.9609L58.3643 86.8193Z" fill="#DBD7CB"/>
</g>
<g id="Group_8">
<path id="Vector_7" d="M52.2373 64.9614C52.2067 64.9673 52.1766 64.9734 52.1474 64.9793C52.0205 64.9743 51.8941 64.9684 51.7686 64.9614H52.2373Z" fill="#DBD7CB"/>
</g>
<g id="Group_9">
<path id="Vector_8" d="M58.3652 33.5154C60.4971 37.8703 61.397 42.6737 61.0497 47.7245C60.8611 50.4691 59.8884 52.5999 58.3652 54.1882V33.5154Z" fill="#DBD7CB"/>
</g>
<g id="Group_10">
<path id="Vector_9" fill-rule="evenodd" clip-rule="evenodd" d="M58.3652 0.0180664L79.9999 21.8773V64.9628L58.3652 86.8221V0.0180664Z" fill="#DBD7CB"/>
</g>
<g id="Group_11">
<path id="Vector_10" fill-rule="evenodd" clip-rule="evenodd" d="M0.000116348 21.8594L0.000116348 0.000114441L21.6348 0.000114441L0.000116348 21.8594Z" fill="#DBD7CB"/>
</g>
<g id="Group_12">
<path id="Vector_11" fill-rule="evenodd" clip-rule="evenodd" d="M58.3614 86.8228V64.9635H79.9961L58.3614 86.8228Z" fill="#DBD7CB"/>
</g>
<g id="Group_13">
<path id="Vector_12" fill-rule="evenodd" clip-rule="evenodd" d="M58.3614 0.0180664V21.8773L79.9961 21.8773L58.3614 0.0180664Z" fill="#DBD7CB"/>
</g>
<g id="Group_14">
<path id="Vector_13" d="M79.9999 21.877H58.3652V64.9631H79.9999V21.877Z" fill="#DBD7CB"/>
</g>
<g id="Group_15">
<path id="Vector_14" fill-rule="evenodd" clip-rule="evenodd" d="M0.00390625 64.9624V21.877H21.6421V26.9203C21.5465 27.0307 21.4473 27.1375 21.3517 27.2479C18.1891 30.8335 15.909 35.0853 14.9087 40.2574C13.6032 47.0052 14.5079 53.5431 16.2731 59.9816C16.5673 61.0455 17.4645 61.594 18.3508 61.3732C19.5791 61.0676 20.208 59.7976 19.7777 58.3582C18.6892 54.7396 18.0309 51.0178 17.9353 47.1598C17.8029 41.9582 18.9576 37.2867 21.6421 33.2521V44.0271C21.4068 46.3537 21.4068 48.6545 21.6385 50.9184V64.9624V65.0066L0.00390625 64.9624Z" fill="#DBD7CB"/>
</g>
<g id="Group_16">
<path id="Vector_15" fill-rule="evenodd" clip-rule="evenodd" d="M58.3647 86.822H21.6377V65.0069V64.9626H21.6414L26.3338 64.97C27.4481 66.8916 28.6948 68.6992 30.0371 70.422C30.8351 71.4454 31.8611 71.53 32.7143 70.595C33.5344 69.6931 33.5638 68.4415 32.7842 67.3849C32.2951 66.7186 31.7876 66.0707 31.3021 65.4007C31.1992 65.2608 31.0962 65.1173 30.997 64.9737L35.0385 64.9774C37.0317 67.2708 39.3926 69.071 42.0735 70.4367C43.2135 71.0147 44.4087 71.4343 45.5781 71.9276H46.457C46.4975 71.8834 46.5306 71.8282 46.5747 71.8024C47.3617 71.3349 47.6853 70.5287 47.6522 69.509C47.6228 68.4893 47.1263 67.8782 46.3651 67.5543C46.1922 67.4806 46.0157 67.4217 45.8429 67.3518C44.291 66.7444 42.8126 65.964 41.4115 64.9848L58.3647 65.0069V86.822Z" fill="#DBD7CB"/>
</g>
</g>
</g>
</svg>
28 changes: 19 additions & 9 deletions src/routes/[[lang]]/(auth)/unlock/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<script lang="ts">
import { goto } from '$lib/i18n';
import Logo from '$lib/components/atoms/Logo.svelte';
import LogoAccent from '$lib/components/atoms/LogoAccent.svelte';
import { unlockApp } from '$lib/preferences/locked.js';
import { BiometricAuth, AndroidBiometryStrength } from '@aparajita/capacitor-biometric-auth';
import { m } from '$lib/i18n';
// @ts-ignore
import IonPage from 'ionic-svelte/components/IonPage.svelte';
Expand Down Expand Up @@ -47,25 +48,34 @@

<IonPage>
<ion-content fullscreen>
<div class="flex h-full w-full flex-col items-center justify-center gap-4 p-6">
<div class="flex h-full w-full flex-col items-center justify-center gap-2 p-6">
<div class="flex flex-col items-center gap-2">
<Logo />
<ion-text class="text-2xl">Welcome!</ion-text>
<LogoAccent />
<d-heading size="xs">{m.DidroomWallet()}</d-heading>
</div>

{#if data.biometryCheckResult.isAvailable}
<div class="w-full">
<!-- svelte-ignore a11y-click-events-have-key-events a11y-no-static-element-interactions -->
<ion-button on:click={unlock} expand="full">Unlock!</ion-button>
<div class="fixed bottom-4 w-full px-4">
<d-button color="accent" on:click={unlock} on:keydown={unlock} aria-hidden expand="full"
>{m.Open_Wallet()}</d-button
>
</div>
{#if error}
<div>
<ion-text>{error}</ion-text>
</div>
{/if}
{:else}
<ion-text>Biometry not available!</ion-text>
<ion-button on:click={testUnlock}>Test unlock</ion-button>
<ion-text>{m.Biometry_not_available()}</ion-text>
<div class="fixed bottom-4 w-full px-4">
<d-button
color="accent"
on:click={testUnlock}
on:keydown={testUnlock}
aria-hidden
expand="full">{m.Open_Wallet()}</d-button
>
</div>
{/if}
</div>
</ion-content>
Expand Down

0 comments on commit 179b50f

Please sign in to comment.