mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-06 05:59:25 +08:00
Merge branch 'next' into develop
This commit is contained in:
commit
c1e799cd58
@ -7,23 +7,27 @@
|
|||||||
* For more information, please refer to: https://www.nocobase.com/agreement.
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import React, { FC } from 'react';
|
|
||||||
import { Layout } from 'antd';
|
import { Layout } from 'antd';
|
||||||
|
import React, { FC } from 'react';
|
||||||
import { isDesktop } from 'react-device-detect';
|
import { isDesktop } from 'react-device-detect';
|
||||||
|
|
||||||
import { DesktopModeHeader } from './Header';
|
import { useUIConfigurationPermissions } from '@nocobase/client';
|
||||||
import { DesktopModeContent } from './Content';
|
|
||||||
import { SizeContextProvider } from './sizeContext';
|
|
||||||
import { PageBackgroundColor } from '../constants';
|
import { PageBackgroundColor } from '../constants';
|
||||||
|
import { DesktopModeContent } from './Content';
|
||||||
|
import { DesktopModeHeader } from './Header';
|
||||||
|
import { SizeContextProvider } from './sizeContext';
|
||||||
|
|
||||||
interface DesktopModeProps {
|
interface DesktopModeProps {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DesktopMode: FC<DesktopModeProps> = ({ children }) => {
|
export const DesktopMode: FC<DesktopModeProps> = ({ children }) => {
|
||||||
if (!isDesktop) {
|
const { allowConfigUI } = useUIConfigurationPermissions();
|
||||||
|
|
||||||
|
if (!isDesktop || !allowConfigUI) {
|
||||||
return <>{children}</>;
|
return <>{children}</>;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SizeContextProvider>
|
<SizeContextProvider>
|
||||||
<Layout style={{ height: '100%', background: PageBackgroundColor }}>
|
<Layout style={{ height: '100%', background: PageBackgroundColor }}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user