Skip to content

Commit 83685ec

Browse files
committed
fix: height of page
1 parent 3c24428 commit 83685ec

File tree

6 files changed

+36
-8
lines changed

6 files changed

+36
-8
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ const cBase = "w-full h-[9vh] flex justify-between items-center";
2727
{:else}
2828
<span aria-hidden="true"></span>
2929
{/if}
30-
<h3 class="text-center">{title}</h3>
31-
{#if isUserLoggedIn}
30+
<h4 class="text-center">{title}</h4>
31+
<!-- {#if isUserLoggedIn}
3232
<Button.Icon icon={UserCircleIcon} iconSize="8.1vw" iconColor={"text-black-700"} onclick={handleProfile} />
33-
{:else}
33+
{:else} -->
3434
<span aria-hidden="true"></span>
35-
{/if}
35+
<!-- {/if} -->
3636
</header>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<script lang="ts">
2+
import { Header } from "$lib/fragments";
3+
import { runtime } from "$lib/global/runtime.svelte";
4+
5+
const { children } = $props();
6+
</script>
7+
8+
<main class="h-[100vh] px-[5vw] pb-[4.5vh]">
9+
<Header title={runtime.header.title ?? ""}/>
10+
{@render children?.()}
11+
</main>

infrastructure/eid-wallet/src/routes/(app)/settings/+page.svelte

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
<script lang="ts">
22
import { SettingsNavigationBtn } from "$lib/fragments";
3+
import { runtime } from "$lib/global/runtime.svelte";
34
import {
45
Key01Icon,
56
LanguageSquareIcon,
67
Link02Icon,
78
PinCodeIcon,
89
Shield01Icon,
910
} from "@hugeicons/core-free-icons";
11+
12+
$effect(() => {
13+
runtime.header.title = "Settings";
14+
});
1015
</script>
1116

12-
<main class="pt-[3vh] px-[5vw] pb-[4.5vh]">
17+
<main>
1318
<!-- header part -->
1419
<SettingsNavigationBtn icon={LanguageSquareIcon} label="Language" href="/settings/language"/>
1520
<SettingsNavigationBtn icon={Link02Icon} label="History" href="/settings/history"/>
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<script lang="ts">
2+
import { runtime } from "$lib/global/runtime.svelte";
3+
4+
$effect(() => {
5+
runtime.header.title = "History";
6+
});
27
</script>
38

49
<main>
5-
<h1>History Page</h1>
610
</main>

infrastructure/eid-wallet/src/routes/(app)/settings/language/+page.svelte

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<script lang="ts">
2+
import { runtime } from "$lib/global/runtime.svelte";
23
import { Selector } from "$lib/ui";
34
45
let languages: { name: string; country: string }[] = [
@@ -8,11 +9,15 @@ let languages: { name: string; country: string }[] = [
89
{ name: "French", country: "fr" },
910
];
1011
let selected = $state("");
12+
13+
$effect(() => {
14+
runtime.header.title = "Language";
15+
});
1116
</script>
1217

1318

1419

15-
<main class="pt-[3vh] px-[5vw] pb-[4.5vh]">
20+
<main>
1621
{#each languages as lang, i}
1722
<Selector id={`option-${i}`} name={lang.name} bind:selected value={lang.name}>
1823
{lang.name}

infrastructure/eid-wallet/src/routes/(app)/settings/pin/+page.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<script lang="ts">
2+
import { Header } from "$lib/fragments";
3+
import { runtime } from "$lib/global/runtime.svelte";
24
import { ButtonAction, Drawer, InputPin } from "$lib/ui";
35
import { CircleLock01Icon } from "@hugeicons/core-free-icons";
46
import { HugeiconsIcon } from "@hugeicons/svelte";
@@ -20,11 +22,12 @@ const handleChangePIN = async () => {
2022
};
2123
2224
$effect(() => {
25+
runtime.header.title = "Change PIN";
2326
if (repeatPin.length === 4 && newPin === repeatPin) isError = false;
2427
});
2528
</script>
2629

27-
<main class="h-[100vh] pt-[3vh] px-[5vw] pb-[4.5vh] flex flex-col justify-between gap-[3vh]">
30+
<main class="h-[calc(100vh-14vh)] flex flex-col justify-between">
2831
<section>
2932
<div>
3033
<p class="mb-[1vh]">Enter you current PIN</p>

0 commit comments

Comments
 (0)