Skip to content

Commit 54482b8

Browse files
authored
Feat/evoting reveal vote data (#324)
* feat: fix SSE issue on eVoting and public reveal * feat: reveal blind vote * chore: bump version
1 parent c306df6 commit 54482b8

File tree

9 files changed

+859
-125
lines changed

9 files changed

+859
-125
lines changed

infrastructure/eid-wallet/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eid-wallet",
3-
"version": "0.1.0",
3+
"version": "0.2.1",
44
"description": "",
55
"type": "module",
66
"scripts": {

infrastructure/eid-wallet/src/lib/ui/Drawer/Drawer.svelte

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,57 @@
11
<script lang="ts">
2-
import { clickOutside, cn } from "$lib/utils";
3-
import { CupertinoPane } from "cupertino-pane";
4-
import type { Snippet } from "svelte";
5-
import { swipe } from "svelte-gestures";
6-
import type { HTMLAttributes } from "svelte/elements";
2+
import { cn } from "$lib/utils";
3+
import { CupertinoPane } from "cupertino-pane";
4+
import type { Snippet } from "svelte";
5+
import { swipe } from "svelte-gestures";
6+
import type { HTMLAttributes } from "svelte/elements";
77
8-
interface IDrawerProps extends HTMLAttributes<HTMLDivElement> {
9-
isPaneOpen?: boolean;
10-
children?: Snippet;
11-
handleSwipe?: (isOpen: boolean | undefined) => void;
12-
}
8+
interface IDrawerProps extends HTMLAttributes<HTMLDivElement> {
9+
isPaneOpen?: boolean;
10+
children?: Snippet;
11+
handleSwipe?: (isOpen: boolean | undefined) => void;
12+
}
1313
14-
let drawerElem: HTMLDivElement;
15-
let pane: CupertinoPane;
14+
let drawerElem: HTMLDivElement;
15+
let pane: CupertinoPane;
1616
17-
let {
18-
isPaneOpen = $bindable(),
19-
children = undefined,
20-
handleSwipe,
21-
...restProps
22-
}: IDrawerProps = $props();
17+
let {
18+
isPaneOpen = $bindable(),
19+
children = undefined,
20+
handleSwipe,
21+
...restProps
22+
}: IDrawerProps = $props();
2323
24-
const handleClickOutside = () => {
25-
pane?.destroy({ animate: true });
26-
isPaneOpen = false;
27-
};
24+
// Disabled click outside behavior to prevent white screen issues
25+
// const handleClickOutside = () => {
26+
// pane?.destroy({ animate: true });
27+
// isPaneOpen = false;
28+
// };
2829
29-
$effect(() => {
30-
if (!drawerElem) return;
31-
pane = new CupertinoPane(drawerElem, {
32-
fitHeight: true,
33-
backdrop: true,
34-
backdropOpacity: 0.5,
35-
backdropBlur: true,
36-
bottomClose: true,
37-
buttonDestroy: false,
38-
showDraggable: true,
39-
upperThanTop: true,
40-
breaks: {
41-
bottom: { enabled: true, height: 250 },
42-
},
43-
initialBreak: "bottom",
44-
});
30+
$effect(() => {
31+
if (!drawerElem) return;
32+
pane = new CupertinoPane(drawerElem, {
33+
fitHeight: true,
34+
backdrop: true,
35+
backdropOpacity: 0.5,
36+
backdropBlur: true,
37+
bottomClose: true,
38+
buttonDestroy: false,
39+
showDraggable: true,
40+
upperThanTop: true,
41+
breaks: {
42+
bottom: { enabled: true, height: 250 },
43+
},
44+
initialBreak: "bottom",
45+
});
4546
46-
if (isPaneOpen) {
47-
pane.present({ animate: true });
48-
} else {
49-
pane.destroy({ animate: true });
50-
}
47+
if (isPaneOpen) {
48+
pane.present({ animate: true });
49+
} else {
50+
pane.destroy({ animate: true });
51+
}
5152
52-
return () => pane.destroy();
53-
});
53+
return () => pane.destroy();
54+
});
5455
</script>
5556

5657
<div
@@ -61,7 +62,6 @@ $effect(() => {
6162
})}
6263
onswipe={() => handleSwipe?.(isPaneOpen)}
6364
bind:this={drawerElem}
64-
use:clickOutside={handleClickOutside}
6565
class={cn(restProps.class)}
6666
>
6767
<div class="px-6">

0 commit comments

Comments
 (0)