Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 8
profile page#178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
profile page #178
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2e532f5
basic layout for profile page
ananyayaya129 6b6498a
profile component
ananyayaya129 c5d5710
fixed alt text
ananyayaya129 2ad5d23
merge conflict
ananyayaya129 21cb76a
merge conflict
ananyayaya129 fcaf75a
profile page for other users implemented
ananyayaya129 56425f5
fix: profile pages and logics
grv-saini-20 e3d92f6
fixed all the pages of profile
grv-saini-20 c8d7abf
fixed all the pages of profile
grv-saini-20 bf7e8c5
fix: format
grv-saini-20 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
78 changes: 39 additions & 39 deletions
78 infrastructure/eid-wallet/src/lib/fragments/IdentityCard/IdentityCard.svelte
This file contains hidden or 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
34 changes: 17 additions & 17 deletions
34 infrastructure/eid-wallet/src/routes/(app)/ePassport/+page.svelte
This file contains hidden or 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
58 changes: 29 additions & 29 deletions
58 infrastructure/eid-wallet/src/routes/(app)/main/+page.svelte
This file contains hidden or 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
174 changes: 87 additions & 87 deletions
174 infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte
This file contains hidden or 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 |
|---|---|---|
| @@ -1,97 +1,97 @@ | ||
| <script lang="ts"> | ||
| import AppNav from "$lib/fragments/AppNav/AppNav.svelte"; | ||
| import { Drawer } from "$lib/ui"; | ||
| import * as Button from "$lib/ui/Button"; | ||
| import { | ||
| FlashlightIcon, | ||
| Image02Icon, | ||
| QrCodeIcon, | ||
| } from "@hugeicons/core-free-icons"; | ||
| import { HugeiconsIcon } from "@hugeicons/svelte"; | ||
| import { | ||
| Format, | ||
| type PermissionState, | ||
| type Scanned, | ||
| cancel, | ||
| checkPermissions, | ||
| requestPermissions, | ||
| scan, | ||
| } from "@tauri-apps/plugin-barcode-scanner"; | ||
| import { onDestroy, onMount } from "svelte"; | ||
| import type { SVGAttributes } from "svelte/elements"; | ||
| const pathProps: SVGAttributes<SVGPathElement> = { | ||
| stroke: "white", | ||
| "stroke-width": 7, | ||
| "stroke-linecap": "round", | ||
| "stroke-linejoin": "round", | ||
| }; | ||
| let codeScannedDrawerOpen = $state(false); | ||
| let loggedInDrawerOpen = $state(false); | ||
| let flashlightOn = $state(false); | ||
| let scannedData: Scanned | undefined = $state(undefined); | ||
| let scanning = false; | ||
| let loading = false; | ||
| let permissions_nullable: PermissionState | null; | ||
| async function startScan() { | ||
| let permissions = await checkPermissions() | ||
| .then((permissions) => { | ||
| return permissions; | ||
| import AppNav from "$lib/fragments/AppNav/AppNav.svelte"; | ||
| import { Drawer } from "$lib/ui"; | ||
| import * as Button from "$lib/ui/Button"; | ||
| import { | ||
| FlashlightIcon, | ||
| Image02Icon, | ||
| QrCodeIcon, | ||
| } from "@hugeicons/core-free-icons"; | ||
| import { HugeiconsIcon } from "@hugeicons/svelte"; | ||
| import { | ||
| Format, | ||
| type PermissionState, | ||
| type Scanned, | ||
| cancel, | ||
| checkPermissions, | ||
| requestPermissions, | ||
| scan, | ||
| } from "@tauri-apps/plugin-barcode-scanner"; | ||
| import { onDestroy, onMount } from "svelte"; | ||
| import type { SVGAttributes } from "svelte/elements"; | ||
| const pathProps: SVGAttributes<SVGPathElement> = { | ||
| stroke: "white", | ||
| "stroke-width": 7, | ||
| "stroke-linecap": "round", | ||
| "stroke-linejoin": "round", | ||
| }; | ||
| let codeScannedDrawerOpen = $state(false); | ||
| let loggedInDrawerOpen = $state(false); | ||
| let flashlightOn = $state(false); | ||
| let scannedData: Scanned | undefined = $state(undefined); | ||
| let scanning = false; | ||
| let loading = false; | ||
| let permissions_nullable: PermissionState | null; | ||
| async function startScan() { | ||
| let permissions = await checkPermissions() | ||
| .then((permissions) => { | ||
| return permissions; | ||
| }) | ||
| .catch(() => { | ||
| return null; // possibly return "denied"? or does that imply that the check has been successful, but was actively denied? | ||
| }); | ||
| // TODO: handle receiving "prompt-with-rationale" (issue: https://github.com/tauri-apps/plugins-workspace/issues/979) | ||
| if (permissions === "prompt") { | ||
| permissions = await requestPermissions(); // handle in more detail? | ||
| } | ||
| permissions_nullable = permissions; | ||
| if (permissions === "granted") { | ||
| // Scanning parameters | ||
| const formats = [Format.QRCode]; | ||
| const windowed = true; | ||
| if (scanning) return; | ||
| scanning = true; | ||
| scan({ formats, windowed }) | ||
| .then((res) => { | ||
| console.log("Scan result:", res); | ||
| scannedData = res; | ||
| codeScannedDrawerOpen = true; | ||
| }) | ||
| .catch(() => { | ||
| return null; // possibly return "denied"? or does that imply that the check has been successful, but was actively denied? | ||
| .catch((error) => { | ||
| // TODO: display error to user | ||
| console.error("Scan error:", error); | ||
| }) | ||
| .finally(() => { | ||
| scanning = false; | ||
| }); | ||
| // TODO: handle receiving "prompt-with-rationale" (issue: https://github.com/tauri-apps/plugins-workspace/issues/979) | ||
| if (permissions === "prompt") { | ||
| permissions = await requestPermissions(); // handle in more detail? | ||
| } | ||
| permissions_nullable = permissions; | ||
| if (permissions === "granted") { | ||
| // Scanning parameters | ||
| const formats = [Format.QRCode]; | ||
| const windowed = true; | ||
| if (scanning) return; | ||
| scanning = true; | ||
| scan({ formats, windowed }) | ||
| .then((res) => { | ||
| console.log("Scan result:", res); | ||
| scannedData = res; | ||
| codeScannedDrawerOpen = true; | ||
| }) | ||
| .catch((error) => { | ||
| // TODO: display error to user | ||
| console.error("Scan error:", error); | ||
| }) | ||
| .finally(() => { | ||
| scanning = false; | ||
| }); | ||
| } | ||
| console.error("Permission denied or not granted"); | ||
| // TODO: consider handling GUI for permission denied | ||
| } | ||
| async function cancelScan() { | ||
| await cancel(); | ||
| scanning = false; | ||
| } | ||
| console.error("Permission denied or not granted"); | ||
| // TODO: consider handling GUI for permission denied | ||
| } | ||
This conversation was marked as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| async function cancelScan() { | ||
| await cancel(); | ||
| scanning = false; | ||
| } | ||
| onMount(async () => { | ||
| startScan(); | ||
| }); | ||
| onMount(async () => { | ||
| startScan(); | ||
| }); | ||
| onDestroy(async () => { | ||
| await cancelScan(); | ||
| }); | ||
| onDestroy(async () => { | ||
| await cancelScan(); | ||
| }); | ||
| </script> | ||
| <AppNav title="Scan QR Code" titleClasses="text-white" iconColor="white" /> | ||
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.