mirror of
https://gitlab.com/soapbox-pub/mkstack.git
synced 2026-12-06 00:37:23 +00:00
hide ln address on cashu and change currency colors
This commit is contained in:
1 parent
ad6e0c9f8d
commit
3b8c5da1fd
2 files changed
+13
-9
No files matched your search
@@ -1,6 +1,6 @@
|
|||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { Plus, X, Check, ChevronDown, Wallet } from 'lucide-react';
|
import { Plus, X, Check, ChevronDown, Landmark } from 'lucide-react';
|
||||||
import { useState, useEffect } from 'react';
|
import { useState, useEffect } from 'react';
|
||||||
import { exchangeRateService } from '@/lib/exchangeRateService';
|
import { exchangeRateService } from '@/lib/exchangeRateService';
|
||||||
import {
|
import {
|
||||||
@@ -183,7 +183,7 @@ export function MintSelector({
|
|||||||
className="flex items-center justify-center px-2 py-1.5 hover:bg-muted rounded-md transition-colors h-[40px] w-[42px] flex-shrink-0"
|
className="flex items-center justify-center px-2 py-1.5 hover:bg-muted rounded-md transition-colors h-[40px] w-[42px] flex-shrink-0"
|
||||||
title="View token breakdown"
|
title="View token breakdown"
|
||||||
>
|
>
|
||||||
<Wallet className="h-4 w-4" />
|
<Landmark className="h-4 w-4" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -54,8 +54,12 @@ const formatBalance = (balance: number, showSats: boolean, btcUsdRate?: number |
|
|||||||
return balance.toLocaleString();
|
return balance.toLocaleString();
|
||||||
};
|
};
|
||||||
|
|
||||||
const getBalanceSymbol = (showSats: boolean): string => {
|
const getBalanceSymbol = (showSats: boolean): JSX.Element => {
|
||||||
return showSats ? '₿' : '$';
|
return showSats ? (
|
||||||
|
<span className="text-orange-500/70">₿</span>
|
||||||
|
) : (
|
||||||
|
<span className="text-green-500/70">$</span>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const getToggleTitle = (showSats: boolean): string => {
|
const getToggleTitle = (showSats: boolean): string => {
|
||||||
@@ -82,9 +86,9 @@ const getModeDescription = (mode: string): string => {
|
|||||||
|
|
||||||
const getButtonTitle = (mode: string): string => {
|
const getButtonTitle = (mode: string): string => {
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 'tokens': return 'Switch to Lightning';
|
case 'tokens': return 'Switch to On-Chain';
|
||||||
case 'lightning': return 'Switch to Bitcoin';
|
case 'lightning': return 'Switch to Cashu';
|
||||||
case 'bitcoin': return 'Switch to Cashu Tokens';
|
case 'bitcoin': return 'Switch to Lightning';
|
||||||
default: return 'Switch Mode';
|
default: return 'Switch Mode';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -177,7 +181,7 @@ export function WalletHeader({
|
|||||||
className="text-6xl font-bold tabular-nums hover:opacity-80 transition-opacity cursor-pointer"
|
className="text-6xl font-bold tabular-nums hover:opacity-80 transition-opacity cursor-pointer"
|
||||||
title={getToggleTitle(showSats)}
|
title={getToggleTitle(showSats)}
|
||||||
>
|
>
|
||||||
<span className="text-muted-foreground italic">
|
<span className="italic">
|
||||||
{getBalanceSymbol(showSats)}
|
{getBalanceSymbol(showSats)}
|
||||||
</span>
|
</span>
|
||||||
{formatBalance(totalBalance, showSats, btcUsdRate)}
|
{formatBalance(totalBalance, showSats, btcUsdRate)}
|
||||||
@@ -189,7 +193,7 @@ export function WalletHeader({
|
|||||||
<div className="w-full max-w-[400px] mx-auto">
|
<div className="w-full max-w-[400px] mx-auto">
|
||||||
<div className="grid grid-cols-1 gap-3">
|
<div className="grid grid-cols-1 gap-3">
|
||||||
{/* Lightning Address Row */}
|
{/* Lightning Address Row */}
|
||||||
{userPubkey && mode !== 'bitcoin' && (
|
{userPubkey && mode === 'lightning' && (
|
||||||
<div className="flex gap-2 items-center min-w-[300px]">
|
<div className="flex gap-2 items-center min-w-[300px]">
|
||||||
<button
|
<button
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
|
|||||||
Reference in new issue
Block a user