Skip to content

Commit

Permalink
Color send & recv badges
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzyis committed Oct 22, 2024
1 parent 820ea90 commit ba06f30
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 13 deletions.
16 changes: 12 additions & 4 deletions components/wallet-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,18 @@ export default function WalletCard ({ wallet, draggable, onDragStart, onDragEnte
<Card.Title>{title}</Card.Title>
<Card.Subtitle className='mt-2'>
{badges?.map(
badge =>
<Badge className={styles.badge} key={badge} bg={null}>
{badge}
</Badge>)}
badge => {
let style = ''
switch (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.Body>
<Link href={`/settings/wallets/${wallet.name}`}>
Expand Down
8 changes: 8 additions & 0 deletions styles/wallet.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@
margin-right: 0.2rem;
}

.receive {
color: #20c997 !important;
}

.send {
color: var(--bs-primary) !important;
}

.attach {
color: var(--bs-body-color) !important;
text-align: center;
Expand Down
2 changes: 1 addition & 1 deletion wallets/blink/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const fields = [
export const card = {
title: 'Blink',
subtitle: 'use [Blink](https://blink.sv/) for payments',
badges: ['send only']
badges: ['send']
}

export const fieldValidation = blinkSchema
2 changes: 1 addition & 1 deletion wallets/cln/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const fields = [
export const card = {
title: 'CLN',
subtitle: 'autowithdraw to your Core Lightning node via [CLNRest](https://docs.corelightning.org/docs/rest)',
badges: ['receive only']
badges: ['receive']
}

export const fieldValidation = CLNAutowithdrawSchema
Expand Down
2 changes: 1 addition & 1 deletion wallets/lightning-address/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const fields = [
export const card = {
title: 'lightning address',
subtitle: 'autowithdraw to a lightning address',
badges: ['receive only']
badges: ['receive']
}

export const fieldValidation = lnAddrAutowithdrawSchema
Expand Down
2 changes: 1 addition & 1 deletion wallets/lnbits/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const fields = [
export const card = {
title: 'LNbits',
subtitle: 'use [LNbits](https://lnbits.com/) for payments',
badges: ['send & receive']
badges: ['send', 'receive']
}

export const fieldValidation = lnbitsSchema
Expand Down
2 changes: 1 addition & 1 deletion wallets/lnc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const fields = [
export const card = {
title: 'LNC',
subtitle: 'use Lightning Node Connect for LND payments',
badges: ['send only', 'budgetable']
badges: ['send', 'budgetable']
}

export const fieldValidation = lncSchema
2 changes: 1 addition & 1 deletion wallets/lnd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const fields = [
export const card = {
title: 'LND',
subtitle: 'autowithdraw to your Lightning Labs node',
badges: ['receive only']
badges: ['receive']
}

export const fieldValidation = LNDAutowithdrawSchema
Expand Down
2 changes: 1 addition & 1 deletion wallets/nwc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const fields = [
export const card = {
title: 'NWC',
subtitle: 'use Nostr Wallet Connect for payments',
badges: ['send & receive', 'budgetable']
badges: ['send', 'receive', 'budgetable']
}

export const fieldValidation = nwcSchema
Expand Down
2 changes: 1 addition & 1 deletion wallets/phoenixd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const fields = [
export const card = {
title: 'phoenixd',
subtitle: 'use [phoenixd](https://phoenix.acinq.co/server) for payments',
badges: ['send & receive']
badges: ['send', 'receive']
}

// phoenixd::TODO
Expand Down
2 changes: 1 addition & 1 deletion wallets/webln/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const fieldValidation = ({ enabled }) => {
export const card = {
title: 'WebLN',
subtitle: 'use a [WebLN provider](https://www.webln.guide/ressources/webln-providers) for payments',
badges: ['send only']
badges: ['send']
}

export default function WebLnProvider ({ children }) {
Expand Down

0 comments on commit ba06f30

Please sign in to comment.