Skip to content

Commit 9a2e2bc

Browse files
committed
chore: fix rendering of data
1 parent 257284e commit 9a2e2bc

File tree

6 files changed

+87
-47
lines changed

6 files changed

+87
-47
lines changed
Binary file not shown.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"version": 3,
3+
"artifactType": {
4+
"type": "APK",
5+
"kind": "Directory"
6+
},
7+
"applicationId": "foundation.metastate.eid_wallet",
8+
"variantName": "arm64Release",
9+
"elements": [
10+
{
11+
"type": "SINGLE",
12+
"filters": [],
13+
"attributes": [],
14+
"versionCode": 2,
15+
"versionName": "0.1.8",
16+
"outputFile": "app-arm64-release.apk"
17+
}
18+
],
19+
"elementType": "File",
20+
"baselineProfiles": [
21+
{
22+
"minApi": 28,
23+
"maxApi": 30,
24+
"baselineProfiles": [
25+
"baselineProfiles/1/app-arm64-release.dm"
26+
]
27+
},
28+
{
29+
"minApi": 31,
30+
"maxApi": 2147483647,
31+
"baselineProfiles": [
32+
"baselineProfiles/0/app-arm64-release.dm"
33+
]
34+
}
35+
],
36+
"minSdkVersionForDexing": 24
37+
}

infrastructure/eid-wallet/src/lib/fragments/IdentityCard/IdentityCard.svelte

Lines changed: 40 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
<script lang="ts">
2-
import * as Button from "$lib/ui/Button";
3-
import { cn } from "$lib/utils";
4-
import {
5-
CheckmarkBadge02Icon,
6-
Upload03Icon,
7-
ViewIcon,
8-
} from "@hugeicons/core-free-icons";
9-
import { HugeiconsIcon } from "@hugeicons/svelte";
10-
import type { HTMLAttributes } from "svelte/elements";
2+
import * as Button from "$lib/ui/Button";
3+
import { cn } from "$lib/utils";
4+
import {
5+
CheckmarkBadge02Icon,
6+
Upload03Icon,
7+
ViewIcon,
8+
} from "@hugeicons/core-free-icons";
9+
import { HugeiconsIcon } from "@hugeicons/svelte";
10+
import type { HTMLAttributes } from "svelte/elements";
1111
12-
interface userData {
13-
[fieldName: string]: string | boolean | undefined;
14-
}
15-
interface IIdentityCard extends HTMLAttributes<HTMLElement> {
16-
variant?: "eName" | "ePassport" | "eVault";
17-
userId?: string;
18-
viewBtn?: () => void;
19-
shareBtn?: () => void;
20-
userData?: userData;
21-
totalStorage?: number;
22-
usedStorage?: number;
23-
}
12+
interface userData {
13+
[fieldName: string]: string | boolean | undefined;
14+
}
15+
interface IIdentityCard extends HTMLAttributes<HTMLElement> {
16+
variant?: "eName" | "ePassport" | "eVault";
17+
userId?: string;
18+
viewBtn?: () => void;
19+
shareBtn?: () => void;
20+
userData?: userData;
21+
totalStorage?: number;
22+
usedStorage?: number;
23+
}
2424
25-
const {
26-
variant = "eName",
27-
userId,
28-
viewBtn,
29-
shareBtn,
30-
userData,
31-
totalStorage = 0,
32-
usedStorage = 0,
33-
...restProps
34-
}: IIdentityCard = $props();
35-
const state = $state({
36-
progressWidth: "0%",
37-
});
25+
const {
26+
variant = "eName",
27+
userId,
28+
viewBtn,
29+
shareBtn,
30+
userData,
31+
totalStorage = 0,
32+
usedStorage = 0,
33+
...restProps
34+
}: IIdentityCard = $props();
35+
const state = $state({
36+
progressWidth: "0%",
37+
});
3838
39-
$effect(() => {
40-
state.progressWidth =
41-
usedStorage > 0 ? `${(usedStorage / totalStorage) * 100}%` : "0%";
42-
});
39+
$effect(() => {
40+
state.progressWidth =
41+
usedStorage > 0 ? `${(usedStorage / totalStorage) * 100}%` : "0%";
42+
});
4343
44-
const baseClasses = `relative ${variant === "eName" ? "bg-black-900" : variant === "ePassport" ? "bg-primary" : "bg-gray"} rounded-3xl w-full min-h-[150px] text-white overflow-hidden`;
44+
const baseClasses = `relative ${variant === "eName" ? "bg-black-900" : variant === "ePassport" ? "bg-primary" : "bg-gray"} rounded-3xl w-full min-h-[150px] text-white overflow-hidden`;
4545
</script>
4646

4747
<div {...restProps} class={cn(baseClasses, restProps.class)}>
@@ -91,9 +91,7 @@ const baseClasses = `relative ${variant === "eName" ? "bg-black-900" : variant =
9191
class="bg-white text-black flex items-center leading-0 justify-center rounded-full h-7 px-5 text-xs font-medium"
9292
>
9393
{#if userData}
94-
{userData.isFake
95-
? "DEMO PASSPORT"
96-
: "VERIFIED PASSPORT"}
94+
{userData.isFake ? "DEMO ID" : "VERIFIED ID"}
9795
{/if}
9896
</p>
9997
{#if viewBtn}

infrastructure/eid-wallet/src/routes/(auth)/verify/+page.svelte

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,13 +244,18 @@
244244
loading = true;
245245
globalState.userController.user = {
246246
name: capitalize(
247-
`${person.firstName.value} ${person.lastName.value}`,
247+
`${person.firstName.value} ${person.lastName.value ?? ""}`,
248248
),
249249
"Date of Birth": new Date(
250250
person.dateOfBirth.value,
251251
).toDateString(),
252-
"ID submitted": `Passport - ${person.nationality.value}`,
253-
"Passport Number": document.number.value,
252+
"ID submitted":
253+
document.type.value === "passport"
254+
? `Passport - ${document.country.value}`
255+
: document.type.value === "drivers_license"
256+
? `Driving License - ${document.country.value}`
257+
: `ID Card - ${document.country.value}`,
258+
"Document Number": document.number.value,
254259
};
255260
globalState.userController.document = {
256261
"Valid From": new Date(document.validFrom.value).toDateString(),
@@ -322,8 +327,8 @@
322327
<section>
323328
<Hero title="Verify your account">
324329
{#snippet subtitle()}
325-
Get any ID ready. You’ll be directed to present your
326-
ID and take a quick selfie.
330+
Get any ID ready. You’ll be directed to present your ID and take
331+
a quick selfie.
327332
{/snippet}
328333
</Hero>
329334
<img class="mx-auto mt-20" src="images/Passport.svg" alt="passport" />

0 commit comments

Comments
 (0)