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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [main]
branches: [main, develop]
pull_request:
branches: [main]
branches: [main, develop]

jobs:
build:
Expand Down
71 changes: 71 additions & 0 deletions src/components/ImportConflictModal.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import { type ImportResult } from '@/lib/stealthLabels';

interface ImportConflictModalProps {
conflicts: ImportResult['conflicts'];
onResolve: (action: 'keep-all' | 'overwrite-all') => void;
onClose: () => void;
}

export function ImportConflictModal({ conflicts, onResolve, onClose }: ImportConflictModalProps) {
return (
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/70">
<div className="mx-4 w-full max-w-lg border border-outline-variant bg-surface-container p-6">
<h2 className="mb-1 font-heading text-lg font-bold uppercase tracking-tight text-on-surface">
Import Conflicts
</h2>
<p className="mb-4 font-body text-xs text-on-surface-variant">
{conflicts.length} label{conflicts.length !== 1 ? 's' : ''} already exist with different
values.
</p>

<div className="mb-6 max-h-60 overflow-y-auto">
{conflicts.map((c) => (
<div
key={c.stealthAddress}
className="border-b border-outline-variant/30 py-3 last:border-0"
>
<code className="mb-1 block truncate font-mono text-[11px] text-primary">
{c.stealthAddress}
</code>
<div className="flex gap-4">
<div className="flex-1">
<span className="font-mono text-[9px] uppercase tracking-widest text-outline">
Current
</span>
<p className="text-xs text-on-surface">{c.existingLabel || '(empty)'}</p>
</div>
<div className="flex-1">
<span className="font-mono text-[9px] uppercase tracking-widest text-outline">
Incoming
</span>
<p className="text-xs text-on-surface">{c.incomingLabel || '(empty)'}</p>
</div>
</div>
</div>
))}
</div>

<div className="flex gap-2">
<button
onClick={() => onResolve('keep-all')}
className="flex-1 border border-outline-variant py-2 font-heading text-[10px] uppercase tracking-widest text-primary transition-colors hover:bg-surface-bright"
>
Keep Existing
</button>
<button
onClick={() => onResolve('overwrite-all')}
className="flex-1 bg-primary py-2 font-heading text-[10px] uppercase tracking-widest text-surface transition-colors hover:brightness-110"
>
Overwrite All
</button>
<button
onClick={onClose}
className="border border-outline-variant px-4 py-2 font-heading text-[10px] uppercase tracking-widest text-outline transition-colors hover:bg-surface-bright"
>
Cancel
</button>
</div>
</div>
</div>
);
}
27 changes: 27 additions & 0 deletions src/components/PrivacyTooltip.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
interface PrivacyTooltipProps {
onDismiss: () => void;
}

export function PrivacyTooltip({ onDismiss }: PrivacyTooltipProps) {
return (
<div className="border border-outline-variant bg-surface-container p-4 animate-in fade-in">
<div className="flex items-start justify-between gap-3">
<div className="flex-1">
<span className="mb-1 block font-mono text-[10px] font-semibold uppercase tracking-widest text-outline">
Privacy Notice
</span>
<p className="font-body text-xs leading-relaxed text-on-surface-variant">
Labels are stored only in this browser. Clear browser data = lose labels. Wraith never
sees them.
</p>
</div>
<button
onClick={onDismiss}
className="shrink-0 border border-outline-variant px-3 py-1 font-heading text-[10px] uppercase tracking-widest text-primary transition-colors hover:bg-surface-bright"
>
Got it
</button>
</div>
</div>
);
}
Loading