|
6 | 6 | import {Logs, VaultNode} from '$lib/fragments'; |
7 | 7 | import { HugeiconsIcon } from '@hugeicons/svelte'; |
8 | 8 | import { PauseFreeIcons, PlayFreeIcons } from '@hugeicons/core-free-icons'; |
| 9 | + import {ButtonAction} from '$lib/ui'; |
9 | 10 | |
10 | 11 |
|
11 | 12 | let SvelteFlowComponent: typeof import('@xyflow/svelte').SvelteFlow | null = $state(null); |
|
19 | 20 | let nodes: Node[] = $state([ |
20 | 21 | { |
21 | 22 | id: '1', |
22 | | - position: { x: 100, y: 50 }, |
| 23 | + position: { x: 50, y: 50 }, |
23 | 24 | data: { label: 'Alice', subLabel: 'alice.vault.dev' }, |
24 | 25 | type: 'vault', |
25 | 26 | }, |
|
31 | 32 | }, |
32 | 33 | { |
33 | 34 | id: '3', |
34 | | - position: { x: 500, y: 50 }, |
| 35 | + position: { x: 550, y: 50 }, |
35 | 36 | data: { label: 'Bob', subLabel: 'bob.vault.dev' }, |
36 | 37 | type: 'vault', |
37 | 38 | }, |
38 | 39 | { |
39 | 40 | id: '4', |
40 | | - position: { x: 800, y: 50 }, |
| 41 | + position: { x: 750, y: 250 }, |
41 | 42 | data: { label: 'xyz', subLabel: 'xyz.vault.dev' }, |
42 | 43 | type: 'vault', |
43 | 44 | }, |
|
92 | 93 | <div class="w-screen h-screen flex flex-col bg-gray"> |
93 | 94 | <div class="w-full flex justify-between items-center p-4 bg-white shadow-sm z-10"> |
94 | 95 | <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 | + > |
99 | 102 | {#if isPaused} |
100 | 103 | <HugeiconsIcon icon={PlayFreeIcons} size="20px"/> |
101 | 104 | {:else} |
102 | 105 | <HugeiconsIcon icon={PauseFreeIcons} size="20px"/> |
103 | 106 | {/if} |
104 | 107 | {isPaused ? 'Resume Live Feed' : 'Pause Live Feed'} |
105 | | - </button> |
| 108 | + </button> |
| 109 | + </div> |
106 | 110 | </div> |
107 | 111 |
|
108 | 112 | {#if SvelteFlowComponent} |
|
0 commit comments