收口轻量支付弹窗与个人中心图标按钮

UnifiedModal 新增无头部模式并补齐对应可访问性测试
RpgEntryHomeView 的支付结果提示、支付确认遮罩与个人中心顶栏图标按钮改用共享组件
更新 PlatformUiKit 收口计划与 .hermes 决策记录
This commit is contained in:
2026-06-10 17:15:43 +08:00
parent ba5f84d963
commit 701fd42777
6 changed files with 147 additions and 100 deletions

View File

@@ -3337,69 +3337,76 @@ function RechargePaymentResultModal({
: 'text-[var(--platform-button-danger-text)]';
return (
<div className="platform-modal-backdrop fixed inset-0 z-[90] flex items-center justify-center px-4 py-6">
<div
role="dialog"
aria-modal="true"
aria-labelledby="recharge-payment-result-title"
className="platform-modal-shell platform-remap-surface w-full max-w-sm overflow-hidden rounded-[1.4rem]"
>
<div className="px-5 pb-5 pt-6 text-center">
<PlatformIconBadge
icon={<Icon className="h-8 w-8" aria-hidden="true" />}
size="xl"
tone="neutral"
className={`mx-auto bg-white/10 ${iconClass}`}
/>
<div
id="recharge-payment-result-title"
className="mt-4 text-xl font-black text-[var(--platform-text-strong)]"
>
{result.title}
</div>
<div className="mt-3 text-sm font-semibold leading-6 text-[var(--platform-text-soft)]">
{result.message}
</div>
<PlatformActionButton
surface="profile"
fullWidth
size="md"
className="mt-5"
onClick={onClose}
>
</PlatformActionButton>
</div>
<UnifiedModal
open
title={result.title}
onClose={onClose}
showHeader={false}
showCloseButton={false}
closeOnBackdrop={false}
closeOnEscape={false}
portal={false}
size="sm"
zIndexClassName="z-[90]"
overlayClassName={PROFILE_MODAL_OVERLAY_CLASS}
panelClassName="platform-remap-surface !max-w-sm rounded-[1.4rem]"
bodyClassName="px-5 pb-5 pt-6 text-center"
>
<PlatformIconBadge
icon={<Icon className="h-8 w-8" aria-hidden="true" />}
size="xl"
tone="neutral"
className={`mx-auto bg-white/10 ${iconClass}`}
/>
<div className="mt-4 text-xl font-black text-[var(--platform-text-strong)]">
{result.title}
</div>
</div>
<div className="mt-3 text-sm font-semibold leading-6 text-[var(--platform-text-soft)]">
{result.message}
</div>
<PlatformActionButton
surface="profile"
fullWidth
size="md"
className="mt-5"
onClick={onClose}
>
</PlatformActionButton>
</UnifiedModal>
);
}
function RechargePaymentConfirmationMask({ orderId }: { orderId: string }) {
return (
<div className="platform-modal-backdrop fixed inset-0 z-[95] flex items-center justify-center px-4 py-6">
<div
role="dialog"
aria-modal="true"
aria-label="正在确认支付"
className="platform-modal-shell platform-remap-surface w-full max-w-sm overflow-hidden rounded-[1.4rem]"
>
<div className="px-5 pb-5 pt-6 text-center">
<PlatformIconBadge
icon={<Loader2 className="h-8 w-8 animate-spin" aria-hidden="true" />}
size="xl"
tone="neutral"
className="mx-auto bg-white/10 text-[var(--platform-accent)]"
/>
<div className="mt-4 text-xl font-black text-[var(--platform-text-strong)]">
</div>
<div className="mt-3 text-sm font-semibold leading-6 text-[var(--platform-text-soft)]">
{orderId}
</div>
</div>
<UnifiedModal
open
title="正在确认支付"
onClose={() => undefined}
showHeader={false}
showCloseButton={false}
closeOnBackdrop={false}
closeOnEscape={false}
portal={false}
size="sm"
zIndexClassName="z-[95]"
overlayClassName={PROFILE_MODAL_OVERLAY_CLASS}
panelClassName="platform-remap-surface !max-w-sm rounded-[1.4rem]"
bodyClassName="px-5 pb-5 pt-6 text-center"
>
<PlatformIconBadge
icon={<Loader2 className="h-8 w-8 animate-spin" aria-hidden="true" />}
size="xl"
tone="neutral"
className="mx-auto bg-white/10 text-[var(--platform-accent)]"
/>
<div className="mt-4 text-xl font-black text-[var(--platform-text-strong)]">
</div>
</div>
<div className="mt-3 text-sm font-semibold leading-6 text-[var(--platform-text-soft)]">
{orderId}
</div>
</UnifiedModal>
);
}
@@ -7402,22 +7409,18 @@ export function RpgEntryHomeView({
<RpgEntryBrandLogo />
{isAuthenticated && activeTab === 'profile' ? (
<div className="flex items-center gap-2.5">
<button
type="button"
<PlatformIconButton
label="扫码"
icon={<ScanLine className="h-5 w-5" />}
onClick={openQrScannerPanel}
className="platform-profile-header__icon-button"
aria-label="扫码"
>
<ScanLine className="h-5 w-5" />
</button>
<button
type="button"
/>
<PlatformIconButton
label="打开设置"
icon={<Settings className="h-5 w-5" />}
onClick={() => authUi?.openSettingsModal()}
className="platform-profile-header__icon-button"
aria-label="打开设置"
>
<Settings className="h-5 w-5" />
</button>
/>
</div>
) : isAuthenticated &&
(activeTab === 'create' || activeTab === 'saves') ? (