统一控制台页面布局:替换 mt-[60px] px-2 为统一 min-h-full pb-16 pt-20 + max-w-[1400px] 居中容器

涉及页面:Channel、Token、Redemption、Log、Task、Midjourney、Model、ModelHeat、ModelDeployment、Subscription、User、Setting、Supplier Dashboard/Apply/Channel/PricingSettings、SupplierAdmin list/application、About、DistributorAdmin/Center/Apply、DeploymentAccessGuard、PersonalSetting、Dashboard 等全部控制台页面
This commit is contained in:
wangxiaoji 2026-07-01 15:18:35 +08:00
parent 001ed4c17f
commit 6a210b9667
26 changed files with 123 additions and 63 deletions

View File

@ -43,22 +43,25 @@ const DeploymentAccessGuard = ({
if (loading) { if (loading) {
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<Card loading={true} style={{ minHeight: '400px' }}> <Card loading={true} style={{ minHeight: '400px' }}>
<div style={{ textAlign: 'center', padding: '50px 0' }}> <div style={{ textAlign: 'center', padding: '50px 0' }}>
<Text type='secondary'>{t('加载设置中...')}</Text> <Text type='secondary'>{t('加载设置中...')}</Text>
</div> </div>
</Card> </Card>
</div> </div>
</div>
); );
} }
if (!isEnabled) { if (!isEnabled) {
return ( return (
<div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<div <div
className='mt-[60px] px-4'
style={{ style={{
minHeight: 'calc(100vh - 60px)', minHeight: 'calc(100vh - 160px)',
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
@ -277,18 +280,22 @@ const DeploymentAccessGuard = ({
</Card> </Card>
</div> </div>
</div> </div>
</div>
</div>
); );
} }
if (connectionLoading || (connectionOk === null && !connectionError)) { if (connectionLoading || (connectionOk === null && !connectionError)) {
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<Card loading={true} style={{ minHeight: '400px' }}> <Card loading={true} style={{ minHeight: '400px' }}>
<div style={{ textAlign: 'center', padding: '50px 0' }}> <div style={{ textAlign: 'center', padding: '50px 0' }}>
<Text type='secondary'>{t('正在检查 io.net 连接...')}</Text> <Text type='secondary'>{t('正在检查 io.net 连接...')}</Text>
</div> </div>
</Card> </Card>
</div> </div>
</div>
); );
} }
@ -301,10 +308,11 @@ const DeploymentAccessGuard = ({
const detail = connectionError?.message || ''; const detail = connectionError?.message || '';
return ( return (
<div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<div <div
className='mt-[60px] px-4'
style={{ style={{
minHeight: 'calc(100vh - 60px)', minHeight: 'calc(100vh - 160px)',
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
justifyContent: 'center', justifyContent: 'center',
@ -403,6 +411,8 @@ const DeploymentAccessGuard = ({
</Card> </Card>
</div> </div>
</div> </div>
</div>
</div>
); );
} }

View File

@ -555,7 +555,8 @@ const PersonalSetting = () => {
return ( return (
<div className='mx-auto mt-[60px] max-w-[1400px] px-4 pb-16 sm:px-6 lg:px-10'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
{/* 顶部用户信息区域 */} {/* 顶部用户信息区域 */}
<UserInfoHeader t={t} userState={userState} /> <UserInfoHeader t={t} userState={userState} />
@ -677,6 +678,7 @@ const PersonalSetting = () => {
setTurnstileToken={setTurnstileToken} setTurnstileToken={setTurnstileToken}
/> />
</div> </div>
</div>
); );
}; };

2
web/src/index.css vendored
View File

@ -1187,7 +1187,7 @@ html.dark .home-distributor-cta-btn {
.distributor-apply-page-root { .distributor-apply-page-root {
position: fixed; position: fixed;
z-index: 1; z-index: 1;
top: 64px; top: 80px;
right: 0; right: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;

View File

@ -133,7 +133,8 @@ const About = () => {
); );
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
{aboutLoaded && about === '' ? ( {aboutLoaded && about === '' ? (
<div className='flex justify-center items-center h-screen p-8'> <div className='flex justify-center items-center h-screen p-8'>
<Empty <Empty
@ -167,6 +168,7 @@ const About = () => {
</> </>
)} )}
</div> </div>
</div>
); );
}; };

View File

@ -38,9 +38,11 @@ const File = () => {
}, [editId]); }, [editId]);
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<ChannelsTable /> <ChannelsTable />
</div> </div>
</div>
); );
}; };

View File

@ -22,7 +22,7 @@ import Dashboard from '../../components/dashboard';
const Detail = () => ( const Detail = () => (
<div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='w-full max-w-[1400px] px-4 sm:px-6 lg:px-10 ml-4 lg:ml-10'> <div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<Dashboard /> <Dashboard />
</div> </div>
</div> </div>

View File

@ -1128,7 +1128,8 @@ export default function DistributorAdmin() {
); );
return ( return (
<div className='mt-[60px] px-2 pb-16'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<Typography.Title heading={3}>{t('代理管理中心')}</Typography.Title> <Typography.Title heading={3}>{t('代理管理中心')}</Typography.Title>
<Tabs <Tabs
@ -1976,5 +1977,6 @@ export default function DistributorAdmin() {
/> />
</Modal> </Modal>
</div> </div>
</div>
); );
} }

View File

@ -268,7 +268,7 @@ export default function DistributorApply() {
if (isDist) { if (isDist) {
return ( return (
<div className='distributor-apply-page-root'> <div className='distributor-apply-page-root text-slate-900 dark:text-white'>
<div className='w-full max-w-3xl px-1'> <div className='w-full max-w-3xl px-1'>
<ApplyStatusNotice variant='success' className='w-full'> <ApplyStatusNotice variant='success' className='w-full'>
{t('您已是代理,无需再次申请')} {t('您已是代理,无需再次申请')}

View File

@ -668,7 +668,8 @@ export default function DistributorCenter() {
} }
return ( return (
<div className='mt-14 px-4 pb-16 max-w-7xl mx-auto'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<Title heading={3} className='mb-8'> <Title heading={3} className='mb-8'>
{t('代理分销')} {t('代理分销')}
</Title> </Title>
@ -1197,5 +1198,6 @@ export default function DistributorCenter() {
) : null} ) : null}
</Modal> </Modal>
</div> </div>
</div>
); );
} }

View File

@ -21,9 +21,11 @@ import React from 'react';
import UsageLogsTable from '../../components/table/usage-logs'; import UsageLogsTable from '../../components/table/usage-logs';
const Token = () => ( const Token = () => (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<UsageLogsTable /> <UsageLogsTable />
</div> </div>
</div>
); );
export default Token; export default Token;

View File

@ -21,9 +21,11 @@ import React from 'react';
import MjLogsTable from '../../components/table/mj-logs'; import MjLogsTable from '../../components/table/mj-logs';
const Midjourney = () => ( const Midjourney = () => (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<MjLogsTable /> <MjLogsTable />
</div> </div>
</div>
); );
export default Midjourney; export default Midjourney;

View File

@ -36,9 +36,11 @@ const ModelPage = () => {
}, [editId, modelName]); }, [editId, modelName]);
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<ModelsTable /> <ModelsTable />
</div> </div>
</div>
); );
}; };

View File

@ -41,9 +41,11 @@ const ModelDeploymentPage = () => {
connectionError={connectionError} connectionError={connectionError}
onRetry={() => testConnection()} onRetry={() => testConnection()}
> >
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<DeploymentsTable /> <DeploymentsTable />
</div> </div>
</div>
</DeploymentAccessGuard> </DeploymentAccessGuard>
); );
}; };

View File

@ -22,9 +22,11 @@ import CombinedHeatConfig from './CombinedHeatConfig';
const ModelHeat = () => { const ModelHeat = () => {
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<CombinedHeatConfig /> <CombinedHeatConfig />
</div> </div>
</div>
); );
}; };

View File

@ -22,9 +22,11 @@ import RedemptionsTable from '../../components/table/redemptions';
const Redemption = () => { const Redemption = () => {
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<RedemptionsTable /> <RedemptionsTable />
</div> </div>
</div>
); );
}; };

View File

@ -217,7 +217,8 @@ const Setting = () => {
} }
}, [location.search]); }, [location.search]);
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<Layout> <Layout>
<Layout.Content> <Layout.Content>
<Tabs <Tabs
@ -235,6 +236,7 @@ const Setting = () => {
</Layout.Content> </Layout.Content>
</Layout> </Layout>
</div> </div>
</div>
); );
}; };

View File

@ -22,9 +22,11 @@ import SubscriptionsPage from '../../components/table/subscriptions';
const Subscription = () => { const Subscription = () => {
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<SubscriptionsPage /> <SubscriptionsPage />
</div> </div>
</div>
); );
}; };

View File

@ -112,8 +112,8 @@ const SupplierApplyPage = () => {
if (loading) { if (loading) {
return ( return (
<div <div
className='mt-[60px] px-2 flex items-center justify-center' className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white flex items-center justify-center'
style={{ minHeight: 'calc(100vh - 360px)' }} style={{ minHeight: 'calc(100vh - 200px)' }}
> >
<Spin size='large' /> <Spin size='large' />
</div> </div>
@ -121,7 +121,8 @@ const SupplierApplyPage = () => {
} }
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<SupplierApplicationModal <SupplierApplicationModal
visible={showApplicationModal} visible={showApplicationModal}
handleClose={handleModalClose} handleClose={handleModalClose}
@ -221,6 +222,7 @@ const SupplierApplyPage = () => {
</div> </div>
)} )}
</div> </div>
</div>
); );
}; };

View File

@ -48,7 +48,8 @@ const SupplierChannelContent = () => {
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
{/* Modals */} {/* Modals */}
<ColumnSelectorModal {...channelsData} /> <ColumnSelectorModal {...channelsData} />
<EditTagModal <EditTagModal
@ -117,6 +118,7 @@ const SupplierChannelContent = () => {
<ChannelsTable {...channelsData} /> <ChannelsTable {...channelsData} />
</CardPro> </CardPro>
</div> </div>
</div>
); );
}; };
@ -126,7 +128,8 @@ const SupplierChannelPage = () => {
if (!isSupplier()) { if (!isSupplier()) {
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<div <div
className='flex items-center justify-center' className='flex items-center justify-center'
style={{ minHeight: 'calc(100vh - 360px)' }} style={{ minHeight: 'calc(100vh - 360px)' }}
@ -153,6 +156,7 @@ const SupplierChannelPage = () => {
</Empty> </Empty>
</div> </div>
</div> </div>
</div>
); );
} }

View File

@ -282,7 +282,8 @@ export default function SupplierDashboardPage() {
if (!canAccess) { if (!canAccess) {
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<div <div
className='flex items-center justify-center' className='flex items-center justify-center'
style={{ minHeight: 'calc(100vh - 360px)' }} style={{ minHeight: 'calc(100vh - 360px)' }}
@ -308,11 +309,13 @@ export default function SupplierDashboardPage() {
</Empty> </Empty>
</div> </div>
</div> </div>
</div>
); );
} }
return ( return (
<div className='mt-[60px] w-full max-w-[1600px] mx-auto px-3 sm:px-4 lg:px-6 pb-6'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<Spin spinning={loading} size='large'> <Spin spinning={loading} size='large'>
<div className='flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between mb-3'> <div className='flex flex-col gap-3 lg:flex-row lg:items-start lg:justify-between mb-3'>
<div className='flex items-center gap-2 min-w-0'> <div className='flex items-center gap-2 min-w-0'>
@ -451,5 +454,6 @@ export default function SupplierDashboardPage() {
</Card> </Card>
</Spin> </Spin>
</div> </div>
</div>
); );
} }

View File

@ -157,7 +157,8 @@ const SupplierPricingSettingsContent = () => {
}, []); }, []);
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<Spin spinning={loading} size='large'> <Spin spinning={loading} size='large'>
<Card style={{ marginTop: '10px' }}> <Card style={{ marginTop: '10px' }}>
<Tabs type='card' defaultActiveKey='visual'> <Tabs type='card' defaultActiveKey='visual'>
@ -178,6 +179,7 @@ const SupplierPricingSettingsContent = () => {
</Card> </Card>
</Spin> </Spin>
</div> </div>
</div>
); );
}; };
@ -190,7 +192,8 @@ const PricingSettingsPage = () => {
if (!isSupplier()) { if (!isSupplier()) {
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<div <div
className='flex items-center justify-center' className='flex items-center justify-center'
style={{ minHeight: 'calc(100vh - 360px)' }} style={{ minHeight: 'calc(100vh - 360px)' }}
@ -217,6 +220,7 @@ const PricingSettingsPage = () => {
</Empty> </Empty>
</div> </div>
</div> </div>
</div>
); );
} }

View File

@ -22,9 +22,11 @@ import SupplierApplicationsPage from '../../../components/table/supplier-applica
const SupplierApplication = () => { const SupplierApplication = () => {
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<SupplierApplicationsPage /> <SupplierApplicationsPage />
</div> </div>
</div>
); );
}; };

View File

@ -22,9 +22,11 @@ import SuppliersPage from '../../../components/table/suppliers';
const Suppliers = () => { const Suppliers = () => {
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<SuppliersPage /> <SuppliersPage />
</div> </div>
</div>
); );
}; };

View File

@ -21,9 +21,11 @@ import React from 'react';
import TaskLogsTable from '../../components/table/task-logs'; import TaskLogsTable from '../../components/table/task-logs';
const Task = () => ( const Task = () => (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<TaskLogsTable /> <TaskLogsTable />
</div> </div>
</div>
); );
export default Task; export default Task;

View File

@ -22,9 +22,11 @@ import TokensTable from '../../components/table/tokens';
const Token = () => { const Token = () => {
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<TokensTable /> <TokensTable />
</div> </div>
</div>
); );
}; };

View File

@ -22,9 +22,11 @@ import UsersTable from '../../components/table/users';
const User = () => { const User = () => {
return ( return (
<div className='mt-[60px] px-2'> <div className='min-h-full pb-16 pt-20 text-slate-900 dark:text-white'>
<div className='mx-auto w-full max-w-[1400px] px-4 sm:px-6 lg:px-10'>
<UsersTable /> <UsersTable />
</div> </div>
</div>
); );
}; };