Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2b9497f
fix/drawers-replaced-with-component
grv-saini-20 Jan 5, 2026
c6afb22
fix: all drawers converted into components
grv-saini-20 Jan 5, 2026
474176a
fix: cancel scan still not stop the stream while drawer is open
grv-saini-20 Jan 5, 2026
0779ecd
fix: format
grv-saini-20 Jan 5, 2026
f08cefa
fix: media stream stopage
grv-saini-20 Jan 6, 2026
66fad6e
fix: styling of the drawers
grv-saini-20 Jan 7, 2026
ff6f753
fix: design of drawers
grv-saini-20 Jan 7, 2026
479f23f
fix: design change tables added to show data
grv-saini-20 Jan 7, 2026
f381c72
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
b0cfe7b
fix: suggestion
grv-saini-20 Jan 8, 2026
e776cd8
fix: button
grv-saini-20 Jan 8, 2026
ed19c8e
fix: css
grv-saini-20 Jan 8, 2026
8424270
fix: format
grv-saini-20 Jan 8, 2026
b0b50f4
fix: format
sosweetham Jan 8, 2026
a3a99e8
fix: table cell types
sosweetham Jan 8, 2026
fc9c57c
fix: suggestions
grv-saini-20 Jan 8, 2026
429ff56
Merge branch 'fix/drawers-replaced-with-component' of github.com:Meta…
grv-saini-20 Jan 8, 2026
ff1db0e
fix: code rabbit suggestions
grv-saini-20 Jan 8, 2026
8ef230d
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
272ebbc
fix: follow-button-message
grv-saini-20 Jan 15, 2026
7a30535
Merge branch 'main' of github.com:MetaState-Prototype-Project/prototype
grv-saini-20 Jan 15, 2026
0914208
fix: merge conflicts
grv-saini-20 Jan 15, 2026
c7729fd
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
26abb32
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
25a55be
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
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
11 changes: 7 additions & 4 deletions infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte
Original file line numberDiff line numberDiff line change
Expand Up@@ -84,13 +84,10 @@ onMount(() => {
return () => {
disposed = true;
cleanup?.();
cancelScan();
};
});

onDestroy(async () => {
await cancelScan();
});

$effect(() => {
console.log(
"🔍 DEBUG: selectedBlindVoteOption changed to:",
Expand DownExpand Up@@ -223,3 +220,9 @@ function handleRevealDrawerOpenChange(value: boolean) {
onReveal={handleRevealVote}
onOpenChange={handleRevealDrawerOpenChange}
/>

<style>
:global(body:has(.loggedin-drawer)) {
background-color: white !important;
}
</style>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand DownExpand Up@@ -28,110 +27,148 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
{#if internalOpen}
<div class="fixed inset-0 z-50 bg-white p-4 overflow-y-auto">
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>Code scanned!</h4>
<p class="text-black-700">You're trying to access the following site</p>
<h4 class="text-xl font-bold">Code scanned!</h4>
<p class="text-black-700 mt-1">
Please review the connection details below.
</p>

<div class="bg-gray rounded-2xl w-full p-4 mt-4">
<h4 class="text-base text-black-700">Platform Name</h4>
<p class="text-black-700 font-normal capitalize">
{platform ?? "Unable to get name"}
</p>
</div>
<div
class="w-full mt-6 border border-gray-100 rounded-2xl overflow-hidden bg-gray-50"
>
<table class="w-full border-collapse">
<tbody class="divide-y divide-gray-200">
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Platform Name
</div>
<div
class="text-sm text-black-700 font-medium capitalize mt-1 block"
>
{platform ?? "Unable to get name"}
</div>
</td>
</tr>

<div class="bg-gray rounded-2xl w-full p-4">
<h4 class="text-base text-black-700">Website URL</h4>
<p class="text-black-700 font-normal">
{hostname ?? scannedContent}
</p>
</div>
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Website URL
</div>
<div
class="text-sm text-black-700 font-medium break-all mt-1 block"
>
{hostname ?? scannedContent}
</div>
</td>
</tr>
</tbody>
</table>
</div>

{#if authError}
<div class="bg-red-50 border border-red-200 rounded-lg p-4 mt-4">
<div class="flex items-center">
<div class="flex-shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
{#if authError}
<div
class="bg-red-50 border border-red-200 rounded-lg p-4 w-full mt-4"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">Error</h3>
<div class="mt-2 text-sm text-red-700">
{authError}
<div class="flex items-center">
<div class="shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">
Error
</h3>
<div class="mt-1 text-sm text-red-700">
{authError}
</div>
</div>
</div>
</div>
{/if}
</div>

<div class="flex flex-col gap-3 pb-2 w-full pt-8">
<div class="flex justify-center gap-3 items-center w-full">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full whitespace-nowrap"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-1">
<p class="text-sm text-gray-600">
After confirmation, you may return to <strong
>{platform}</strong
> and continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<div class="flex justify-center gap-3 items-center mt-4">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
After confirmation, you may return to {platform} and continue
there
</p>
</div>
{/if}
</Drawer>

{/if}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand All@@ -23,42 +22,62 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
{#if internalOpen}
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
role="dialog"
aria-modal="true"
aria-labelledby="loggedin-title"
class="loggedin-drawer fixed inset-0 z-50 bg-white p-4 overflow-y-auto"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>You're logged in!</h4>
<p class="text-black-700">You're now connected to {platform}</p>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
Comment thread
grv-saini-20 marked this conversation as resolved.
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<div class="flex flex-col gap-3 mt-4">
{#if redirect && platform}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
You may return to {platform} and continue there
<h4 id="loggedin-title" class="text-xl font-bold">
You're logged in!
</h4>
<p class="text-gray-700">
You're now connected to {platform ?? "the platform"}
</p>
<div class="flex flex-col items-start py-6 w-full">
{#if redirect && platform}
<div class="text-start">
<p class="text-sm text-gray-600">
You may return to <strong>{platform}</strong> and
continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<Button.Action variant="soft" class="w-full" callback={onConfirm}>
Ok
</Button.Action>
<div class="flex flex-col gap-3 pb-2 w-full">
<Button.Action
variant="soft"
class="w-full"
callback={onConfirm}
>
Ok
</Button.Action>
</div>
</div>
</div>
</Drawer>

{/if}
Comment thread
grv-saini-20 marked this conversation as resolved.
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2b9497f
fix/drawers-replaced-with-component
grv-saini-20 Jan 5, 2026
c6afb22
fix: all drawers converted into components
grv-saini-20 Jan 5, 2026
474176a
fix: cancel scan still not stop the stream while drawer is open
grv-saini-20 Jan 5, 2026
0779ecd
fix: format
grv-saini-20 Jan 5, 2026
f08cefa
fix: media stream stopage
grv-saini-20 Jan 6, 2026
66fad6e
fix: styling of the drawers
grv-saini-20 Jan 7, 2026
ff6f753
fix: design of drawers
grv-saini-20 Jan 7, 2026
479f23f
fix: design change tables added to show data
grv-saini-20 Jan 7, 2026
f381c72
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
b0cfe7b
fix: suggestion
grv-saini-20 Jan 8, 2026
e776cd8
fix: button
grv-saini-20 Jan 8, 2026
ed19c8e
fix: css
grv-saini-20 Jan 8, 2026
8424270
fix: format
grv-saini-20 Jan 8, 2026
b0b50f4
fix: format
sosweetham Jan 8, 2026
a3a99e8
fix: table cell types
sosweetham Jan 8, 2026
fc9c57c
fix: suggestions
grv-saini-20 Jan 8, 2026
429ff56
Merge branch 'fix/drawers-replaced-with-component' of github.com:Meta…
grv-saini-20 Jan 8, 2026
ff1db0e
fix: code rabbit suggestions
grv-saini-20 Jan 8, 2026
8ef230d
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
272ebbc
fix: follow-button-message
grv-saini-20 Jan 15, 2026
7a30535
Merge branch 'main' of github.com:MetaState-Prototype-Project/prototype
grv-saini-20 Jan 15, 2026
0914208
fix: merge conflicts
grv-saini-20 Jan 15, 2026
c7729fd
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
26abb32
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
25a55be
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
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
11 changes: 7 additions & 4 deletions infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte
Original file line numberDiff line numberDiff line change
Expand Up@@ -84,13 +84,10 @@ onMount(() => {
return () => {
disposed = true;
cleanup?.();
cancelScan();
};
});

onDestroy(async () => {
await cancelScan();
});

$effect(() => {
console.log(
"🔍 DEBUG: selectedBlindVoteOption changed to:",
Expand DownExpand Up@@ -223,3 +220,9 @@ function handleRevealDrawerOpenChange(value: boolean) {
onReveal={handleRevealVote}
onOpenChange={handleRevealDrawerOpenChange}
/>

<style>
:global(body:has(.loggedin-drawer)) {
background-color: white !important;
}
</style>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand DownExpand Up@@ -28,110 +27,148 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
{#if internalOpen}
<div class="fixed inset-0 z-50 bg-white p-4 overflow-y-auto">
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>Code scanned!</h4>
<p class="text-black-700">You're trying to access the following site</p>
<h4 class="text-xl font-bold">Code scanned!</h4>
<p class="text-black-700 mt-1">
Please review the connection details below.
</p>

<div class="bg-gray rounded-2xl w-full p-4 mt-4">
<h4 class="text-base text-black-700">Platform Name</h4>
<p class="text-black-700 font-normal capitalize">
{platform ?? "Unable to get name"}
</p>
</div>
<div
class="w-full mt-6 border border-gray-100 rounded-2xl overflow-hidden bg-gray-50"
>
<table class="w-full border-collapse">
<tbody class="divide-y divide-gray-200">
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Platform Name
</div>
<div
class="text-sm text-black-700 font-medium capitalize mt-1 block"
>
{platform ?? "Unable to get name"}
</div>
</td>
</tr>

<div class="bg-gray rounded-2xl w-full p-4">
<h4 class="text-base text-black-700">Website URL</h4>
<p class="text-black-700 font-normal">
{hostname ?? scannedContent}
</p>
</div>
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Website URL
</div>
<div
class="text-sm text-black-700 font-medium break-all mt-1 block"
>
{hostname ?? scannedContent}
</div>
</td>
</tr>
</tbody>
</table>
</div>

{#if authError}
<div class="bg-red-50 border border-red-200 rounded-lg p-4 mt-4">
<div class="flex items-center">
<div class="flex-shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
{#if authError}
<div
class="bg-red-50 border border-red-200 rounded-lg p-4 w-full mt-4"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">Error</h3>
<div class="mt-2 text-sm text-red-700">
{authError}
<div class="flex items-center">
<div class="shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">
Error
</h3>
<div class="mt-1 text-sm text-red-700">
{authError}
</div>
</div>
</div>
</div>
{/if}
</div>

<div class="flex flex-col gap-3 pb-2 w-full pt-8">
<div class="flex justify-center gap-3 items-center w-full">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full whitespace-nowrap"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-1">
<p class="text-sm text-gray-600">
After confirmation, you may return to <strong
>{platform}</strong
> and continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<div class="flex justify-center gap-3 items-center mt-4">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
After confirmation, you may return to {platform} and continue
there
</p>
</div>
{/if}
</Drawer>

{/if}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand All@@ -23,42 +22,62 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
{#if internalOpen}
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
role="dialog"
aria-modal="true"
aria-labelledby="loggedin-title"
class="loggedin-drawer fixed inset-0 z-50 bg-white p-4 overflow-y-auto"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>You're logged in!</h4>
<p class="text-black-700">You're now connected to {platform}</p>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
Comment thread
grv-saini-20 marked this conversation as resolved.
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<div class="flex flex-col gap-3 mt-4">
{#if redirect && platform}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
You may return to {platform} and continue there
<h4 id="loggedin-title" class="text-xl font-bold">
You're logged in!
</h4>
<p class="text-gray-700">
You're now connected to {platform ?? "the platform"}
</p>
<div class="flex flex-col items-start py-6 w-full">
{#if redirect && platform}
<div class="text-start">
<p class="text-sm text-gray-600">
You may return to <strong>{platform}</strong> and
continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<Button.Action variant="soft" class="w-full" callback={onConfirm}>
Ok
</Button.Action>
<div class="flex flex-col gap-3 pb-2 w-full">
<Button.Action
variant="soft"
class="w-full"
callback={onConfirm}
>
Ok
</Button.Action>
</div>
</div>
</div>
</Drawer>

{/if}
Comment thread
grv-saini-20 marked this conversation as resolved.
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2b9497f
fix/drawers-replaced-with-component
grv-saini-20 Jan 5, 2026
c6afb22
fix: all drawers converted into components
grv-saini-20 Jan 5, 2026
474176a
fix: cancel scan still not stop the stream while drawer is open
grv-saini-20 Jan 5, 2026
0779ecd
fix: format
grv-saini-20 Jan 5, 2026
f08cefa
fix: media stream stopage
grv-saini-20 Jan 6, 2026
66fad6e
fix: styling of the drawers
grv-saini-20 Jan 7, 2026
ff6f753
fix: design of drawers
grv-saini-20 Jan 7, 2026
479f23f
fix: design change tables added to show data
grv-saini-20 Jan 7, 2026
f381c72
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
b0cfe7b
fix: suggestion
grv-saini-20 Jan 8, 2026
e776cd8
fix: button
grv-saini-20 Jan 8, 2026
ed19c8e
fix: css
grv-saini-20 Jan 8, 2026
8424270
fix: format
grv-saini-20 Jan 8, 2026
b0b50f4
fix: format
sosweetham Jan 8, 2026
a3a99e8
fix: table cell types
sosweetham Jan 8, 2026
fc9c57c
fix: suggestions
grv-saini-20 Jan 8, 2026
429ff56
Merge branch 'fix/drawers-replaced-with-component' of github.com:Meta…
grv-saini-20 Jan 8, 2026
ff1db0e
fix: code rabbit suggestions
grv-saini-20 Jan 8, 2026
8ef230d
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
272ebbc
fix: follow-button-message
grv-saini-20 Jan 15, 2026
7a30535
Merge branch 'main' of github.com:MetaState-Prototype-Project/prototype
grv-saini-20 Jan 15, 2026
0914208
fix: merge conflicts
grv-saini-20 Jan 15, 2026
c7729fd
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
26abb32
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
25a55be
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
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
11 changes: 7 additions & 4 deletions infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte
Original file line numberDiff line numberDiff line change
Expand Up@@ -84,13 +84,10 @@ onMount(() => {
return () => {
disposed = true;
cleanup?.();
cancelScan();
};
});

onDestroy(async () => {
await cancelScan();
});

$effect(() => {
console.log(
"🔍 DEBUG: selectedBlindVoteOption changed to:",
Expand DownExpand Up@@ -223,3 +220,9 @@ function handleRevealDrawerOpenChange(value: boolean) {
onReveal={handleRevealVote}
onOpenChange={handleRevealDrawerOpenChange}
/>

<style>
:global(body:has(.loggedin-drawer)) {
background-color: white !important;
}
</style>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand DownExpand Up@@ -28,110 +27,148 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
{#if internalOpen}
<div class="fixed inset-0 z-50 bg-white p-4 overflow-y-auto">
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>Code scanned!</h4>
<p class="text-black-700">You're trying to access the following site</p>
<h4 class="text-xl font-bold">Code scanned!</h4>
<p class="text-black-700 mt-1">
Please review the connection details below.
</p>

<div class="bg-gray rounded-2xl w-full p-4 mt-4">
<h4 class="text-base text-black-700">Platform Name</h4>
<p class="text-black-700 font-normal capitalize">
{platform ?? "Unable to get name"}
</p>
</div>
<div
class="w-full mt-6 border border-gray-100 rounded-2xl overflow-hidden bg-gray-50"
>
<table class="w-full border-collapse">
<tbody class="divide-y divide-gray-200">
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Platform Name
</div>
<div
class="text-sm text-black-700 font-medium capitalize mt-1 block"
>
{platform ?? "Unable to get name"}
</div>
</td>
</tr>

<div class="bg-gray rounded-2xl w-full p-4">
<h4 class="text-base text-black-700">Website URL</h4>
<p class="text-black-700 font-normal">
{hostname ?? scannedContent}
</p>
</div>
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Website URL
</div>
<div
class="text-sm text-black-700 font-medium break-all mt-1 block"
>
{hostname ?? scannedContent}
</div>
</td>
</tr>
</tbody>
</table>
</div>

{#if authError}
<div class="bg-red-50 border border-red-200 rounded-lg p-4 mt-4">
<div class="flex items-center">
<div class="flex-shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
{#if authError}
<div
class="bg-red-50 border border-red-200 rounded-lg p-4 w-full mt-4"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">Error</h3>
<div class="mt-2 text-sm text-red-700">
{authError}
<div class="flex items-center">
<div class="shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">
Error
</h3>
<div class="mt-1 text-sm text-red-700">
{authError}
</div>
</div>
</div>
</div>
{/if}
</div>

<div class="flex flex-col gap-3 pb-2 w-full pt-8">
<div class="flex justify-center gap-3 items-center w-full">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full whitespace-nowrap"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-1">
<p class="text-sm text-gray-600">
After confirmation, you may return to <strong
>{platform}</strong
> and continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<div class="flex justify-center gap-3 items-center mt-4">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
After confirmation, you may return to {platform} and continue
there
</p>
</div>
{/if}
</Drawer>

{/if}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand All@@ -23,42 +22,62 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
{#if internalOpen}
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
role="dialog"
aria-modal="true"
aria-labelledby="loggedin-title"
class="loggedin-drawer fixed inset-0 z-50 bg-white p-4 overflow-y-auto"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>You're logged in!</h4>
<p class="text-black-700">You're now connected to {platform}</p>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
Comment thread
grv-saini-20 marked this conversation as resolved.
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<div class="flex flex-col gap-3 mt-4">
{#if redirect && platform}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
You may return to {platform} and continue there
<h4 id="loggedin-title" class="text-xl font-bold">
You're logged in!
</h4>
<p class="text-gray-700">
You're now connected to {platform ?? "the platform"}
</p>
<div class="flex flex-col items-start py-6 w-full">
{#if redirect && platform}
<div class="text-start">
<p class="text-sm text-gray-600">
You may return to <strong>{platform}</strong> and
continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<Button.Action variant="soft" class="w-full" callback={onConfirm}>
Ok
</Button.Action>
<div class="flex flex-col gap-3 pb-2 w-full">
<Button.Action
variant="soft"
class="w-full"
callback={onConfirm}
>
Ok
</Button.Action>
</div>
</div>
</div>
</Drawer>

{/if}
Comment thread
grv-saini-20 marked this conversation as resolved.
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2b9497f
fix/drawers-replaced-with-component
grv-saini-20 Jan 5, 2026
c6afb22
fix: all drawers converted into components
grv-saini-20 Jan 5, 2026
474176a
fix: cancel scan still not stop the stream while drawer is open
grv-saini-20 Jan 5, 2026
0779ecd
fix: format
grv-saini-20 Jan 5, 2026
f08cefa
fix: media stream stopage
grv-saini-20 Jan 6, 2026
66fad6e
fix: styling of the drawers
grv-saini-20 Jan 7, 2026
ff6f753
fix: design of drawers
grv-saini-20 Jan 7, 2026
479f23f
fix: design change tables added to show data
grv-saini-20 Jan 7, 2026
f381c72
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
b0cfe7b
fix: suggestion
grv-saini-20 Jan 8, 2026
e776cd8
fix: button
grv-saini-20 Jan 8, 2026
ed19c8e
fix: css
grv-saini-20 Jan 8, 2026
8424270
fix: format
grv-saini-20 Jan 8, 2026
b0b50f4
fix: format
sosweetham Jan 8, 2026
a3a99e8
fix: table cell types
sosweetham Jan 8, 2026
fc9c57c
fix: suggestions
grv-saini-20 Jan 8, 2026
429ff56
Merge branch 'fix/drawers-replaced-with-component' of github.com:Meta…
grv-saini-20 Jan 8, 2026
ff1db0e
fix: code rabbit suggestions
grv-saini-20 Jan 8, 2026
8ef230d
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
272ebbc
fix: follow-button-message
grv-saini-20 Jan 15, 2026
7a30535
Merge branch 'main' of github.com:MetaState-Prototype-Project/prototype
grv-saini-20 Jan 15, 2026
0914208
fix: merge conflicts
grv-saini-20 Jan 15, 2026
c7729fd
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
26abb32
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
25a55be
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
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
11 changes: 7 additions & 4 deletions infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte
Original file line numberDiff line numberDiff line change
Expand Up@@ -84,13 +84,10 @@ onMount(() => {
return () => {
disposed = true;
cleanup?.();
cancelScan();
};
});

onDestroy(async () => {
await cancelScan();
});

$effect(() => {
console.log(
"🔍 DEBUG: selectedBlindVoteOption changed to:",
Expand DownExpand Up@@ -223,3 +220,9 @@ function handleRevealDrawerOpenChange(value: boolean) {
onReveal={handleRevealVote}
onOpenChange={handleRevealDrawerOpenChange}
/>

<style>
:global(body:has(.loggedin-drawer)) {
background-color: white !important;
}
</style>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand DownExpand Up@@ -28,110 +27,148 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
{#if internalOpen}
<div class="fixed inset-0 z-50 bg-white p-4 overflow-y-auto">
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>Code scanned!</h4>
<p class="text-black-700">You're trying to access the following site</p>
<h4 class="text-xl font-bold">Code scanned!</h4>
<p class="text-black-700 mt-1">
Please review the connection details below.
</p>

<div class="bg-gray rounded-2xl w-full p-4 mt-4">
<h4 class="text-base text-black-700">Platform Name</h4>
<p class="text-black-700 font-normal capitalize">
{platform ?? "Unable to get name"}
</p>
</div>
<div
class="w-full mt-6 border border-gray-100 rounded-2xl overflow-hidden bg-gray-50"
>
<table class="w-full border-collapse">
<tbody class="divide-y divide-gray-200">
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Platform Name
</div>
<div
class="text-sm text-black-700 font-medium capitalize mt-1 block"
>
{platform ?? "Unable to get name"}
</div>
</td>
</tr>

<div class="bg-gray rounded-2xl w-full p-4">
<h4 class="text-base text-black-700">Website URL</h4>
<p class="text-black-700 font-normal">
{hostname ?? scannedContent}
</p>
</div>
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Website URL
</div>
<div
class="text-sm text-black-700 font-medium break-all mt-1 block"
>
{hostname ?? scannedContent}
</div>
</td>
</tr>
</tbody>
</table>
</div>

{#if authError}
<div class="bg-red-50 border border-red-200 rounded-lg p-4 mt-4">
<div class="flex items-center">
<div class="flex-shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
{#if authError}
<div
class="bg-red-50 border border-red-200 rounded-lg p-4 w-full mt-4"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">Error</h3>
<div class="mt-2 text-sm text-red-700">
{authError}
<div class="flex items-center">
<div class="shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">
Error
</h3>
<div class="mt-1 text-sm text-red-700">
{authError}
</div>
</div>
</div>
</div>
{/if}
</div>

<div class="flex flex-col gap-3 pb-2 w-full pt-8">
<div class="flex justify-center gap-3 items-center w-full">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full whitespace-nowrap"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-1">
<p class="text-sm text-gray-600">
After confirmation, you may return to <strong
>{platform}</strong
> and continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<div class="flex justify-center gap-3 items-center mt-4">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
After confirmation, you may return to {platform} and continue
there
</p>
</div>
{/if}
</Drawer>

{/if}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand All@@ -23,42 +22,62 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
{#if internalOpen}
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
role="dialog"
aria-modal="true"
aria-labelledby="loggedin-title"
class="loggedin-drawer fixed inset-0 z-50 bg-white p-4 overflow-y-auto"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>You're logged in!</h4>
<p class="text-black-700">You're now connected to {platform}</p>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
Comment thread
grv-saini-20 marked this conversation as resolved.
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<div class="flex flex-col gap-3 mt-4">
{#if redirect && platform}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
You may return to {platform} and continue there
<h4 id="loggedin-title" class="text-xl font-bold">
You're logged in!
</h4>
<p class="text-gray-700">
You're now connected to {platform ?? "the platform"}
</p>
<div class="flex flex-col items-start py-6 w-full">
{#if redirect && platform}
<div class="text-start">
<p class="text-sm text-gray-600">
You may return to <strong>{platform}</strong> and
continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<Button.Action variant="soft" class="w-full" callback={onConfirm}>
Ok
</Button.Action>
<div class="flex flex-col gap-3 pb-2 w-full">
<Button.Action
variant="soft"
class="w-full"
callback={onConfirm}
>
Ok
</Button.Action>
</div>
</div>
</div>
</Drawer>

{/if}
Comment thread
grv-saini-20 marked this conversation as resolved.
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2b9497f
fix/drawers-replaced-with-component
grv-saini-20 Jan 5, 2026
c6afb22
fix: all drawers converted into components
grv-saini-20 Jan 5, 2026
474176a
fix: cancel scan still not stop the stream while drawer is open
grv-saini-20 Jan 5, 2026
0779ecd
fix: format
grv-saini-20 Jan 5, 2026
f08cefa
fix: media stream stopage
grv-saini-20 Jan 6, 2026
66fad6e
fix: styling of the drawers
grv-saini-20 Jan 7, 2026
ff6f753
fix: design of drawers
grv-saini-20 Jan 7, 2026
479f23f
fix: design change tables added to show data
grv-saini-20 Jan 7, 2026
f381c72
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
b0cfe7b
fix: suggestion
grv-saini-20 Jan 8, 2026
e776cd8
fix: button
grv-saini-20 Jan 8, 2026
ed19c8e
fix: css
grv-saini-20 Jan 8, 2026
8424270
fix: format
grv-saini-20 Jan 8, 2026
b0b50f4
fix: format
sosweetham Jan 8, 2026
a3a99e8
fix: table cell types
sosweetham Jan 8, 2026
fc9c57c
fix: suggestions
grv-saini-20 Jan 8, 2026
429ff56
Merge branch 'fix/drawers-replaced-with-component' of github.com:Meta…
grv-saini-20 Jan 8, 2026
ff1db0e
fix: code rabbit suggestions
grv-saini-20 Jan 8, 2026
8ef230d
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
272ebbc
fix: follow-button-message
grv-saini-20 Jan 15, 2026
7a30535
Merge branch 'main' of github.com:MetaState-Prototype-Project/prototype
grv-saini-20 Jan 15, 2026
0914208
fix: merge conflicts
grv-saini-20 Jan 15, 2026
c7729fd
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
26abb32
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
25a55be
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
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
11 changes: 7 additions & 4 deletions infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte
Original file line numberDiff line numberDiff line change
Expand Up@@ -84,13 +84,10 @@ onMount(() => {
return () => {
disposed = true;
cleanup?.();
cancelScan();
};
});

onDestroy(async () => {
await cancelScan();
});

$effect(() => {
console.log(
"🔍 DEBUG: selectedBlindVoteOption changed to:",
Expand DownExpand Up@@ -223,3 +220,9 @@ function handleRevealDrawerOpenChange(value: boolean) {
onReveal={handleRevealVote}
onOpenChange={handleRevealDrawerOpenChange}
/>

<style>
:global(body:has(.loggedin-drawer)) {
background-color: white !important;
}
</style>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand DownExpand Up@@ -28,110 +27,148 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
{#if internalOpen}
<div class="fixed inset-0 z-50 bg-white p-4 overflow-y-auto">
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>Code scanned!</h4>
<p class="text-black-700">You're trying to access the following site</p>
<h4 class="text-xl font-bold">Code scanned!</h4>
<p class="text-black-700 mt-1">
Please review the connection details below.
</p>

<div class="bg-gray rounded-2xl w-full p-4 mt-4">
<h4 class="text-base text-black-700">Platform Name</h4>
<p class="text-black-700 font-normal capitalize">
{platform ?? "Unable to get name"}
</p>
</div>
<div
class="w-full mt-6 border border-gray-100 rounded-2xl overflow-hidden bg-gray-50"
>
<table class="w-full border-collapse">
<tbody class="divide-y divide-gray-200">
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Platform Name
</div>
<div
class="text-sm text-black-700 font-medium capitalize mt-1 block"
>
{platform ?? "Unable to get name"}
</div>
</td>
</tr>

<div class="bg-gray rounded-2xl w-full p-4">
<h4 class="text-base text-black-700">Website URL</h4>
<p class="text-black-700 font-normal">
{hostname ?? scannedContent}
</p>
</div>
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Website URL
</div>
<div
class="text-sm text-black-700 font-medium break-all mt-1 block"
>
{hostname ?? scannedContent}
</div>
</td>
</tr>
</tbody>
</table>
</div>

{#if authError}
<div class="bg-red-50 border border-red-200 rounded-lg p-4 mt-4">
<div class="flex items-center">
<div class="flex-shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
{#if authError}
<div
class="bg-red-50 border border-red-200 rounded-lg p-4 w-full mt-4"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">Error</h3>
<div class="mt-2 text-sm text-red-700">
{authError}
<div class="flex items-center">
<div class="shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">
Error
</h3>
<div class="mt-1 text-sm text-red-700">
{authError}
</div>
</div>
</div>
</div>
{/if}
</div>

<div class="flex flex-col gap-3 pb-2 w-full pt-8">
<div class="flex justify-center gap-3 items-center w-full">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full whitespace-nowrap"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-1">
<p class="text-sm text-gray-600">
After confirmation, you may return to <strong
>{platform}</strong
> and continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<div class="flex justify-center gap-3 items-center mt-4">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
After confirmation, you may return to {platform} and continue
there
</p>
</div>
{/if}
</Drawer>

{/if}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand All@@ -23,42 +22,62 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
{#if internalOpen}
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
role="dialog"
aria-modal="true"
aria-labelledby="loggedin-title"
class="loggedin-drawer fixed inset-0 z-50 bg-white p-4 overflow-y-auto"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>You're logged in!</h4>
<p class="text-black-700">You're now connected to {platform}</p>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
Comment thread
grv-saini-20 marked this conversation as resolved.
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<div class="flex flex-col gap-3 mt-4">
{#if redirect && platform}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
You may return to {platform} and continue there
<h4 id="loggedin-title" class="text-xl font-bold">
You're logged in!
</h4>
<p class="text-gray-700">
You're now connected to {platform ?? "the platform"}
</p>
<div class="flex flex-col items-start py-6 w-full">
{#if redirect && platform}
<div class="text-start">
<p class="text-sm text-gray-600">
You may return to <strong>{platform}</strong> and
continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<Button.Action variant="soft" class="w-full" callback={onConfirm}>
Ok
</Button.Action>
<div class="flex flex-col gap-3 pb-2 w-full">
<Button.Action
variant="soft"
class="w-full"
callback={onConfirm}
>
Ok
</Button.Action>
</div>
</div>
</div>
</Drawer>

{/if}
Comment thread
grv-saini-20 marked this conversation as resolved.
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2b9497f
fix/drawers-replaced-with-component
grv-saini-20 Jan 5, 2026
c6afb22
fix: all drawers converted into components
grv-saini-20 Jan 5, 2026
474176a
fix: cancel scan still not stop the stream while drawer is open
grv-saini-20 Jan 5, 2026
0779ecd
fix: format
grv-saini-20 Jan 5, 2026
f08cefa
fix: media stream stopage
grv-saini-20 Jan 6, 2026
66fad6e
fix: styling of the drawers
grv-saini-20 Jan 7, 2026
ff6f753
fix: design of drawers
grv-saini-20 Jan 7, 2026
479f23f
fix: design change tables added to show data
grv-saini-20 Jan 7, 2026
f381c72
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
b0cfe7b
fix: suggestion
grv-saini-20 Jan 8, 2026
e776cd8
fix: button
grv-saini-20 Jan 8, 2026
ed19c8e
fix: css
grv-saini-20 Jan 8, 2026
8424270
fix: format
grv-saini-20 Jan 8, 2026
b0b50f4
fix: format
sosweetham Jan 8, 2026
a3a99e8
fix: table cell types
sosweetham Jan 8, 2026
fc9c57c
fix: suggestions
grv-saini-20 Jan 8, 2026
429ff56
Merge branch 'fix/drawers-replaced-with-component' of github.com:Meta…
grv-saini-20 Jan 8, 2026
ff1db0e
fix: code rabbit suggestions
grv-saini-20 Jan 8, 2026
8ef230d
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
272ebbc
fix: follow-button-message
grv-saini-20 Jan 15, 2026
7a30535
Merge branch 'main' of github.com:MetaState-Prototype-Project/prototype
grv-saini-20 Jan 15, 2026
0914208
fix: merge conflicts
grv-saini-20 Jan 15, 2026
c7729fd
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
26abb32
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
25a55be
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
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
11 changes: 7 additions & 4 deletions infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte
Original file line numberDiff line numberDiff line change
Expand Up@@ -84,13 +84,10 @@ onMount(() => {
return () => {
disposed = true;
cleanup?.();
cancelScan();
};
});

onDestroy(async () => {
await cancelScan();
});

$effect(() => {
console.log(
"🔍 DEBUG: selectedBlindVoteOption changed to:",
Expand DownExpand Up@@ -223,3 +220,9 @@ function handleRevealDrawerOpenChange(value: boolean) {
onReveal={handleRevealVote}
onOpenChange={handleRevealDrawerOpenChange}
/>

<style>
:global(body:has(.loggedin-drawer)) {
background-color: white !important;
}
</style>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand DownExpand Up@@ -28,110 +27,148 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
{#if internalOpen}
<div class="fixed inset-0 z-50 bg-white p-4 overflow-y-auto">
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>Code scanned!</h4>
<p class="text-black-700">You're trying to access the following site</p>
<h4 class="text-xl font-bold">Code scanned!</h4>
<p class="text-black-700 mt-1">
Please review the connection details below.
</p>

<div class="bg-gray rounded-2xl w-full p-4 mt-4">
<h4 class="text-base text-black-700">Platform Name</h4>
<p class="text-black-700 font-normal capitalize">
{platform ?? "Unable to get name"}
</p>
</div>
<div
class="w-full mt-6 border border-gray-100 rounded-2xl overflow-hidden bg-gray-50"
>
<table class="w-full border-collapse">
<tbody class="divide-y divide-gray-200">
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Platform Name
</div>
<div
class="text-sm text-black-700 font-medium capitalize mt-1 block"
>
{platform ?? "Unable to get name"}
</div>
</td>
</tr>

<div class="bg-gray rounded-2xl w-full p-4">
<h4 class="text-base text-black-700">Website URL</h4>
<p class="text-black-700 font-normal">
{hostname ?? scannedContent}
</p>
</div>
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Website URL
</div>
<div
class="text-sm text-black-700 font-medium break-all mt-1 block"
>
{hostname ?? scannedContent}
</div>
</td>
</tr>
</tbody>
</table>
</div>

{#if authError}
<div class="bg-red-50 border border-red-200 rounded-lg p-4 mt-4">
<div class="flex items-center">
<div class="flex-shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
{#if authError}
<div
class="bg-red-50 border border-red-200 rounded-lg p-4 w-full mt-4"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">Error</h3>
<div class="mt-2 text-sm text-red-700">
{authError}
<div class="flex items-center">
<div class="shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">
Error
</h3>
<div class="mt-1 text-sm text-red-700">
{authError}
</div>
</div>
</div>
</div>
{/if}
</div>

<div class="flex flex-col gap-3 pb-2 w-full pt-8">
<div class="flex justify-center gap-3 items-center w-full">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full whitespace-nowrap"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-1">
<p class="text-sm text-gray-600">
After confirmation, you may return to <strong
>{platform}</strong
> and continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<div class="flex justify-center gap-3 items-center mt-4">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
After confirmation, you may return to {platform} and continue
there
</p>
</div>
{/if}
</Drawer>

{/if}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand All@@ -23,42 +22,62 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
{#if internalOpen}
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
role="dialog"
aria-modal="true"
aria-labelledby="loggedin-title"
class="loggedin-drawer fixed inset-0 z-50 bg-white p-4 overflow-y-auto"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>You're logged in!</h4>
<p class="text-black-700">You're now connected to {platform}</p>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
Comment thread
grv-saini-20 marked this conversation as resolved.
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<div class="flex flex-col gap-3 mt-4">
{#if redirect && platform}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
You may return to {platform} and continue there
<h4 id="loggedin-title" class="text-xl font-bold">
You're logged in!
</h4>
<p class="text-gray-700">
You're now connected to {platform ?? "the platform"}
</p>
<div class="flex flex-col items-start py-6 w-full">
{#if redirect && platform}
<div class="text-start">
<p class="text-sm text-gray-600">
You may return to <strong>{platform}</strong> and
continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<Button.Action variant="soft" class="w-full" callback={onConfirm}>
Ok
</Button.Action>
<div class="flex flex-col gap-3 pb-2 w-full">
<Button.Action
variant="soft"
class="w-full"
callback={onConfirm}
>
Ok
</Button.Action>
</div>
</div>
</div>
</Drawer>

{/if}
Comment thread
grv-saini-20 marked this conversation as resolved.
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2b9497f
fix/drawers-replaced-with-component
grv-saini-20 Jan 5, 2026
c6afb22
fix: all drawers converted into components
grv-saini-20 Jan 5, 2026
474176a
fix: cancel scan still not stop the stream while drawer is open
grv-saini-20 Jan 5, 2026
0779ecd
fix: format
grv-saini-20 Jan 5, 2026
f08cefa
fix: media stream stopage
grv-saini-20 Jan 6, 2026
66fad6e
fix: styling of the drawers
grv-saini-20 Jan 7, 2026
ff6f753
fix: design of drawers
grv-saini-20 Jan 7, 2026
479f23f
fix: design change tables added to show data
grv-saini-20 Jan 7, 2026
f381c72
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
b0cfe7b
fix: suggestion
grv-saini-20 Jan 8, 2026
e776cd8
fix: button
grv-saini-20 Jan 8, 2026
ed19c8e
fix: css
grv-saini-20 Jan 8, 2026
8424270
fix: format
grv-saini-20 Jan 8, 2026
b0b50f4
fix: format
sosweetham Jan 8, 2026
a3a99e8
fix: table cell types
sosweetham Jan 8, 2026
fc9c57c
fix: suggestions
grv-saini-20 Jan 8, 2026
429ff56
Merge branch 'fix/drawers-replaced-with-component' of github.com:Meta…
grv-saini-20 Jan 8, 2026
ff1db0e
fix: code rabbit suggestions
grv-saini-20 Jan 8, 2026
8ef230d
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
272ebbc
fix: follow-button-message
grv-saini-20 Jan 15, 2026
7a30535
Merge branch 'main' of github.com:MetaState-Prototype-Project/prototype
grv-saini-20 Jan 15, 2026
0914208
fix: merge conflicts
grv-saini-20 Jan 15, 2026
c7729fd
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
26abb32
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
25a55be
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
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
11 changes: 7 additions & 4 deletions infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte
Original file line numberDiff line numberDiff line change
Expand Up@@ -84,13 +84,10 @@ onMount(() => {
return () => {
disposed = true;
cleanup?.();
cancelScan();
};
});

onDestroy(async () => {
await cancelScan();
});

$effect(() => {
console.log(
"🔍 DEBUG: selectedBlindVoteOption changed to:",
Expand DownExpand Up@@ -223,3 +220,9 @@ function handleRevealDrawerOpenChange(value: boolean) {
onReveal={handleRevealVote}
onOpenChange={handleRevealDrawerOpenChange}
/>

<style>
:global(body:has(.loggedin-drawer)) {
background-color: white !important;
}
</style>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand DownExpand Up@@ -28,110 +27,148 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
{#if internalOpen}
<div class="fixed inset-0 z-50 bg-white p-4 overflow-y-auto">
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>Code scanned!</h4>
<p class="text-black-700">You're trying to access the following site</p>
<h4 class="text-xl font-bold">Code scanned!</h4>
<p class="text-black-700 mt-1">
Please review the connection details below.
</p>

<div class="bg-gray rounded-2xl w-full p-4 mt-4">
<h4 class="text-base text-black-700">Platform Name</h4>
<p class="text-black-700 font-normal capitalize">
{platform ?? "Unable to get name"}
</p>
</div>
<div
class="w-full mt-6 border border-gray-100 rounded-2xl overflow-hidden bg-gray-50"
>
<table class="w-full border-collapse">
<tbody class="divide-y divide-gray-200">
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Platform Name
</div>
<div
class="text-sm text-black-700 font-medium capitalize mt-1 block"
>
{platform ?? "Unable to get name"}
</div>
</td>
</tr>

<div class="bg-gray rounded-2xl w-full p-4">
<h4 class="text-base text-black-700">Website URL</h4>
<p class="text-black-700 font-normal">
{hostname ?? scannedContent}
</p>
</div>
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Website URL
</div>
<div
class="text-sm text-black-700 font-medium break-all mt-1 block"
>
{hostname ?? scannedContent}
</div>
</td>
</tr>
</tbody>
</table>
</div>

{#if authError}
<div class="bg-red-50 border border-red-200 rounded-lg p-4 mt-4">
<div class="flex items-center">
<div class="flex-shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
{#if authError}
<div
class="bg-red-50 border border-red-200 rounded-lg p-4 w-full mt-4"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">Error</h3>
<div class="mt-2 text-sm text-red-700">
{authError}
<div class="flex items-center">
<div class="shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">
Error
</h3>
<div class="mt-1 text-sm text-red-700">
{authError}
</div>
</div>
</div>
</div>
{/if}
</div>

<div class="flex flex-col gap-3 pb-2 w-full pt-8">
<div class="flex justify-center gap-3 items-center w-full">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full whitespace-nowrap"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-1">
<p class="text-sm text-gray-600">
After confirmation, you may return to <strong
>{platform}</strong
> and continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<div class="flex justify-center gap-3 items-center mt-4">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
After confirmation, you may return to {platform} and continue
there
</p>
</div>
{/if}
</Drawer>

{/if}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand All@@ -23,42 +22,62 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
{#if internalOpen}
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
role="dialog"
aria-modal="true"
aria-labelledby="loggedin-title"
class="loggedin-drawer fixed inset-0 z-50 bg-white p-4 overflow-y-auto"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>You're logged in!</h4>
<p class="text-black-700">You're now connected to {platform}</p>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
Comment thread
grv-saini-20 marked this conversation as resolved.
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<div class="flex flex-col gap-3 mt-4">
{#if redirect && platform}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
You may return to {platform} and continue there
<h4 id="loggedin-title" class="text-xl font-bold">
You're logged in!
</h4>
<p class="text-gray-700">
You're now connected to {platform ?? "the platform"}
</p>
<div class="flex flex-col items-start py-6 w-full">
{#if redirect && platform}
<div class="text-start">
<p class="text-sm text-gray-600">
You may return to <strong>{platform}</strong> and
continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<Button.Action variant="soft" class="w-full" callback={onConfirm}>
Ok
</Button.Action>
<div class="flex flex-col gap-3 pb-2 w-full">
<Button.Action
variant="soft"
class="w-full"
callback={onConfirm}
>
Ok
</Button.Action>
</div>
</div>
</div>
</Drawer>

{/if}
Comment thread
grv-saini-20 marked this conversation as resolved.
Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2b9497f
fix/drawers-replaced-with-component
grv-saini-20 Jan 5, 2026
c6afb22
fix: all drawers converted into components
grv-saini-20 Jan 5, 2026
474176a
fix: cancel scan still not stop the stream while drawer is open
grv-saini-20 Jan 5, 2026
0779ecd
fix: format
grv-saini-20 Jan 5, 2026
f08cefa
fix: media stream stopage
grv-saini-20 Jan 6, 2026
66fad6e
fix: styling of the drawers
grv-saini-20 Jan 7, 2026
ff6f753
fix: design of drawers
grv-saini-20 Jan 7, 2026
479f23f
fix: design change tables added to show data
grv-saini-20 Jan 7, 2026
f381c72
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
b0cfe7b
fix: suggestion
grv-saini-20 Jan 8, 2026
e776cd8
fix: button
grv-saini-20 Jan 8, 2026
ed19c8e
fix: css
grv-saini-20 Jan 8, 2026
8424270
fix: format
grv-saini-20 Jan 8, 2026
b0b50f4
fix: format
sosweetham Jan 8, 2026
a3a99e8
fix: table cell types
sosweetham Jan 8, 2026
fc9c57c
fix: suggestions
grv-saini-20 Jan 8, 2026
429ff56
Merge branch 'fix/drawers-replaced-with-component' of github.com:Meta…
grv-saini-20 Jan 8, 2026
ff1db0e
fix: code rabbit suggestions
grv-saini-20 Jan 8, 2026
8ef230d
fix: code rabbit suggestion
grv-saini-20 Jan 8, 2026
272ebbc
fix: follow-button-message
grv-saini-20 Jan 15, 2026
7a30535
Merge branch 'main' of github.com:MetaState-Prototype-Project/prototype
grv-saini-20 Jan 15, 2026
0914208
fix: merge conflicts
grv-saini-20 Jan 15, 2026
c7729fd
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
26abb32
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
25a55be
fix: code rabbit suggestion
grv-saini-20 Jan 15, 2026
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
11 changes: 7 additions & 4 deletions infrastructure/eid-wallet/src/routes/(app)/scan-qr/+page.svelte
Original file line numberDiff line numberDiff line change
Expand Up@@ -84,13 +84,10 @@ onMount(() => {
return () => {
disposed = true;
cleanup?.();
cancelScan();
};
});

onDestroy(async () => {
await cancelScan();
});

$effect(() => {
console.log(
"🔍 DEBUG: selectedBlindVoteOption changed to:",
Expand DownExpand Up@@ -223,3 +220,9 @@ function handleRevealDrawerOpenChange(value: boolean) {
onReveal={handleRevealVote}
onOpenChange={handleRevealDrawerOpenChange}
/>

<style>
:global(body:has(.loggedin-drawer)) {
background-color: white !important;
}
</style>
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand DownExpand Up@@ -28,110 +27,148 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
{#if internalOpen}
<div class="fixed inset-0 z-50 bg-white p-4 overflow-y-auto">
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>Code scanned!</h4>
<p class="text-black-700">You're trying to access the following site</p>
<h4 class="text-xl font-bold">Code scanned!</h4>
<p class="text-black-700 mt-1">
Please review the connection details below.
</p>

<div class="bg-gray rounded-2xl w-full p-4 mt-4">
<h4 class="text-base text-black-700">Platform Name</h4>
<p class="text-black-700 font-normal capitalize">
{platform ?? "Unable to get name"}
</p>
</div>
<div
class="w-full mt-6 border border-gray-100 rounded-2xl overflow-hidden bg-gray-50"
>
<table class="w-full border-collapse">
<tbody class="divide-y divide-gray-200">
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Platform Name
</div>
<div
class="text-sm text-black-700 font-medium capitalize mt-1 block"
>
{platform ?? "Unable to get name"}
</div>
</td>
</tr>

<div class="bg-gray rounded-2xl w-full p-4">
<h4 class="text-base text-black-700">Website URL</h4>
<p class="text-black-700 font-normal">
{hostname ?? scannedContent}
</p>
</div>
<tr>
<td class="py-4 px-4">
<div
class="text-xs font-semibold text-gray-500 uppercase tracking-wider block"
>
Website URL
</div>
<div
class="text-sm text-black-700 font-medium break-all mt-1 block"
>
{hostname ?? scannedContent}
</div>
</td>
</tr>
</tbody>
</table>
</div>

{#if authError}
<div class="bg-red-50 border border-red-200 rounded-lg p-4 mt-4">
<div class="flex items-center">
<div class="flex-shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
{#if authError}
<div
class="bg-red-50 border border-red-200 rounded-lg p-4 w-full mt-4"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">Error</h3>
<div class="mt-2 text-sm text-red-700">
{authError}
<div class="flex items-center">
<div class="shrink-0">
<svg
class="h-5 w-5 text-red-400"
viewBox="0 0 20 20"
fill="currentColor"
>
<path
fill-rule="evenodd"
d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
clip-rule="evenodd"
/>
</svg>
</div>
<div class="ml-3">
<h3 class="text-sm font-medium text-red-800">
Error
</h3>
<div class="mt-1 text-sm text-red-700">
{authError}
</div>
</div>
</div>
</div>
{/if}
</div>

<div class="flex flex-col gap-3 pb-2 w-full pt-8">
<div class="flex justify-center gap-3 items-center w-full">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full whitespace-nowrap"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-1">
<p class="text-sm text-gray-600">
After confirmation, you may return to <strong
>{platform}</strong
> and continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<div class="flex justify-center gap-3 items-center mt-4">
{#if authError}
<Button.Action
variant="solid"
class="w-full"
callback={onDecline}
>
Okay
</Button.Action>
{:else}
<Button.Action
variant="danger-soft"
class="w-full"
callback={onDecline}
disabled={authLoading}
>
Decline
</Button.Action>
<Button.Action
variant="solid"
class="w-full"
callback={onConfirm}
disabled={authLoading}
>
{#if authLoading}
Authenticating...
{:else}
Confirm
{/if}
</Button.Action>
{/if}
</div>

{#if isSigningRequest === false}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
After confirmation, you may return to {platform} and continue
there
</p>
</div>
{/if}
</Drawer>

{/if}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
<script lang="ts">
import { Drawer } from "$lib/ui";
import * as Button from "$lib/ui/Button";
import { QrCodeIcon } from "@hugeicons/core-free-icons";
import { HugeiconsIcon } from "@hugeicons/svelte";
Expand All@@ -23,42 +22,62 @@ $: if (internalOpen !== lastReportedOpen) {
}
</script>

<Drawer
title="Scan QR Code"
bind:isPaneOpen={internalOpen}
class="flex flex-col gap-4 items-center justify-center"
>
{#if internalOpen}
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
role="dialog"
aria-modal="true"
aria-labelledby="loggedin-title"
class="loggedin-drawer fixed inset-0 z-50 bg-white p-4 overflow-y-auto"
>
<div class="bg-white h-[16px] w-[200px] -rotate-45 absolute top-1"></div>
<div
class="bg-white h-[16px] w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<h4>You're logged in!</h4>
<p class="text-black-700">You're now connected to {platform}</p>
class="flex flex-col justify-between min-h-full w-full max-w-md mx-auto"
>
Comment thread
grv-saini-20 marked this conversation as resolved.
<div class="flex flex-col items-start pt-2">
<div
class="flex justify-center mb-4 relative items-center overflow-hidden bg-gray rounded-xl p-4 h-[72px] w-[72px]"
>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute top-1"
></div>
<div
class="bg-white h-4 w-[200px] -rotate-45 absolute bottom-1"
></div>
<HugeiconsIcon
size={40}
className="z-10"
icon={QrCodeIcon}
strokeWidth={1.5}
color="var(--color-primary)"
/>
</div>

<div class="flex flex-col gap-3 mt-4">
{#if redirect && platform}
<div class="text-center mt-3">
<p class="text-sm text-gray-600">
You may return to {platform} and continue there
<h4 id="loggedin-title" class="text-xl font-bold">
You're logged in!
</h4>
<p class="text-gray-700">
You're now connected to {platform ?? "the platform"}
</p>
<div class="flex flex-col items-start py-6 w-full">
{#if redirect && platform}
<div class="text-start">
<p class="text-sm text-gray-600">
You may return to <strong>{platform}</strong> and
continue there
</p>
</div>
{/if}
</div>
</div>
{/if}

<Button.Action variant="soft" class="w-full" callback={onConfirm}>
Ok
</Button.Action>
<div class="flex flex-col gap-3 pb-2 w-full">
<Button.Action
variant="soft"
class="w-full"
callback={onConfirm}
>
Ok
</Button.Action>
</div>
</div>
</div>
</Drawer>

{/if}
Comment thread
grv-saini-20 marked this conversation as resolved.
Loading