Skip to content

Commit e2c694e

Browse files
feat(dashboard): add Governance Impact badge to proposal cards
Show a distinct orange gradient badge with ShieldAlert icon on proposals that alter multisig ownership or voting power (add_owner, remove_owner, change_owner_weight). Transfer and spending-limit proposals are excluded. Badge is visually distinct from the existing type badge and StatusBadge.
1 parent f48af0d commit e2c694e

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

frontend/src/components/ProposalCard.tsx

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Link } from "react-router-dom";
33
import type { Proposal, ProposalCategory, ProposalKind } from "../types/accord";
44
import { ApprovalBar } from "./ApprovalBar";
55
import { StatusBadge } from "./StatusBadge";
6-
import { Check, Copy, Link2 } from "lucide-react";
6+
import { Check, Copy, Link2, ShieldAlert } from "lucide-react";
77
import { shortenAddr, formatWeightPercent } from "../lib/soroban";
88

99
type ProposalCardProps = {
@@ -33,6 +33,13 @@ const KIND_LABELS: Record<Exclude<ProposalKind, "recurring">, { title: string; b
3333
recurring: { title: "Recurring Payment", badge: "Payment" },
3434
};
3535

36+
/** Proposal kinds that reshape multisig ownership or voting power. */
37+
const GOVERNANCE_KINDS = new Set<ProposalKind>([
38+
"add_owner",
39+
"remove_owner",
40+
"change_owner_weight",
41+
]);
42+
3643
const CATEGORY_STYLES: Record<ProposalCategory, string> = {
3744
Transfer: "bg-sky-900/50 text-sky-300",
3845
Payroll: "bg-violet-900/50 text-violet-300",
@@ -336,6 +343,16 @@ export function ProposalCard({
336343
<Link2 size={16} />
337344
)}
338345
</button>
346+
{GOVERNANCE_KINDS.has(proposal.kind) && (
347+
<span
348+
role="note"
349+
aria-label="Governance Impact"
350+
className="inline-flex items-center gap-1 text-[11px] font-semibold px-2.5 py-0.5 rounded-full bg-gradient-to-r from-orange-500/20 to-amber-500/20 text-orange-300 border border-orange-500/30 shadow-[0_0_6px_rgba(251,146,60,0.15)] tracking-wide"
351+
>
352+
<ShieldAlert size={12} className="shrink-0" />
353+
Governance Impact
354+
</span>
355+
)}
339356
{proposal.category && (
340357
<span
341358
role="note"

0 commit comments

Comments
 (0)