feat: 列表页占满宽度,充值页保持居中卡片,嵌入模式优化
- maxWidth 新增 'lg' 选项(max-w-6xl),'full' 改为无限制 - 充值页 PC 端使用 'lg',管理后台/我的订单使用 'full' 占满宽度 - 嵌入模式:减小外边距、隐藏装饰光斑、取消 min-h-screen Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -304,7 +304,7 @@ function PayContent() {
|
||||
<PayPageLayout
|
||||
isDark={isDark}
|
||||
isEmbedded={isEmbedded}
|
||||
maxWidth={isMobile ? 'sm' : 'full'}
|
||||
maxWidth={isMobile ? 'sm' : 'lg'}
|
||||
title="Sub2API 余额充值"
|
||||
subtitle="安全支付,自动到账"
|
||||
actions={!isMobile ? (
|
||||
|
||||
@@ -3,7 +3,7 @@ import React from 'react';
|
||||
interface PayPageLayoutProps {
|
||||
isDark: boolean;
|
||||
isEmbedded?: boolean;
|
||||
maxWidth?: 'sm' | 'full';
|
||||
maxWidth?: 'sm' | 'lg' | 'full';
|
||||
title: string;
|
||||
subtitle: string;
|
||||
actions?: React.ReactNode;
|
||||
@@ -19,30 +19,37 @@ export default function PayPageLayout({
|
||||
actions,
|
||||
children,
|
||||
}: PayPageLayoutProps) {
|
||||
const maxWidthClass = maxWidth === 'sm' ? 'max-w-lg' : maxWidth === 'lg' ? 'max-w-6xl' : '';
|
||||
|
||||
return (
|
||||
<div
|
||||
className={[
|
||||
'relative min-h-screen w-full overflow-hidden p-3 sm:p-4',
|
||||
'relative w-full overflow-hidden',
|
||||
isEmbedded ? 'p-2' : 'min-h-screen p-3 sm:p-4',
|
||||
isDark ? 'bg-slate-950 text-slate-100' : 'bg-slate-100 text-slate-900',
|
||||
].join(' ')}
|
||||
>
|
||||
<div
|
||||
className={[
|
||||
'pointer-events-none absolute -left-20 -top-20 h-56 w-56 rounded-full blur-3xl',
|
||||
isDark ? 'bg-indigo-500/25' : 'bg-sky-300/35',
|
||||
].join(' ')}
|
||||
/>
|
||||
<div
|
||||
className={[
|
||||
'pointer-events-none absolute -right-24 bottom-0 h-64 w-64 rounded-full blur-3xl',
|
||||
isDark ? 'bg-cyan-400/20' : 'bg-indigo-200/45',
|
||||
].join(' ')}
|
||||
/>
|
||||
{!isEmbedded && (
|
||||
<>
|
||||
<div
|
||||
className={[
|
||||
'pointer-events-none absolute -left-20 -top-20 h-56 w-56 rounded-full blur-3xl',
|
||||
isDark ? 'bg-indigo-500/25' : 'bg-sky-300/35',
|
||||
].join(' ')}
|
||||
/>
|
||||
<div
|
||||
className={[
|
||||
'pointer-events-none absolute -right-24 bottom-0 h-64 w-64 rounded-full blur-3xl',
|
||||
isDark ? 'bg-cyan-400/20' : 'bg-indigo-200/45',
|
||||
].join(' ')}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
||||
<div
|
||||
className={[
|
||||
'relative mx-auto w-full rounded-3xl border p-4 sm:p-6',
|
||||
maxWidth === 'sm' ? 'max-w-lg' : 'max-w-6xl',
|
||||
maxWidthClass,
|
||||
isDark
|
||||
? 'border-slate-700/70 bg-slate-900/85 shadow-2xl shadow-black/35'
|
||||
: 'border-slate-200/90 bg-white/95 shadow-2xl shadow-slate-300/45',
|
||||
|
||||
Reference in New Issue
Block a user