Color send & recv badges

This commit is contained in:
ekzyis 2024-10-22 21:07:09 +02:00
parent 820ea90267
commit ba06f3043f
11 changed files with 29 additions and 13 deletions

View File

@ -51,10 +51,18 @@ export default function WalletCard ({ wallet, draggable, onDragStart, onDragEnte
<Card.Title>{title}</Card.Title> <Card.Title>{title}</Card.Title>
<Card.Subtitle className='mt-2'> <Card.Subtitle className='mt-2'>
{badges?.map( {badges?.map(
badge => badge => {
<Badge className={styles.badge} key={badge} bg={null}> let style = ''
{badge} switch (badge) {
</Badge>)} case 'receive': style = styles.receive; break
case 'send': style = styles.send; break
}
return (
<Badge className={`${styles.badge} ${style}`} key={badge} bg={null}>
{badge}
</Badge>
)
})}
</Card.Subtitle> </Card.Subtitle>
</Card.Body> </Card.Body>
<Link href={`/settings/wallets/${wallet.name}`}> <Link href={`/settings/wallets/${wallet.name}`}>

View File

@ -40,6 +40,14 @@
margin-right: 0.2rem; margin-right: 0.2rem;
} }
.receive {
color: #20c997 !important;
}
.send {
color: var(--bs-primary) !important;
}
.attach { .attach {
color: var(--bs-body-color) !important; color: var(--bs-body-color) !important;
text-align: center; text-align: center;

View File

@ -28,7 +28,7 @@ export const fields = [
export const card = { export const card = {
title: 'Blink', title: 'Blink',
subtitle: 'use [Blink](https://blink.sv/) for payments', subtitle: 'use [Blink](https://blink.sv/) for payments',
badges: ['send only'] badges: ['send']
} }
export const fieldValidation = blinkSchema export const fieldValidation = blinkSchema

View File

@ -36,7 +36,7 @@ export const fields = [
export const card = { export const card = {
title: 'CLN', title: 'CLN',
subtitle: 'autowithdraw to your Core Lightning node via [CLNRest](https://docs.corelightning.org/docs/rest)', subtitle: 'autowithdraw to your Core Lightning node via [CLNRest](https://docs.corelightning.org/docs/rest)',
badges: ['receive only'] badges: ['receive']
} }
export const fieldValidation = CLNAutowithdrawSchema export const fieldValidation = CLNAutowithdrawSchema

View File

@ -15,7 +15,7 @@ export const fields = [
export const card = { export const card = {
title: 'lightning address', title: 'lightning address',
subtitle: 'autowithdraw to a lightning address', subtitle: 'autowithdraw to a lightning address',
badges: ['receive only'] badges: ['receive']
} }
export const fieldValidation = lnAddrAutowithdrawSchema export const fieldValidation = lnAddrAutowithdrawSchema

View File

@ -29,7 +29,7 @@ export const fields = [
export const card = { export const card = {
title: 'LNbits', title: 'LNbits',
subtitle: 'use [LNbits](https://lnbits.com/) for payments', subtitle: 'use [LNbits](https://lnbits.com/) for payments',
badges: ['send & receive'] badges: ['send', 'receive']
} }
export const fieldValidation = lnbitsSchema export const fieldValidation = lnbitsSchema

View File

@ -33,7 +33,7 @@ export const fields = [
export const card = { export const card = {
title: 'LNC', title: 'LNC',
subtitle: 'use Lightning Node Connect for LND payments', subtitle: 'use Lightning Node Connect for LND payments',
badges: ['send only', 'budgetable'] badges: ['send', 'budgetable']
} }
export const fieldValidation = lncSchema export const fieldValidation = lncSchema

View File

@ -37,7 +37,7 @@ export const fields = [
export const card = { export const card = {
title: 'LND', title: 'LND',
subtitle: 'autowithdraw to your Lightning Labs node', subtitle: 'autowithdraw to your Lightning Labs node',
badges: ['receive only'] badges: ['receive']
} }
export const fieldValidation = LNDAutowithdrawSchema export const fieldValidation = LNDAutowithdrawSchema

View File

@ -27,7 +27,7 @@ export const fields = [
export const card = { export const card = {
title: 'NWC', title: 'NWC',
subtitle: 'use Nostr Wallet Connect for payments', subtitle: 'use Nostr Wallet Connect for payments',
badges: ['send & receive', 'budgetable'] badges: ['send', 'receive', 'budgetable']
} }
export const fieldValidation = nwcSchema export const fieldValidation = nwcSchema

View File

@ -33,7 +33,7 @@ export const fields = [
export const card = { export const card = {
title: 'phoenixd', title: 'phoenixd',
subtitle: 'use [phoenixd](https://phoenix.acinq.co/server) for payments', subtitle: 'use [phoenixd](https://phoenix.acinq.co/server) for payments',
badges: ['send & receive'] badges: ['send', 'receive']
} }
// phoenixd::TODO // phoenixd::TODO

View File

@ -20,7 +20,7 @@ export const fieldValidation = ({ enabled }) => {
export const card = { export const card = {
title: 'WebLN', title: 'WebLN',
subtitle: 'use a [WebLN provider](https://www.webln.guide/ressources/webln-providers) for payments', subtitle: 'use a [WebLN provider](https://www.webln.guide/ressources/webln-providers) for payments',
badges: ['send only'] badges: ['send']
} }
export default function WebLnProvider ({ children }) { export default function WebLnProvider ({ children }) {