Skip to content

Commit d11d982

Browse files
jungcome7claude
andcommitted
fix: 왼쪽 패널 스텝을 2 카테고리 9스텝으로 업데이트
- Smart Account 업/다운그레이드 (4): 계정메뉴, 네트워크토글, 업그레이드, 다운그레이드 - 배치 서명 UI (5): 요약&상세, 콜목록, 고급정보&수수료, 자동업그레이드, 수수료모달 - 각 카테고리별 라벨과 카운트 표시 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a462d13 commit d11d982

File tree

1 file changed

+137
-103
lines changed

1 file changed

+137
-103
lines changed

apps/web/src/smart-account-prototype/control-panel.tsx

Lines changed: 137 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -448,33 +448,32 @@ const FixedTitle = styled.div`
448448
// Data — order: A (Full Control), B (Seamless), C (Invisible)
449449
// ---------------------------------------------------------------------------
450450

451+
interface FeatureItem {
452+
title: string;
453+
desc: string;
454+
}
455+
456+
interface FeatureCategory {
457+
label: string;
458+
features: FeatureItem[];
459+
}
460+
451461
interface ModeConfig {
452462
key: PrototypeMode;
453463
letter: string;
454464
color: string;
455465
name: string;
456466
subtitle: string;
457-
features: { title: string; desc: string }[];
467+
categories: FeatureCategory[];
458468
}
459469

460-
const getModeData = (): ModeConfig[] => [
470+
const getFeatureCategories = (): FeatureCategory[] => [
461471
{
462-
key: "seamless",
463-
letter: "A",
464-
color: "#2DCE89",
465-
name: "A. Keplr",
466-
subtitle: t(
467-
"MetaMask Smart Account에 Keplr 스타일의 디자인 터치를 가미한 버전",
468-
"MetaMask Smart Account with Keplr-style design touches"
472+
label: t(
473+
"Smart Account 업/다운그레이드",
474+
"Smart Account Upgrade/Downgrade"
469475
),
470476
features: [
471-
{
472-
title: t("홈 — 활성화 안내 모달", "Home — Activation Modal"),
473-
desc: t(
474-
"changelog 스타일 모달로 안내",
475-
"Changelog-style modal notification"
476-
),
477-
},
478477
{
479478
title: t(
480479
"계정 메뉴 — Smart Account 진입",
@@ -490,84 +489,97 @@ const getModeData = (): ModeConfig[] => [
490489
desc: t("체인별 개별 ON/OFF", "Individual ON/OFF per chain"),
491490
},
492491
{
493-
title: t("설정 — 업그레이드 확인", "Settings — Upgrade Confirmation"),
492+
title: t("트랜잭션 확인 — 업그레이드", "TX Confirm — Upgrade"),
494493
desc: t(
495-
"계정 유형 전환 확인 페이지",
496-
"Account type switch confirmation page"
494+
"EIP-7702 위임 TX 확인, 수수료 조정",
495+
"EIP-7702 delegation TX confirmation, fee adjustment"
497496
),
498497
},
499498
{
500-
title: t("스왑 — 배치 트랜잭션", "Swap — Batch Transaction"),
501-
desc: t("Approve + Swap 자동 묶음 처리", "Auto-bundled Approve + Swap"),
502-
},
503-
{
504-
title: t(
505-
"트랜잭션 확인 — 자동 업그레이드",
506-
"TX Confirm — Auto Upgrade"
507-
),
499+
title: t("트랜잭션 확인 — 다운그레이드", "TX Confirm — Downgrade"),
508500
desc: t(
509-
"지원 dApp+네트워크에서 업그레이드 자동 포함",
510-
"Auto-include upgrade on supported dApp+network"
501+
"일반 계정으로 복원 TX 확인",
502+
"Revert to regular account TX confirmation"
511503
),
512504
},
513505
],
514506
},
515507
{
516-
key: "explicit",
517-
letter: "B",
518-
color: "#FA6410",
519-
name: "B. MetaMask",
520-
subtitle: t(
521-
"MetaMask Smart Account UI를 그대로 옮긴 오리지널 버전",
522-
"Original version directly porting MetaMask Smart Account UI"
523-
),
508+
label: t("배치 서명 UI", "Batch Signing UI"),
524509
features: [
525-
{
526-
title: t("홈 — 활성화 유도 카드", "Home — Activation Promo Card"),
527-
desc: t(
528-
"미활성 사용자에게 프로모 카드 표시",
529-
"Promo card shown to inactive users"
530-
),
531-
},
532510
{
533511
title: t(
534-
"계정 메뉴Smart Account 진입",
535-
"Account MenuSmart Account Entry"
512+
"배치 서명요약 & 상세",
513+
"Batch SigningSummary & Details"
536514
),
537515
desc: t(
538-
"계정 ⋯ 메뉴에서 관리 페이지로 이동",
539-
"Navigate to management page from account ⋯ menu"
516+
"콜 수, 계정/요청자/네트워크 확인",
517+
"Call count, account/requester/network review"
540518
),
541519
},
542520
{
543-
title: t("설정 — 네트워크별 토글", "Settings — Per-Network Toggle"),
544-
desc: t("체인별 개별 ON/OFF", "Individual ON/OFF per chain"),
521+
title: t("배치 서명 — 콜 목록", "Batch Signing — Calls List"),
522+
desc: t(
523+
"4-byte 셀렉터 디코딩, 접기/펼치기",
524+
"4-byte selector decoding, expand/collapse"
525+
),
545526
},
546527
{
547-
title: t("설정 — 업그레이드 확인", "Settings — Upgrade Confirmation"),
528+
title: t(
529+
"배치 서명 — 고급 정보 & 수수료",
530+
"Batch Signing — Advanced Details & Fee"
531+
),
548532
desc: t(
549-
"계정 유형 전환 확인 페이지",
550-
"Account type switch confirmation page"
533+
"Nonce, Raw JSON, 수수료 조정",
534+
"Nonce, Raw JSON, fee adjustment"
551535
),
552536
},
553537
{
554-
title: t("스왑 — 배치 트랜잭션", "Swap — Batch Transaction"),
555-
desc: t("Approve + Swap 자동 묶음 처리", "Auto-bundled Approve + Swap"),
538+
title: t("배치 서명 — 자동 업그레이드", "Batch Signing — Auto Upgrade"),
539+
desc: t(
540+
"EOA 미위임 시 업그레이드 배너 표시",
541+
"Upgrade banner when EOA not yet delegated"
542+
),
556543
},
557544
{
558-
title: t(
559-
"트랜잭션 확인 — 자동 업그레이드",
560-
"TX Confirm — Auto Upgrade"
561-
),
545+
title: t("수수료 모달", "Fee Modal"),
562546
desc: t(
563-
"지원 dApp+네트워크에서 업그레이드 자동 포함",
564-
"Auto-include upgrade on supported dApp+network"
547+
"Low/Average/High 선택, Gas Limit, Max Fee",
548+
"Low/Average/High selection, Gas Limit, Max Fee"
565549
),
566550
},
567551
],
568552
},
569553
];
570554

555+
const getModeData = (): ModeConfig[] => {
556+
const categories = getFeatureCategories();
557+
return [
558+
{
559+
key: "seamless",
560+
letter: "A",
561+
color: "#2DCE89",
562+
name: "A. Keplr",
563+
subtitle: t(
564+
"MetaMask Smart Account에 Keplr 스타일의 디자인 터치를 가미한 버전",
565+
"MetaMask Smart Account with Keplr-style design touches"
566+
),
567+
categories,
568+
},
569+
{
570+
key: "explicit",
571+
letter: "B",
572+
color: "#FA6410",
573+
name: "B. MetaMask",
574+
subtitle: t(
575+
"MetaMask Smart Account UI를 그대로 옮긴 오리지널 버전",
576+
"Original version directly porting MetaMask Smart Account UI"
577+
),
578+
categories,
579+
},
580+
];
581+
};
582+
571583
// ---------------------------------------------------------------------------
572584
// Component
573585
// ---------------------------------------------------------------------------
@@ -709,48 +721,70 @@ export const ControlPanel: FunctionComponent = () => {
709721
{mode.subtitle}
710722
</div>
711723

712-
{/* Features → each = 1 tour step. Click to jump to that step. */}
713-
<FeatureListLabel>
714-
<span>
715-
{t(
716-
`확인할 기능 (${mode.features.length})`,
717-
`Features (${mode.features.length})`
718-
)}
719-
</span>
720-
<span
721-
style={{
722-
fontWeight: 400,
723-
textTransform: "none",
724-
letterSpacing: 0,
725-
fontSize: 10,
726-
color: "#5d5e6e",
727-
whiteSpace: "nowrap",
728-
flexShrink: 0,
729-
}}
730-
>
731-
{t("클릭 → 투어", "Click → Tour")}
732-
</span>
733-
</FeatureListLabel>
734-
{mode.features.map((f, i) => (
735-
<FeatureCard
736-
key={i}
737-
data-feature-index={i}
738-
$active={currentTourStep === i}
739-
$color={mode.color}
740-
onClick={() => handleFeatureClick(i)}
741-
>
742-
<FeatureIdx $active={currentTourStep === i} $color={mode.color}>
743-
{i + 1}
744-
</FeatureIdx>
745-
<FeatureBody>
746-
<FeatureNameRow>
747-
<FeatureName>{f.title}</FeatureName>
748-
<FeatureArrow></FeatureArrow>
749-
</FeatureNameRow>
750-
<FeatureDesc>{f.desc}</FeatureDesc>
751-
</FeatureBody>
752-
</FeatureCard>
753-
))}
724+
{/* Features by category → each = 1 tour step. Click to jump. */}
725+
{(() => {
726+
let globalIdx = 0;
727+
const totalFeatures = mode.categories.reduce(
728+
(sum, cat) => sum + cat.features.length,
729+
0
730+
);
731+
return mode.categories.map((cat, catIdx) => (
732+
<React.Fragment key={catIdx}>
733+
<FeatureListLabel>
734+
<span>
735+
{cat.label}{" "}
736+
<span style={{ fontWeight: 400, color: "#5d5e6e" }}>
737+
({cat.features.length})
738+
</span>
739+
</span>
740+
{catIdx === 0 && (
741+
<span
742+
style={{
743+
fontWeight: 400,
744+
textTransform: "none",
745+
letterSpacing: 0,
746+
fontSize: 10,
747+
color: "#5d5e6e",
748+
whiteSpace: "nowrap",
749+
flexShrink: 0,
750+
}}
751+
>
752+
{t(
753+
`전체 ${totalFeatures}개 · 클릭 → 투어`,
754+
`${totalFeatures} total · Click → Tour`
755+
)}
756+
</span>
757+
)}
758+
</FeatureListLabel>
759+
{cat.features.map((f) => {
760+
const idx = globalIdx++;
761+
return (
762+
<FeatureCard
763+
key={idx}
764+
data-feature-index={idx}
765+
$active={currentTourStep === idx}
766+
$color={mode.color}
767+
onClick={() => handleFeatureClick(idx)}
768+
>
769+
<FeatureIdx
770+
$active={currentTourStep === idx}
771+
$color={mode.color}
772+
>
773+
{idx + 1}
774+
</FeatureIdx>
775+
<FeatureBody>
776+
<FeatureNameRow>
777+
<FeatureName>{f.title}</FeatureName>
778+
<FeatureArrow></FeatureArrow>
779+
</FeatureNameRow>
780+
<FeatureDesc>{f.desc}</FeatureDesc>
781+
</FeatureBody>
782+
</FeatureCard>
783+
);
784+
})}
785+
</React.Fragment>
786+
));
787+
})()}
754788
</ScrollArea>
755789

756790
{/* Bottom bar */}

0 commit comments

Comments
 (0)