mirror of
https://github.com/nocobase/nocobase.git
synced 2026-08-30 16:56:07 +08:00
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:
@@ -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}>
|
||||
|
||||
Reference in New Issue
Block a user