-
Notifications
You must be signed in to change notification settings - Fork 2
feat: setup control-panel project, added-colors same as eid-wallet #257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
e516e58
feat: setup control-panel project, added-colors same as eid-wallet
grv-saini-20 1888acf
fix: paraglide removed
grv-saini-20 8cc4af5
feat: twmerge, clsx, button in ui added
grv-saini-20 109ee03
feat: huge icons added
grv-saini-20 f78ec4e
fix: storybook
grv-saini-20 0d4d59d
feat: table and checkbox added,flowbite-added
grv-saini-20 37f4b00
feat: table added on page
grv-saini-20 51b7a09
fix: checkbox
grv-saini-20 74eea3b
fix: row hover color
grv-saini-20 1ae3203
fix: table design
grv-saini-20 5b28185
feat: live-data-animation
grv-saini-20 1311fbe
fix: z-index
grv-saini-20 8d8b27b
fix: opacity
grv-saini-20 6014106
fix: dot animation
grv-saini-20 8f0d4e2
feat: added Logs component.
Sahil2004 3ae4f01
feat: added logs component to page.
Sahil2004 89d02b2
feat: added button and heading
grv-saini-20 493690c
fix: animation play pause
grv-saini-20 2ce4c08
fix: format
grv-saini-20 60f7bee
fix: format
grv-saini-20 85524e5
feat: added a monitoring page
grv-saini-20 94da73a
feat: data flow with svelte flow library
grv-saini-20 9c37e1a
feat: no need to add ssr = false because await import is there
grv-saini-20 7ed57a7
fix: set positions
grv-saini-20 5fc47ab
fix: labels position and two way data flow
grv-saini-20 d9f985d
fix: labels
grv-saini-20 9bba20f
feat: modal added
grv-saini-20 db4487d
fix: text
grv-saini-20 22cb13a
feat: added voult button
grv-saini-20 183d1fd
feat: added voult button
grv-saini-20 0db9e1e
feat: added voult button shadow
grv-saini-20 618db1a
fix: added logic to add new vaults
grv-saini-20 d73fa09
feat: added header at the top of the table
grv-saini-20 db73a4f
fix: format and lint
grv-saini-20 0e6da35
fix: search values binded
grv-saini-20 011e42b
fix: merge conflicts
grv-saini-20 18ee03a
feat: added icons
grv-saini-20 da2c39d
feat: added icons
grv-saini-20 c73e617
feat: added icons
grv-saini-20 2f4a1be
fix: check
grv-saini-20 aaf07f0
chore: fix conflict in pnpm lock
coodos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,20 @@ | ||
import type { StorybookConfig } from '@storybook/sveltekit'; | ||
|
||
import { join, dirname } from "path" | ||
import { join, dirname } from 'path'; | ||
|
||
/** | ||
* This function is used to resolve the absolute path of a package. | ||
* It is needed in projects that use Yarn PnP or are set up within a monorepo. | ||
*/ | ||
* This function is used to resolve the absolute path of a package. | ||
* It is needed in projects that use Yarn PnP or are set up within a monorepo. | ||
*/ | ||
function getAbsolutePath(value: string): any { | ||
return dirname(require.resolve(join(value, 'package.json'))) | ||
return dirname(require.resolve(join(value, 'package.json'))); | ||
} | ||
const config: StorybookConfig = { | ||
"stories": [ | ||
"../src/**/*.mdx", | ||
"../src/**/*.stories.@(js|ts|svelte)" | ||
], | ||
"addons": [ | ||
getAbsolutePath('@storybook/addon-svelte-csf') | ||
], | ||
"framework": { | ||
"name": getAbsolutePath('@storybook/sveltekit'), | ||
"options": {} | ||
} | ||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|ts|svelte)'], | ||
addons: [getAbsolutePath('@storybook/addon-svelte-csf')], | ||
framework: { | ||
name: getAbsolutePath('@storybook/sveltekit'), | ||
options: {} | ||
} | ||
}; | ||
export default config; | ||
export default config; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import type { Preview } from '@storybook/sveltekit' | ||
import "../src/app.css"; | ||
import type { Preview } from '@storybook/sveltekit'; | ||
import '../src/app.css'; | ||
|
||
const preview: Preview = { | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i, | ||
}, | ||
}, | ||
}, | ||
parameters: { | ||
controls: { | ||
matchers: { | ||
color: /(background|color)$/i, | ||
date: /Date$/i | ||
} | ||
} | ||
} | ||
}; | ||
|
||
export default preview; | ||
export default preview; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,71 @@ | ||
@import 'tailwindcss'; | ||
|
||
@font-face { | ||
font-family: 'Archivo'; | ||
src: url('/fonts/Archivo-VariableFont_wdth,wght.ttf') format('truetype'); | ||
font-weight: 100 900; | ||
font-style: normal; | ||
} | ||
|
||
@layer base { | ||
/* Typography */ | ||
h1 { | ||
@apply text-[90px]/[1.5] font-semibold text-black; | ||
} | ||
|
||
h2 { | ||
@apply text-6xl/[1.5] font-semibold text-black; | ||
} | ||
|
||
h3 { | ||
@apply text-3xl/[1.5] font-semibold text-black; | ||
} | ||
|
||
h4 { | ||
@apply text-xl/[1.5] font-semibold text-black; | ||
} | ||
|
||
p { | ||
@apply text-base/[1.5] font-normal text-black; | ||
} | ||
|
||
.small { | ||
@apply text-xs/[1.5] font-normal text-black; | ||
} | ||
} | ||
|
||
@theme { | ||
/* Custom theme */ | ||
--color-primary: #8e52ff; | ||
--color-primary-100: #e8dcff; | ||
--color-primary-200: #d2baff; | ||
--color-primary-300: #bb97ff; | ||
--color-primary-400: #a575ff; | ||
--color-primary-500: #8e52ff; | ||
|
||
--color-secondary: #73efd5; | ||
--color-secondary-100: #e3fcf7; | ||
--color-secondary-200: #c7f9ee; | ||
--color-secondary-300: #abf6e6; | ||
--color-secondary-400: #8ff2dd; | ||
--color-secondary-500: #73efd5; | ||
|
||
--color-white: #ffffff; | ||
--color-gray: #f5f5f5; | ||
|
||
--color-black: #1f1f1f; | ||
--color-black-100: #d2d2d2; | ||
--color-black-300: #a5a5a5; | ||
--color-black-500: #797979; | ||
--color-black-700: #4c4c4c; | ||
--color-black-900: #1f1f1f; | ||
|
||
--color-danger: #ff5255; | ||
--color-danger-100: #ffdcdd; | ||
--color-danger-200: #ffb1a7; | ||
--color-danger-300: #ff968e; | ||
--color-danger-400: #ff7b77; | ||
--color-danger-500: #ff5255; | ||
} | ||
/* Custom theme */ | ||
--color-primary: #8e52ff; | ||
--color-primary-100: #e8dcff; | ||
--color-primary-200: #d2baff; | ||
--color-primary-300: #bb97ff; | ||
--color-primary-400: #a575ff; | ||
--color-primary-500: #8e52ff; | ||
|
||
--color-secondary: #73efd5; | ||
--color-secondary-100: #e3fcf7; | ||
--color-secondary-200: #c7f9ee; | ||
--color-secondary-300: #abf6e6; | ||
--color-secondary-400: #8ff2dd; | ||
--color-secondary-500: #73efd5; | ||
|
||
--color-white: #ffffff; | ||
--color-gray: #f5f5f5; | ||
|
||
--color-black: #1f1f1f; | ||
--color-black-100: #d2d2d2; | ||
--color-black-300: #a5a5a5; | ||
--color-black-500: #797979; | ||
--color-black-700: #4c4c4c; | ||
--color-black-900: #1f1f1f; | ||
|
||
--color-danger: #ff5255; | ||
--color-danger-100: #ffdcdd; | ||
--color-danger-200: #ffb1a7; | ||
--color-danger-300: #ff968e; | ||
--color-danger-400: #ff7b77; | ||
--color-danger-500: #ff5255; | ||
|
||
--color-green: #0fb340; | ||
} |
21 changes: 21 additions & 0 deletions
21
infrastructure/control-panel/src/lib/fragments/LiveDataFlow/LiveDataFlow.stories.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { ComponentProps } from 'svelte'; | ||
import { LiveDataFlow } from '..'; | ||
|
||
export default { | ||
title: 'UI/LiveDataFlow', | ||
component: LiveDataFlow, | ||
tags: ['autodocs'], | ||
render: (args: { Component: LiveDataFlow; props: ComponentProps<typeof LiveDataFlow> }) => ({ | ||
Component: LiveDataFlow, | ||
props: args | ||
}) | ||
}; | ||
|
||
export const Default = { | ||
args: { | ||
events: [ | ||
{ id: 1, from: 'alice', to: 'pictique' }, | ||
{ id: 2, from: 'pictique', to: 'bob' } | ||
] | ||
} | ||
}; |
100 changes: 100 additions & 0 deletions
100
infrastructure/control-panel/src/lib/fragments/LiveDataFlow/LiveDataFlow.svelte
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
<script lang="ts"> | ||
import { Database01FreeIcons, PauseFreeIcons, PlayFreeIcons } from '@hugeicons/core-free-icons'; | ||
import { HugeiconsIcon } from '@hugeicons/svelte'; | ||
|
||
interface IEvent { | ||
id: string; | ||
from: string; | ||
to: string; | ||
imageSrc?: string; | ||
vaultName?: string; | ||
} | ||
|
||
interface IDataFlowProps { | ||
events: IEvent[]; | ||
} | ||
|
||
let { events }: IDataFlowProps = $props(); | ||
let isPaused = $state(false); | ||
</script> | ||
|
||
<article class="bg-gray flex h-[80vh] w-full flex-col items-center rounded-md px-16 py-6"> | ||
<div class="mb-20.5 flex w-full items-center justify-between"> | ||
<h4 class="text-xl">Live Monitoring</h4> | ||
<button | ||
onclick={() => (isPaused = !isPaused)} | ||
class="font-geist text-black-700 flex items-center gap-2 rounded-4xl border border-[#e5e5e5] bg-white px-4 py-3 text-base font-medium" | ||
> | ||
{#if isPaused} | ||
<HugeiconsIcon icon={PlayFreeIcons} size="24px" /> | ||
{:else} | ||
<HugeiconsIcon icon={PauseFreeIcons} size="24px" /> | ||
{/if} | ||
{isPaused ? 'Resume Live Feed' : 'Pause Live Feed'} | ||
</button> | ||
</div> | ||
<div class="relative z-10 flex w-full items-center justify-between"> | ||
<!-- svelte-ignore element_invalid_self_closing_tag --> | ||
<div | ||
class="border-s-green border-b-green border-e-green absolute start-[50%] top-[55%] z-[-1] h-[175px] w-[88%] translate-x-[-50%] rounded-md border border-t-transparent bg-transparent" | ||
> | ||
<div | ||
class="dot bg-green absolute start-[-1px] top-0 h-2.5 w-2.5 rounded-full" | ||
style="--dot-animation-state: {isPaused ? 'paused' : 'running'}" | ||
/> | ||
</div> | ||
|
||
<div | ||
class="flex flex-col items-center justify-center gap-2 rounded-md border border-black/10 bg-white p-3" | ||
> | ||
<HugeiconsIcon icon={Database01FreeIcons} /> | ||
<div class="text-sm font-semibold">{events[0].from}</div> | ||
<div class="text-xs text-gray-500">{events[0].vaultName}</div> | ||
</div> | ||
|
||
<div | ||
class="absolute start-[50%] top-[200px] translate-x-[-50%] rounded-md bg-white p-3 text-center shadow" | ||
> | ||
<img src="/" alt="Icon" /> | ||
<div class="text-xs text-gray-700">{events[1].from}</div> | ||
</div> | ||
|
||
<div | ||
class="border-green flex flex-col items-center justify-center gap-2 rounded-md border bg-white p-3" | ||
> | ||
<HugeiconsIcon icon={Database01FreeIcons} /> | ||
<div class="text-sm font-semibold">{events[2].from}</div> | ||
<div class="text-xs text-gray-500">{events[2].vaultName}</div> | ||
</div> | ||
</div> | ||
</article> | ||
|
||
<style> | ||
.dot { | ||
offset-path: rect(0px 100% 175px 0px round 0%); | ||
offset-distance: 0%; | ||
offset-rotate: auto; | ||
animation: move 10s linear infinite; | ||
animation-play-state: var(--dot-animation-state, running); | ||
} | ||
|
||
@keyframes move { | ||
0% { | ||
offset-distance: 100%; | ||
opacity: 1; | ||
} | ||
50% { | ||
opacity: 1; | ||
} | ||
55% { | ||
opacity: 0.4; | ||
} | ||
60% { | ||
opacity: 0; | ||
} | ||
100% { | ||
offset-distance: 0%; | ||
opacity: 0; | ||
} | ||
} | ||
</style> |
37 changes: 37 additions & 0 deletions
37
infrastructure/control-panel/src/lib/fragments/Logs/Logs.stories.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import type { ComponentProps } from 'svelte'; | ||
import Logs from './Logs.svelte'; | ||
|
||
export default { | ||
title: 'UI/Logs', | ||
component: Logs, | ||
tags: ['autodocs'], | ||
render: (args: { Component: Logs; props: ComponentProps<typeof Logs> }) => ({ | ||
Component: Logs, | ||
props: args | ||
}) | ||
}; | ||
|
||
export const Default = { | ||
args: { | ||
events: [ | ||
{ | ||
timestamp: new Date(), | ||
action: 'upload', | ||
message: 'msg_123', | ||
to: 'alice.vault.dev' | ||
}, | ||
{ | ||
timestamp: new Date(), | ||
action: 'fetch', | ||
message: 'msg_124', | ||
from: 'bob.vault.dev' | ||
}, | ||
{ | ||
timestamp: new Date(), | ||
action: 'webhook', | ||
to: 'Alice', | ||
from: 'Pic' | ||
} | ||
] | ||
} | ||
}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.