fix: adjust layout styles for better responsiveness in AuthLayout and… (#7159)

* fix: adjust layout styles for better responsiveness in AuthLayout and CustomThemeProvider

* refactor(AuthLayout): enhance layout styling
This commit is contained in:
Zeke Zhang
2025-07-13 18:36:25 +08:00
committed by GitHub
parent 4c3e09439c
commit c5d44aa4a7
2 changed files with 15 additions and 3 deletions
@@ -8,7 +8,15 @@
*/
import { css } from '@emotion/css';
import { PoweredBy, ReadPretty, SwitchLanguage, useAPIClient, useRequest, useSystemSettings } from '@nocobase/client';
import {
PoweredBy,
ReadPretty,
SwitchLanguage,
useAPIClient,
useRequest,
useSystemSettings,
useToken,
} from '@nocobase/client';
import { Spin } from 'antd';
import React, { FC } from 'react';
import { Outlet } from 'react-router-dom';
@@ -46,12 +54,14 @@ export const AuthenticatorsContextProvider: FC<{ children: React.ReactNode }> =
export function AuthLayout() {
const { data } = useSystemSettings() || {};
const { token } = useToken();
return (
<div
style={{
maxWidth: 320,
margin: '0 auto',
paddingTop: '20vh',
paddingBottom: '20vh',
}}
>
<div style={{ position: 'fixed', top: '2em', right: '2em' }}>
@@ -66,10 +76,12 @@ export function AuthLayout() {
<div
className={css`
position: absolute;
bottom: 24px;
bottom: 0;
width: 100%;
left: 0;
text-align: center;
padding-bottom: 24px;
background-color: ${token.colorBgContainer};
`}
>
<PoweredBy />
@@ -56,7 +56,7 @@ const CustomThemeProvider = React.memo((props) => {
}, [open]);
const editor = (
<div style={{ display: 'flex', overflow: 'hidden', height: '100%' }}>
<div style={{ display: 'flex', overflow: 'auto', height: '100%' }}>
<div style={contentStyle}>{props.children}</div>
{open ? (
<div className={styles.editor}>