Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions apps/web/src/app/settings/sections/plugins.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,21 @@ export function PluginsSection({
</Link>
</div>

{!cryptoKey && (
<div role="status" className="mb-3 flex flex-wrap items-center justify-between gap-2 rounded-lg border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-xs text-amber-200">
<span>Vault locked: API key fields are read-only until you unlock the vault with your passphrase.</span>
<button
type="button"
className="rounded border border-amber-500/50 px-2 py-0.5 text-amber-200 hover:bg-amber-500/20"
onClick={() => {
document.getElementById('vault')?.scrollIntoView({ behavior: 'smooth', block: 'start' });
document.getElementById('vault-passphrase')?.focus({ preventScroll: true });
}}
>
Unlock vault ↑
</button>
</div>
)}
{error && <p className="rounded-lg border border-red-500/40 bg-red-500/10 px-3 py-2 text-xs text-red-300 mb-3">{error}</p>}
{loading && <p className="text-sm text-zinc-500">loading…</p>}

Expand Down
4 changes: 3 additions & 1 deletion apps/web/src/app/settings/shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ export function SecretRow({
const [revealBusy, setRevealBusy] = useState(false);
const [revealErr, setRevealErr] = useState<string | null>(null);
const hasReveal = revealed !== undefined;
const placeholder = isSet
const placeholder = disabled
? 'vault locked: unlock above to edit'
: isSet
? hasReveal && length !== undefined
? `set, ${length} chars — type to overwrite`
: `••••••••• (set) — type to overwrite or click reveal`
Expand Down
3 changes: 2 additions & 1 deletion apps/web/src/app/settings/vault-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export function VaultPanel({
: 'locked: your strategies are paused';

return (
<section className="space-y-4 rounded-2xl border border-zinc-800 bg-zinc-900/80 p-5">
<section id="vault" className="space-y-4 rounded-2xl border border-zinc-800 bg-zinc-900/80 p-5">
<div className="flex flex-wrap items-center justify-between gap-2">
<h2 className="text-lg font-semibold text-zinc-100">Vault</h2>
<span className={`text-xs ${vault ? 'text-emerald-400' : 'text-zinc-400'}`}>{vault ? 'unlocked in this tab' : 'locked'}</span>
Expand All @@ -236,6 +236,7 @@ export function VaultPanel({
<div className="space-y-2">
<label className="block text-xs uppercase tracking-wider text-zinc-400">{useRecovery ? 'Recovery key' : 'Passphrase'}
<input
id="vault-passphrase"
type={useRecovery ? 'text' : 'password'}
autoComplete={useRecovery ? 'off' : 'current-password'}
className={input}
Expand Down
Loading