Skip to content

Commit 22cb13a

Browse files
committed
feat: added voult button
1 parent db4487d commit 22cb13a

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

infrastructure/control-panel/src/lib/fragments/Nodes/VaultNode.svelte

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
<script lang="ts">
22
import { Handle, Position } from '@xyflow/svelte';
33
import { HugeiconsIcon } from '@hugeicons/svelte';
4-
import { Database01FreeIcons } from '@hugeicons/core-free-icons';
4+
import { Cancel01FreeIcons, Database01FreeIcons } from '@hugeicons/core-free-icons';
55
66
export let data: { label: string; subLabel: string };
77
</script>
88

9-
<div class="vault-node-wrapper">
9+
<div class="vault-node-wrapper relative">
10+
<!-- <button class="absolute top-[10px] end-[10px]" onclick={handleCancel}>
11+
<HugeiconsIcon icon={Cancel01FreeIcons} size="15px"/>
12+
</button> -->
1013
<div class="vault-node-content">
1114
<HugeiconsIcon icon={Database01FreeIcons}/>
1215
<div class="vault-labels">

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import {Logs, VaultNode} from '$lib/fragments';
66
import { HugeiconsIcon } from '@hugeicons/svelte';
77
import { PauseFreeIcons, PlayFreeIcons } from '@hugeicons/core-free-icons';
8-
import {ButtonAction, Checkbox} from '$lib/ui';
9-
import { Modal } from 'flowbite-svelte';
8+
import {ButtonAction} from '$lib/ui';
9+
import { Button, Modal } from 'flowbite-svelte';
1010
1111
1212
let SvelteFlowComponent: typeof import('@xyflow/svelte').SvelteFlow | null = $state(null);
@@ -137,7 +137,7 @@
137137
<div class="w-full flex justify-between items-center p-4 bg-white shadow-sm z-10">
138138
<h4 class="text-xl text-gray-800 font-semibold">Live Monitoring</h4>
139139
<div class="flex gap-2">
140-
<ButtonAction class="w-[max-content]" variant="soft" size="sm" callback={() => {isModalOpen = !isModalOpen}}>Add Vault</ButtonAction>
140+
<ButtonAction class="w-[max-content]" variant="soft" size="sm" callback={() => {isModalOpen = !isModalOpen}}>+ Add Vault</ButtonAction>
141141
<button
142142
onclick={() => isPaused = !isPaused}
143143
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"
@@ -170,7 +170,7 @@
170170

171171
<Modal bind:open={isModalOpen} class="absolute top-[50%] start-[50%] translate-x-[-50%] translate-y-[-50%] max-w-[30vw] w-full p-4" closeBtnClass="fixed end-4 top-4">
172172
<h4 class="text-primary mb-2">Search vaults</h4>
173-
<input type="search" value="" placeholder="Please search vaults to add" class="w-full border-transparent outline-transparent bg-gray rounded-4xl py-3 px-4 font-geist text-black text-base">
173+
<input type="search" value="" placeholder="Please search vaults to add" class="w-full border-transparent outline-transparent bg-gray rounded-4xl py-3 px-4 font-geist placeholder:font-geist placeholder:text-gray-600 text-black text-base">
174174

175175
<ul class="mt-4">
176176
{#each vaults as vault (vault.id)}
@@ -184,6 +184,7 @@
184184
</li>
185185
{/each}
186186
</ul>
187+
<ButtonAction variant="solid" size="sm" class="w-full mt-4" callback={() => alert("added")}>Add Voults</ButtonAction>
187188
</Modal>
188189

189190
<style>

0 commit comments

Comments
 (0)