chen.lin
6 天以前 024504a3933e8f2f86e80383e61fa574524a0d28
rsf-admin/src/layout/AppBar.jsx
@@ -1,8 +1,7 @@
import * as React from 'react';
import { AppBar, TitlePortal } from 'react-admin';
import { AppBar } from 'react-admin';
import { Box, useMediaQuery } from '@mui/material';
// https://www.base64-image.de/
import Logo from './Logo';
import { AppBarToolbar } from './AppBarToolbar';
@@ -14,10 +13,27 @@
        <AppBar
            color="secondary"
            toolbar={<AppBarToolbar />}
            sx={{
                '& .RaAppBar-menuButton': {
                    display: 'none !important',
                },
                '& .RaAppBar-toolbar': {
                    paddingLeft: '4px !important',
                    justifyContent: 'flex-start',
                    gap: 2,
                }
            }}
        >
            <TitlePortal />
            {isLargeEnough && <Logo />}
            {isLargeEnough && <Box component="span" sx={{ flex: 1 }} />}
            {isLargeEnough && (
                <Box sx={{
                    display: 'flex',
                    alignItems: 'center',
                    minWidth: 'auto',
                }}>
                    <Logo />
                </Box>
            )}
            <Box component="span" sx={{ flex: 1 }} />
        </AppBar>
    );
};