+
{title}
{description ? (
-
+
{description}
) : null}
@@ -183,7 +204,7 @@ function UnifiedModalContent({
label={closeLabel}
onClick={onClose}
disabled={closeDisabled}
- variant={isPixel ? 'pixel' : 'platformIcon'}
+ variant={closeVariant ?? (isPixel ? 'pixel' : 'platformIcon')}
/>
) : null}
diff --git a/src/components/rpg-entry/RpgEntryHomeView.tsx b/src/components/rpg-entry/RpgEntryHomeView.tsx
index edb28f69..59e3104e 100644
--- a/src/components/rpg-entry/RpgEntryHomeView.tsx
+++ b/src/components/rpg-entry/RpgEntryHomeView.tsx
@@ -132,6 +132,7 @@ import { PlatformSubpanel } from '../common/PlatformSubpanel';
import { PlatformTextField } from '../common/PlatformTextField';
import { RUNTIME_RESOURCE_PENDING_SELECTOR } from '../common/RuntimeResourcePendingMarker';
import { SquareImageCropModal } from '../common/SquareImageCropModal';
+import { UnifiedModal } from '../common/UnifiedModal';
import {
buildCenteredSquareImageCropRect,
clampSquareImageCropRect,
@@ -2824,6 +2825,13 @@ function ProfileReferralUserAvatar({
);
}
+const PROFILE_MODAL_OVERLAY_CLASS =
+ 'platform-modal-backdrop !items-center !justify-center !px-4 !py-6';
+const PROFILE_MODAL_HEADER_CLASS = 'border-white/10 px-5 py-4';
+const PROFILE_MODAL_TITLE_CLASS = 'text-base font-black';
+const PROFILE_MODAL_DESCRIPTION_CLASS =
+ 'mt-1 text-xs font-semibold text-[var(--platform-text-soft)]';
+
function ProfileNicknameModal({
value,
error,
@@ -2840,65 +2848,61 @@ function ProfileNicknameModal({
onSubmit: () => void;
}) {
return (
-
-
-
-
-
- {error ? (
-
- {error}
-
- ) : null}
-
-
- 取消
-
-
- {isSaving ? '保存中' : '保存'}
-
-
-
+
+
+ {error ? (
+
+ {error}
+
+ ) : null}
+
+
+ 取消
+
+
+ {isSaving ? '保存中' : '保存'}
+
-
+
);
}
@@ -3189,125 +3193,126 @@ function ProfileRechargeModal({
);
return (
-
-
-
-
-
账户充值
-
- {center
- ? `${center.walletBalance}泥点 · ${memberLabel}`
- : '读取中'}
-
-
-
-
-
-
-
-
-
-
- {error ? (
-
- {error}
-
- 重新加载
-
-
- ) : null}
-
- {isLoading ? (
-
- {Array.from({ length: 4 }).map((_, index) => (
-
- ))}
-
- ) : products.length > 0 ? (
-
- {products.map((product) => (
-
- ))}
-
- ) : (
-
- 暂无可购买套餐
-
- )}
-
- {nativePayment ? (
-
- 微信扫码支付
-
- {nativeQrImageUrl ? (
-

- ) : (
-
- 生成中
-
- )}
-
-
- {nativePayment.isConfirming ? '确认中' : '我已支付'}
-
-
- ) : null}
-
+
+
+
+
-
+
+ {error ? (
+
+ {error}
+
+ 重新加载
+
+
+ ) : null}
+
+ {isLoading ? (
+
+ {Array.from({ length: 4 }).map((_, index) => (
+
+ ))}
+
+ ) : products.length > 0 ? (
+
+ {products.map((product) => (
+
+ ))}
+
+ ) : (
+
+ 暂无可购买套餐
+
+ )}
+
+ {nativePayment ? (
+
+ 微信扫码支付
+
+ {nativeQrImageUrl ? (
+

+ ) : (
+
+ 生成中
+
+ )}
+
+
+ {nativePayment.isConfirming ? '确认中' : '我已支付'}
+
+
+ ) : null}
+
);
}
@@ -3545,113 +3550,114 @@ function ProfileTaskCenterModal({
const walletBalance = center?.walletBalance ?? fallbackBalance;
return (
-
-
-
-
-
每日任务
-
- {walletBalance}泥点
-
-
-
+
+ {error ? (
+
+ {error}
+
+ 重新加载
+
+
+ ) : null}
+ {success ? (
+
+ {success}
+
+ ) : null}
+ {isLoading ? (
+
+ {Array.from({ length: 2 }).map((_, index) => (
+
+ ))}
-
- {error ? (
-
- {error}
-
- 重新加载
-
-
- ) : null}
- {success ? (
-
- {success}
-
- ) : null}
- {isLoading ? (
-
- {Array.from({ length: 2 }).map((_, index) => (
-
- ))}
-
- ) : tasks.length === 0 ? (
-
- 暂无任务
-
- ) : (
-
- {tasks.map((task) => {
- const isClaimable = task.status === 'claimable';
- const isClaiming = claimingTaskId === task.taskId;
- const progressLabel = buildProfileTaskProgressLabel(task);
+ ) : tasks.length === 0 ? (
+
+ 暂无任务
+
+ ) : (
+
+ {tasks.map((task) => {
+ const isClaimable = task.status === 'claimable';
+ const isClaiming = claimingTaskId === task.taskId;
+ const progressLabel = buildProfileTaskProgressLabel(task);
- return (
-
-
-
-
- {task.title}
-
-
- {progressLabel}
-
-
-
-
- +{task.rewardPoints}
-
-
- {getProfileTaskStatusLabel(task.status)}
-
-
+ return (
+
+
+
+
+ {task.title}
-
onClaim(task.taskId)}
- >
- {getProfileTaskClaimButtonLabel(task, isClaiming)}
-
-
- );
- })}
-
- )}
+
+ {progressLabel}
+
+
+
+
+ +{task.rewardPoints}
+
+
+ {getProfileTaskStatusLabel(task.status)}
+
+
+
+ onClaim(task.taskId)}
+ >
+ {getProfileTaskClaimButtonLabel(task, isClaiming)}
+
+
+ );
+ })}
-
-
+ )}
+
);
}
@@ -3673,65 +3679,69 @@ function RewardCodeRedeemModal({
onClose: () => void;
}) {
return (
-
-
-
-
-
onChange(event.target.value)}
- onKeyDown={(event) => {
- if (event.key === 'Enter') {
- onSubmit();
- }
- }}
- size="sm"
- density="roomy"
- className="uppercase tracking-normal"
- placeholder="输入兑换码"
- aria-label="兑换码"
- autoFocus
- />
-
- {isSubmitting ? '兑换中' : '兑换'}
-
- {error ? (
-
- {error}
-
- ) : null}
- {success ? (
-
- {success}
-
- ) : null}
-
-
-
+
+ onChange(event.target.value)}
+ onKeyDown={(event) => {
+ if (event.key === 'Enter') {
+ onSubmit();
+ }
+ }}
+ size="sm"
+ density="roomy"
+ className="uppercase tracking-normal"
+ placeholder="输入兑换码"
+ aria-label="兑换码"
+ autoFocus
+ />
+
+ {isSubmitting ? '兑换中' : '兑换'}
+
+ {error ? (
+
+ {error}
+
+ ) : null}
+ {success ? (
+
+ {success}
+
+ ) : null}
+
);
}