Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(ui): use theme tokens in wallet panels

Steven Enamakel3ca1505ab150
diff --git a/app/scripts/lint-undefined-scales.mjs b/app/scripts/lint-undefined-scales.mjs
index 7e7a2e2d07..e11be325aa 100644
--- a/app/scripts/lint-undefined-scales.mjs
+++ b/app/scripts/lint-undefined-scales.mjs
@@ -36,7 +36,8 @@
* - non-shade numeric suffixes (`border-l-2`, `w-12`, `divide-y-0`), because
* the shaded pass requires a real Tailwind shade step and the shadeless
* pass requires every name segment to begin with a letter;
- * - prose. The shadeless pass skips `src/lib/i18n/` and test files, where
+ * - prose. The shadeless pass skips `src/lib/i18n/`, the tool phrase catalogue,
+ * and test files, where
* "text-to-speech", "to-do" and fixture strings like `bg-noise` are English
* and test data, not class lists. The shaded pass still scans them.
*/
@@ -349,7 +350,7 @@ function* walk(dir) {
}
/**
- * Translation catalogues and test fixtures hold English and sample data, not
+ * Translation catalogues, tool phrases, and test fixtures hold English and sample data, not
* class lists — "text-to-speech", "to-do", `bg-noise`. Only the shadeless pass
* is loose enough to trip on those, so only it skips them.
*/
@@ -362,6 +363,7 @@ function holdsProseNotClasses(relative) {
return (
posix.startsWith('src/lib/i18n/') ||
+ posix === 'src/features/conversations/tools/toolPhrases.ts' ||
posix.includes('/__tests__/') ||
/\.(test|spec)\.(ts|tsx|js|jsx)$/.test(posix)
);
diff --git a/app/src/components/settings/panels/RecoveryPhraseGenerateMode.tsx b/app/src/components/settings/panels/RecoveryPhraseGenerateMode.tsx
index 87e80b63c6..742c96f800 100644
--- a/app/src/components/settings/panels/RecoveryPhraseGenerateMode.tsx
+++ b/app/src/components/settings/panels/RecoveryPhraseGenerateMode.tsx
@@ -59,10 +59,10 @@ const RecoveryPhraseGenerateMode = ({
<button
type="button"
aria-label={t('mnemonic.revealRecoveryPhrase')}
- className="absolute inset-0 z-10 flex flex-col items-center justify-center cursor-pointer bg-black/40 hover:bg-black/30 transition-colors"
+ className="absolute inset-0 z-10 flex flex-col items-center justify-center cursor-pointer bg-surface-overlay/40 hover:bg-surface-overlay/30 transition-colors"
onClick={onReveal}>
<svg
- className="w-7 h-7 text-white mb-2"
+ className="w-7 h-7 text-content-inverted mb-2"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
@@ -73,7 +73,7 @@ const RecoveryPhraseGenerateMode = ({
d="M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"
/>
</svg>
- <span className="text-[15px] font-semibold text-white tracking-tight">
+ <span className="text-[15px] font-semibold text-content-inverted tracking-tight">
{t('mnemonic.revealRecoveryPhrase')}
</span>
</button>
diff --git a/app/src/components/settings/panels/RecoveryPhraseViewMode.tsx b/app/src/components/settings/panels/RecoveryPhraseViewMode.tsx
index b4bc585a5d..113d2b947c 100644
--- a/app/src/components/settings/panels/RecoveryPhraseViewMode.tsx
+++ b/app/src/components/settings/panels/RecoveryPhraseViewMode.tsx
@@ -240,7 +240,7 @@ const RecoveryPhraseViewMode = ({
type="button"
variant="tertiary"
size="md"
- className="w-full bg-surface dark:bg-white/5 border border-line hover:bg-surface-hover dark:hover:bg-white/10 group transition-all duration-200">
+ className="w-full bg-surface dark:bg-content-inverted/5 border border-line hover:bg-surface-hover dark:hover:bg-content-inverted/10 group transition-all duration-200">
<span className="text-content-secondary group-hover:text-content font-semibold transition-colors flex items-center justify-center gap-2">
{t('mnemonic.replaceWallet')}
<LuChevronDown className="w-4 h-4" />
diff --git a/app/src/components/settings/panels/WalletBalancesPanel.tsx b/app/src/components/settings/panels/WalletBalancesPanel.tsx
index 8c78268ca5..15c8b2bdc9 100644
--- a/app/src/components/settings/panels/WalletBalancesPanel.tsx
+++ b/app/src/components/settings/panels/WalletBalancesPanel.tsx
@@ -214,7 +214,7 @@ const BalanceRow = ({ balance, onSend, onReceive }: BalanceRowProps) => {
<div className="flex justify-start gap-4 pr-2">
<button
type="button"
- className="flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-surface dark:bg-white/5 border border-line hover:bg-surface-hover dark:hover:bg-white/10 group outline-hidden focus-visible:ring-2 focus-visible:ring-primary-500/40 transition-all duration-200 hover:scale-105 active:scale-95"
+ className="flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-surface dark:bg-content-inverted/5 border border-line hover:bg-surface-hover dark:hover:bg-content-inverted/10 group outline-hidden focus-visible:ring-2 focus-visible:ring-primary-500/40 transition-all duration-200 hover:scale-105 active:scale-95"
onClick={() => onSend(balance)}
data-testid={`wallet-send-${balanceKey(balance)}`}
aria-label={t('walletBalances.send')}>
@@ -236,7 +236,7 @@ const BalanceRow = ({ balance, onSend, onReceive }: BalanceRowProps) => {
</button>
<button
type="button"
- className="flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-surface dark:bg-white/5 border border-line hover:bg-surface-hover dark:hover:bg-white/10 group outline-hidden focus-visible:ring-2 focus-visible:ring-primary-500/40 transition-all duration-200 hover:scale-105 active:scale-95"
+ className="flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-surface dark:bg-content-inverted/5 border border-line hover:bg-surface-hover dark:hover:bg-content-inverted/10 group outline-hidden focus-visible:ring-2 focus-visible:ring-primary-500/40 transition-all duration-200 hover:scale-105 active:scale-95"
onClick={() => onReceive(balance)}
data-testid={`wallet-receive-${balanceKey(balance)}`}
aria-label={t('walletBalances.receive')}>
@@ -280,7 +280,7 @@ const ChainPlaceholderRow = ({
const { t } = useT();
return (
- <TableRow className="hover:bg-white/5 opacity-70 group">
+ <TableRow className="hover:bg-content-inverted/5 opacity-70 group">
<TableCell className="whitespace-nowrap px-4">
<div className="flex items-center gap-3">
<ChainIcon chain={chain} evmNetwork={evmNetwork} />
diff --git a/app/src/components/settings/panels/wallet/ManageTokensModal.tsx b/app/src/components/settings/panels/wallet/ManageTokensModal.tsx
index 9d837cb2fc..d1664f8891 100644
--- a/app/src/components/settings/panels/wallet/ManageTokensModal.tsx
+++ b/app/src/components/settings/panels/wallet/ManageTokensModal.tsx
@@ -36,7 +36,7 @@ export default function ManageTokensModal({ open, onClose, tokens }: ManageToken
if (!next) onClose();
}}>
<DialogPrimitive.Portal>
- <DialogPrimitive.Overlay className="fixed inset-0 z-50 bg-black/60 backdrop-blur-sm duration-200 animate-in fade-in data-[state=closed]:animate-out data-[state=closed]:fade-out" />
+ <DialogPrimitive.Overlay className="fixed inset-0 z-50 bg-surface-overlay/60 backdrop-blur-sm duration-200 animate-in fade-in data-[state=closed]:animate-out data-[state=closed]:fade-out" />
<DialogPrimitive.Content
aria-describedby={undefined}
className="fixed left-1/2 top-1/2 z-50 w-full max-w-[400px] -translate-x-1/2 -translate-y-1/2 rounded-2xl bg-surface p-0 shadow-2xl duration-200 animate-in fade-in zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95">
@@ -85,7 +85,7 @@ export default function ManageTokensModal({ open, onClose, tokens }: ManageToken
id={`toggle-${key}`}
checked={isVisible}
onCheckedChange={() => dispatch(toggleTokenHidden({ tokenKey: key }))}
- thumbClassName="bg-white dark:bg-white"
+ thumbClassName="bg-content-inverted dark:bg-content-inverted"
/>
</label>
);
diff --git a/app/src/components/settings/panels/wallet/RevealRecoveryModal.tsx b/app/src/components/settings/panels/wallet/RevealRecoveryModal.tsx
index 35e3f1fa74..0ae075df92 100644
--- a/app/src/components/settings/panels/wallet/RevealRecoveryModal.tsx
+++ b/app/src/components/settings/panels/wallet/RevealRecoveryModal.tsx
@@ -62,10 +62,10 @@ export default function RevealRecoveryModal({ open, onClose, mnemonic }: RevealR
if (!next) onClose();
}}>
<DialogPrimitive.Portal>
- <DialogPrimitive.Overlay className="fixed inset-0 z-50 bg-black/60 backdrop-blur-sm duration-200 animate-in fade-in data-[state=closed]:animate-out data-[state=closed]:fade-out" />
+ <DialogPrimitive.Overlay className="fixed inset-0 z-50 bg-surface-overlay/60 backdrop-blur-sm duration-200 animate-in fade-in data-[state=closed]:animate-out data-[state=closed]:fade-out" />
<DialogPrimitive.Content
aria-describedby={undefined}
- className="fixed left-1/2 top-1/2 z-50 w-full max-w-[500px] -translate-x-1/2 -translate-y-1/2 rounded-3xl bg-surface p-0 shadow-2xl duration-200 animate-in fade-in zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 flex flex-col max-h-[85vh] border border-white/5">
+ className="fixed left-1/2 top-1/2 z-50 w-full max-w-[500px] -translate-x-1/2 -translate-y-1/2 rounded-3xl bg-surface p-0 shadow-2xl duration-200 animate-in fade-in zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95 flex flex-col max-h-[85vh] border border-content-inverted/5">
<div className="relative flex items-center justify-center px-5 py-4 shrink-0">
<DialogPrimitive.Title className="text-sm font-semibold text-content m-0 p-0">
{t('mnemonic.saveRecoveryPhrase')}
@@ -112,10 +112,10 @@ export default function RevealRecoveryModal({ open, onClose, mnemonic }: RevealR
<button
type="button"
aria-label={t('mnemonic.revealPhrase')}
- className="absolute inset-0 z-10 flex flex-col items-center justify-center cursor-pointer bg-black/40 hover:bg-black/30 transition-colors"
+ className="absolute inset-0 z-10 flex flex-col items-center justify-center cursor-pointer bg-surface-overlay/40 hover:bg-surface-overlay/30 transition-colors"
onClick={() => setRevealed(true)}>
<svg
- className="w-7 h-7 text-white mb-2"
+ className="w-7 h-7 text-content-inverted mb-2"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
@@ -126,10 +126,10 @@ export default function RevealRecoveryModal({ open, onClose, mnemonic }: RevealR
d="M3.98 8.223A10.477 10.477 0 001.934 12C3.226 16.338 7.244 19.5 12 19.5c.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"
/>
</svg>
- <span className="text-[15px] font-semibold text-white mb-1 tracking-tight">
+ <span className="text-[15px] font-semibold text-content-inverted mb-1 tracking-tight">
{t('mnemonic.revealPhrase')}
</span>
- <span className="text-[12px] font-medium text-white/80">
+ <span className="text-[12px] font-medium text-content-inverted/80">
{t('mnemonic.warning')}
</span>
</button>
diff --git a/app/src/components/settings/panels/wallet/SelectNetworkModal.tsx b/app/src/components/settings/panels/wallet/SelectNetworkModal.tsx
index 605ec395b5..5dbb2dd5d4 100644
--- a/app/src/components/settings/panels/wallet/SelectNetworkModal.tsx
+++ b/app/src/components/settings/panels/wallet/SelectNetworkModal.tsx
@@ -23,7 +23,7 @@ export default function SelectNetworkModal({
return (
<DialogPrimitive.Root open={open} onOpenChange={(next: boolean) => !next && onClose()}>
<DialogPrimitive.Portal>
- <DialogPrimitive.Overlay className="fixed inset-0 z-50 bg-black/60 backdrop-blur-sm duration-200 animate-in fade-in data-[state=closed]:animate-out data-[state=closed]:fade-out" />
+ <DialogPrimitive.Overlay className="fixed inset-0 z-50 bg-surface-overlay/60 backdrop-blur-sm duration-200 animate-in fade-in data-[state=closed]:animate-out data-[state=closed]:fade-out" />
<DialogPrimitive.Content
aria-describedby={undefined}
className="fixed left-1/2 top-1/2 z-50 w-full max-w-[340px] -translate-x-1/2 -translate-y-1/2 rounded-2xl bg-surface p-0 shadow-2xl duration-200 animate-in fade-in zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95">
diff --git a/app/src/components/settings/panels/wallet/SendCryptoModal.tsx b/app/src/components/settings/panels/wallet/SendCryptoModal.tsx
index d0c7fc6bbc..0d45173996 100644
--- a/app/src/components/settings/panels/wallet/SendCryptoModal.tsx
+++ b/app/src/components/settings/panels/wallet/SendCryptoModal.tsx
@@ -127,7 +127,7 @@ const SendCryptoModal = ({ balance, onClose, onSuccess }: SendCryptoModalProps)
if (!next) onClose();
}}>
<DialogPrimitive.Portal>
- <DialogPrimitive.Overlay className="fixed inset-0 z-50 bg-black/60 backdrop-blur-sm duration-200 animate-in fade-in data-[state=closed]:animate-out data-[state=closed]:fade-out" />
+ <DialogPrimitive.Overlay className="fixed inset-0 z-50 bg-surface-overlay/60 backdrop-blur-sm duration-200 animate-in fade-in data-[state=closed]:animate-out data-[state=closed]:fade-out" />
<DialogPrimitive.Content
aria-describedby={undefined}
className="fixed left-1/2 top-1/2 z-50 w-full max-w-[400px] -translate-x-1/2 -translate-y-1/2 rounded-2xl bg-surface p-0 shadow-2xl duration-200 animate-in fade-in zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95">