Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion infrastructure/eid-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"check-lint": "npx @biomejs/biome lint ./src",
"tauri": "tauri",
"storybook": "svelte-kit sync && storybook dev -p 6006",
"build-storybook": "storybook build"
"build-storybook": "storybook build",
"build:apk": "npm run tauri android build -- --apk --target aarch64 --target armv7",
"build:aab": "npm run tauri android build -- --aab --target aarch64 --target armv7"
},
"license": "MIT",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {
compileSdk = 36
namespace = "foundation.metastate.eid_wallet"
defaultConfig {
manifestPlaceholders["usesCleartextTraffic"] = "false"
manifestPlaceholders["usesCleartextTraffic"] = "true"
applicationId = "foundation.metastate.eid_wallet"
minSdk = 24
targetSdk = 36
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@ import type { HTMLAttributes } from "svelte/elements";
interface BottomSheetProps extends HTMLAttributes<HTMLDivElement> {
isOpen?: boolean;
dismissible?: boolean;
fullScreen?: boolean;
children?: Snippet;
onOpenChange?: (value: boolean) => void;
}

let {
isOpen = $bindable(false),
dismissible = true,
fullScreen = false,
children = undefined,
onOpenChange,
...restProps
Expand Down Expand Up @@ -45,10 +47,14 @@ $effect(() => {
role="dialog"
aria-modal="true"
class={cn(
"fixed inset-x-0 bottom-0 z-50 bg-white rounded-t-3xl shadow-xl flex flex-col gap-4 max-h-[88svh] overflow-y-auto",
fullScreen
? "fixed inset-0 z-50 bg-white shadow-xl flex flex-col gap-4 overflow-hidden"
: "fixed inset-x-0 bottom-0 z-50 bg-white rounded-t-3xl shadow-xl flex flex-col gap-4 max-h-[88svh] overflow-y-auto",
restProps.class,
)}
style={`padding: 1.5rem 1.5rem max(1.5rem, env(safe-area-inset-bottom)); ${restProps.style ?? ""}`}
style={`${fullScreen
? "padding: max(1rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));"
: "padding: 1.5rem 1.5rem max(1.5rem, env(safe-area-inset-bottom));"} ${restProps.style ?? ""}`}
Comment thread
coodos marked this conversation as resolved.
>
{@render children?.()}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ $: if (internalOpen !== lastReportedOpen) {
<BottomSheet
isOpen={internalOpen}
dismissible={false}
fullScreen={true}
class="gap-5"
>
Comment thread
coodos marked this conversation as resolved.
<div class="flex min-h-[70svh] w-full flex-col">
<div class="flex flex-1 flex-col items-start overflow-y-auto pt-2">
<div class="flex h-full w-full flex-col">
<div class="min-h-0 flex flex-1 flex-col items-start overflow-y-auto pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
Expand All @@ -54,8 +55,8 @@ $: if (internalOpen !== lastReportedOpen) {
/>
</div>

<h4 class="text-xl font-bold">Code scanned!</h4>
<p class="text-black-700 text-sm mt-1">
<h4 class="text-lg font-bold">Code scanned!</h4>
<p class="mt-1 text-sm leading-relaxed text-black-700">
Please review the connection details below.
</p>

Expand All @@ -65,7 +66,7 @@ $: if (internalOpen !== lastReportedOpen) {
<table class="w-full border-collapse">
<tbody class="divide-y divide-gray-200">
<tr>
<td class="py-4 px-4">
<td class="align-top py-4 px-4">
<div
class="text-xs font-semibold text-black-500 uppercase tracking-wider block"
>
Expand All @@ -80,7 +81,7 @@ $: if (internalOpen !== lastReportedOpen) {
</tr>

<tr>
<td class="py-4 px-4">
<td class="align-top py-4 px-4">
<div
class="text-xs font-semibold text-black-500 uppercase tracking-wider block"
>
Expand Down Expand Up @@ -128,7 +129,7 @@ $: if (internalOpen !== lastReportedOpen) {
{/if}
</div>

<div class="mt-auto flex w-full flex-col gap-3 pb-2 pt-6">
<div class="shrink-0 flex w-full flex-col gap-3 pb-2 pt-6">
<div
class="flex flex-col justify-center gap-3 items-center w-full"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ $: if (internalOpen !== lastReportedOpen) {
<BottomSheet
isOpen={internalOpen}
dismissible={false}
fullScreen={true}
role="dialog"
aria-modal="true"
aria-labelledby="loggedin-title"
class="loggedin-drawer gap-5"
>
<div class="flex min-h-[70svh] w-full flex-col">
<div class="flex flex-1 flex-col items-start overflow-y-auto pt-2">
<div class="flex h-full w-full flex-col">
<div class="min-h-0 flex flex-1 flex-col items-start overflow-y-auto pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
Expand All @@ -52,10 +53,10 @@ $: if (internalOpen !== lastReportedOpen) {
/>
</div>

<h4 id="loggedin-title" class="text-xl font-bold">
<h4 id="loggedin-title" class="text-lg font-bold">
You're logged in!
</h4>
<p class="text-black-700 text-sm">
<p class="text-sm leading-relaxed text-black-700">
You're now connected to {platform ?? "the platform"}
</p>
<div class="flex flex-col items-start py-6 w-full">
Expand All @@ -70,7 +71,7 @@ $: if (internalOpen !== lastReportedOpen) {
</div>
</div>

<div class="mt-auto flex w-full flex-col gap-3 pb-2 pt-6">
<div class="shrink-0 flex w-full flex-col gap-3 pb-2 pt-6">
<Button.Action
variant="soft"
class="w-full"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ $: if (internalOpen !== lastReportedOpen) {
<BottomSheet
isOpen={internalOpen}
dismissible={false}
fullScreen={true}
class="gap-5"
>
Comment thread
coodos marked this conversation as resolved.
<div class="flex min-h-[70svh] w-full flex-col">
<div class="flex flex-1 flex-col items-start overflow-y-auto pt-2">
<div class="flex h-full w-full flex-col">
<div class="min-h-0 flex flex-1 flex-col items-start overflow-y-auto pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden {revealSuccess
? 'bg-green-100'
Expand Down Expand Up @@ -63,10 +64,10 @@ $: if (internalOpen !== lastReportedOpen) {
</div>

{#if revealSuccess && revealedVoteData}
<h4 class="text-xl font-bold text-green-800">
<h4 class="text-lg font-bold text-green-800">
Vote Decrypted
</h4>
<p class="text-black-700 mt-1">
<p class="mt-1 text-sm leading-relaxed text-black-700">
Your selection has been successfully retrieved.
</p>

Expand All @@ -93,8 +94,8 @@ $: if (internalOpen !== lastReportedOpen) {
</div>
</div>
{:else}
<h4 class="text-xl font-bold">Reveal Your Blind Vote</h4>
<p class="text-black-700 mt-1">
<h4 class="text-lg font-bold">Reveal Your Blind Vote</h4>
<p class="mt-1 text-sm leading-relaxed text-black-700">
Please review the request details below.
</p>

Expand All @@ -105,7 +106,7 @@ $: if (internalOpen !== lastReportedOpen) {
<table class="w-full border-collapse">
<tbody class="divide-y divide-gray-200">
<tr>
<td class="py-4 px-4">
<td class="align-top py-4 px-4">
<div
class="text-xs font-semibold text-black-500 uppercase tracking-wider block"
>
Expand Down Expand Up @@ -145,7 +146,7 @@ $: if (internalOpen !== lastReportedOpen) {
{/if}
</div>

<div class="mt-auto flex w-full flex-col gap-3 pb-2 pt-6">
<div class="shrink-0 flex w-full flex-col gap-3 pb-2 pt-6">
{#if revealSuccess}
<Button.Action
variant="solid"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ $: hasPollDetails =
<BottomSheet
isOpen={internalOpen}
dismissible={false}
fullScreen={true}
role="dialog"
aria-modal="true"
aria-labelledby="signing-title"
class="gap-5"
>
<div class="flex min-h-[70svh] w-full flex-col">
<div class="flex flex-1 flex-col items-start overflow-y-auto pt-2">
<div class="flex h-full w-full flex-col">
<div class="min-h-0 flex flex-1 flex-col items-start overflow-y-auto pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden {showSigningSuccess
? 'bg-green-100'
Expand Down Expand Up @@ -77,7 +78,7 @@ $: hasPollDetails =

<h4
id="signing-title"
class="text-xl font-bold {showSigningSuccess
class="text-lg font-bold {showSigningSuccess
? 'text-green-800'
: ''}"
>
Expand All @@ -96,7 +97,7 @@ $: hasPollDetails =
{/if}
</h4>

<p class="text-black-700 text-sm mt-1">
<p class="mt-1 text-sm leading-relaxed text-black-700">
{#if showSigningSuccess}
Your request was processed successfully.
{:else}
Expand All @@ -111,7 +112,7 @@ $: hasPollDetails =
<tbody class="divide-y divide-gray-200">
{#if signingData?.pollId}
<tr>
<td class="py-3 px-4">
<td class="align-top py-3 px-4">
<div
class="text-xs font-semibold text-black-500 uppercase tracking-wider block"
>
Expand All @@ -128,7 +129,7 @@ $: hasPollDetails =

{#if isBlindVotingRequest && hasPollDetails}
<tr>
<td class="py-3 px-4">
<td class="align-top py-3 px-4">
<div
class="text-xs font-semibold text-black-500 uppercase tracking-wider block"
>
Expand All @@ -145,7 +146,7 @@ $: hasPollDetails =

{#if signingData?.message && !signingData?.pollId}
<tr>
<td class="py-3 px-4">
<td class="align-top py-3 px-4">
<div
class="text-xs font-semibold text-black-500 uppercase tracking-wider block"
>
Expand All @@ -159,7 +160,7 @@ $: hasPollDetails =
</td>
</tr>
<tr>
<td class="py-3 px-4">
<td class="align-top py-3 px-4">
<div
class="text-xs font-semibold text-black-500 uppercase tracking-wider block"
>
Expand Down Expand Up @@ -222,7 +223,7 @@ $: hasPollDetails =
{/if}
</div>

<div class="mt-auto flex w-full flex-col gap-3 pb-2 pt-6">
<div class="shrink-0 flex w-full flex-col gap-3 pb-2 pt-6">
{#if showSigningSuccess}
<Button.Action
variant="solid"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ $: displayName = requesterName ?? requesterEname ?? "Unknown";
<BottomSheet
isOpen={internalOpen}
dismissible={false}
fullScreen={true}
role="dialog"
aria-modal="true"
aria-labelledby="social-binding-title"
class="gap-5"
>
<div class="flex min-h-[70svh] w-full flex-col">
<div class="flex flex-1 flex-col items-start overflow-y-auto pt-2">
<div class="flex h-full w-full flex-col">
<div class="min-h-0 flex flex-1 flex-col items-start overflow-y-auto pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden {success
? 'bg-green-100'
Expand Down Expand Up @@ -68,12 +69,12 @@ $: displayName = requesterName ?? requesterEname ?? "Unknown";

<h4
id="social-binding-title"
class="text-xl font-bold {success ? 'text-green-800' : ''}"
class="text-lg font-bold {success ? 'text-green-800' : ''}"
>
{success ? "Binding Signed!" : "Social Identity Binding"}
</h4>

<p class="text-black-700 text-sm mt-1">
<p class="mt-1 text-sm leading-relaxed text-black-700">
{#if success}
You've signed the social identity binding for <strong>{displayName}</strong>.
They will counter-sign to complete the mutual binding.
Expand All @@ -89,7 +90,7 @@ $: displayName = requesterName ?? requesterEname ?? "Unknown";
<table class="w-full border-collapse">
<tbody class="divide-y divide-gray-200">
<tr>
<td class="py-3 px-4">
<td class="align-top py-3 px-4">
<div
class="text-xs font-semibold text-black-500 uppercase tracking-wider block"
>
Expand All @@ -104,7 +105,7 @@ $: displayName = requesterName ?? requesterEname ?? "Unknown";
</tr>
{#if requesterEname}
<tr>
<td class="py-3 px-4">
<td class="align-top py-3 px-4">
<div
class="text-xs font-semibold text-black-500 uppercase tracking-wider block"
>
Expand Down Expand Up @@ -132,7 +133,7 @@ $: displayName = requesterName ?? requesterEname ?? "Unknown";
{/if}
</div>

<div class="mt-auto flex w-full flex-col gap-3 pb-2 pt-6">
<div class="shrink-0 flex w-full flex-col gap-3 pb-2 pt-6">
{#if success}
<Button.Action
variant="solid"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@ const handleFinish = async () => {
const recovery = get(pendingRecovery);
if (recovery) {
localStorage.setItem(RECOVERY_SKIP_PROFILE_SETUP_KEY, "true");
// Recovery can happen on a fresh device, so make sure a key exists
// and is synced immediately before entering the app.
await globalState.walletSdkAdapter.ensureKey("default", "onboarding");
globalState.vaultController.vault = {
uri: recovery.uri,
ename: recovery.ename,
};
await globalState.vaultController.syncPublicKey(recovery.ename);
pendingRecovery.set(null);
Comment thread
coodos marked this conversation as resolved.
}
await goto("/main");
Expand Down
Loading
Loading