Skip to content

Commit 7ed57a7

Browse files
committed
fix: set positions
1 parent 9c37e1a commit 7ed57a7

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

infrastructure/control-panel/src/routes/example/+page.svelte

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import {Logs, VaultNode} from '$lib/fragments';
77
import { HugeiconsIcon } from '@hugeicons/svelte';
88
import { PauseFreeIcons, PlayFreeIcons } from '@hugeicons/core-free-icons';
9+
import {ButtonAction} from '$lib/ui';
910
1011
1112
let SvelteFlowComponent: typeof import('@xyflow/svelte').SvelteFlow | null = $state(null);
@@ -19,7 +20,7 @@
1920
let nodes: Node[] = $state([
2021
{
2122
id: '1',
22-
position: { x: 100, y: 50 },
23+
position: { x: 50, y: 50 },
2324
data: { label: 'Alice', subLabel: 'alice.vault.dev' },
2425
type: 'vault',
2526
},
@@ -31,13 +32,13 @@
3132
},
3233
{
3334
id: '3',
34-
position: { x: 500, y: 50 },
35+
position: { x: 550, y: 50 },
3536
data: { label: 'Bob', subLabel: 'bob.vault.dev' },
3637
type: 'vault',
3738
},
3839
{
3940
id: '4',
40-
position: { x: 800, y: 50 },
41+
position: { x: 750, y: 250 },
4142
data: { label: 'xyz', subLabel: 'xyz.vault.dev' },
4243
type: 'vault',
4344
},
@@ -92,17 +93,20 @@
9293
<div class="w-screen h-screen flex flex-col bg-gray">
9394
<div class="w-full flex justify-between items-center p-4 bg-white shadow-sm z-10">
9495
<h4 class="text-xl text-gray-800 font-semibold">Live Monitoring</h4>
95-
<button
96-
onclick={() => isPaused = !isPaused}
97-
class="px-4 py-2 flex items-center gap-2 text-base font-geist font-medium text-gray-700 bg-white border border-[#e5e5e5] rounded-full shadow-md hover:bg-gray-50 transition-colors"
98-
>
96+
<div class="flex gap-2">
97+
<ButtonAction class="w-[max-content]" variant="soft" size="sm">Add Vault</ButtonAction>
98+
<button
99+
onclick={() => isPaused = !isPaused}
100+
class="px-4 py-2 flex items-center gap-2 text-base font-geist font-medium text-gray-700 bg-white border border-[#e5e5e5] rounded-full shadow-md hover:bg-gray-50 transition-colors"
101+
>
99102
{#if isPaused}
100103
<HugeiconsIcon icon={PlayFreeIcons} size="20px"/>
101104
{:else}
102105
<HugeiconsIcon icon={PauseFreeIcons} size="20px"/>
103106
{/if}
104107
{isPaused ? 'Resume Live Feed' : 'Pause Live Feed'}
105-
</button>
108+
</button>
109+
</div>
106110
</div>
107111

108112
{#if SvelteFlowComponent}

0 commit comments

Comments
 (0)