-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
close: #122 --------- Co-authored-by: Puria Nafisi Azizi <[email protected]>
- Loading branch information
1 parent
98bdb5f
commit 12426ff
Showing
10 changed files
with
166 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<script lang="ts"> | ||
import { createStepController } from '@efstajas/svelte-stepper'; | ||
import StepsController from './StepsController.svelte'; | ||
import { m } from '$lib/i18n'; | ||
export let index: number; | ||
export let total: number; | ||
const stepController = createStepController(); | ||
</script> | ||
|
||
<img src="https://placehold.co/400x600.png" alt="placeholder" /> | ||
<div class="flex h-full flex-col items-center justify-around gap-2 px-4"> | ||
<d-heading size="s">{m.Welcome_to_DID_Wallet()},</d-heading> | ||
<d-text size="xl" class="pb-4">{m.your_friendly_and_trustable_opensource_wallet_()}</d-text> | ||
<d-text size="m" | ||
>Lorem ipsum dolor sit amet consectetur. Adipiscing mauris sagittis amet arcu mauris leo.</d-text | ||
> | ||
<StepsController {index} {total} on:click={(e) => stepController.move(e.detail.value)} /> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script lang="ts"> | ||
import { createStepController } from '@efstajas/svelte-stepper'; | ||
import StepsController from './StepsController.svelte'; | ||
import { m } from '$lib/i18n'; | ||
export let index: number; | ||
export let total: number; | ||
const stepController = createStepController(); | ||
</script> | ||
|
||
<img src="https://placehold.co/400x600.png" alt="placeholder" /> | ||
<div class="flex h-full flex-col items-center justify-between gap-4 px-4"> | ||
<d-heading size="s">{m.Create_your_DID()}</d-heading> | ||
<d-text size="m" | ||
>Lorem ipsum dolor sit amet consectetur. Adipiscing mauris sagittis amet arcu mauris leo.</d-text | ||
> | ||
<StepsController {index} {total} on:click={(e) => stepController.move(e.detail.value)} /> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<script lang="ts"> | ||
import { createStepController } from '@efstajas/svelte-stepper'; | ||
import Dot from './dot.svelte'; | ||
import { completeOnBoarding } from './utils'; | ||
import { createEventDispatcher } from 'svelte'; | ||
export let index: number; | ||
export let total: number; | ||
const dispatch = createEventDispatcher(); | ||
function onEllipsisClick(by: number) { | ||
dispatch('click', { | ||
value: by | ||
}); | ||
} | ||
</script> | ||
|
||
<div class="flex-col fixed bottom-4 flex items-center"> | ||
<div class="flex gap-2"> | ||
{#each Array.from(Array(total).keys()) as page} | ||
{#if page === index} | ||
<Dot /> | ||
{:else} | ||
<button class="opacity-30" on:click={() => onEllipsisClick(page - index)}> | ||
<Dot /> | ||
</button> | ||
{/if} | ||
{/each} | ||
</div> | ||
|
||
<d-button | ||
on:click={completeOnBoarding} | ||
on:keydown={completeOnBoarding} | ||
aria-hidden | ||
clear | ||
color="accent" | ||
> | ||
{#if index === total - 1} | ||
Complete | ||
{:else} | ||
Skip | ||
{/if} | ||
</d-button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<script lang="ts"> | ||
import { createStepController } from '@efstajas/svelte-stepper'; | ||
import StepsController from './StepsController.svelte'; | ||
import { m } from '$lib/i18n'; | ||
export let index: number; | ||
export let total: number; | ||
const stepController = createStepController(); | ||
</script> | ||
|
||
<img src="https://placehold.co/400x600.png" alt="placeholder" /> | ||
<div class="flex h-full flex-col items-center justify-around gap-4 px-4"> | ||
<d-heading size="s">{m.Manage_VC_verifiable_credentials_in_one_place()}</d-heading> | ||
<d-text size="m" | ||
>Lorem ipsum dolor sit amet consectetur. Adipiscing mauris sagittis amet arcu mauris leo.</d-text | ||
> | ||
<StepsController {index} {total} on:click={(e) => stepController.move(e.detail.value)} /> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<svg width="9" height="8" viewBox="0 0 9 8" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<circle cx="4.5" cy="4" r="4" fill="#DFDDD7" /> | ||
</svg> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { goto } from "$app/navigation"; | ||
import { getPreference, setPreference } from "$lib/preferences"; | ||
|
||
const ISBOARDED_KEY = 'isBoarded'; | ||
|
||
export const completeOnBoarding = async ()=>{ | ||
await setPreference(ISBOARDED_KEY, 'true', false) | ||
goto("/home") | ||
} | ||
export async function isAlreadyBoarded(): Promise<boolean> { | ||
const isAlreadyBoardedString = await getPreference(ISBOARDED_KEY, false); | ||
if (!isAlreadyBoardedString) return false; | ||
return true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script lang="ts"> | ||
import First from '$lib/components/onBoarding/First.svelte'; | ||
import Second from '$lib/components/onBoarding/Second.svelte'; | ||
import Third from '$lib/components/onBoarding/Third.svelte'; | ||
import { Stepper, makeStep } from '@efstajas/svelte-stepper'; | ||
const steps = [ | ||
makeStep({ | ||
component: First, | ||
props: {index: 0, total: 3} | ||
}), | ||
makeStep({ | ||
component: Second, | ||
props: {index: 1, total: 3} | ||
}), | ||
makeStep({ | ||
component: Third, | ||
props: {index: 2, total: 3} | ||
}) | ||
]; | ||
</script> | ||
|
||
<Stepper {steps} disableTransitions /> |