fix: dashboard

This commit is contained in:
Lakhan Samani 2022-05-25 16:34:54 +05:30
parent 7c16900618
commit 7b13034081
7 changed files with 23 additions and 18 deletions

View File

@ -23,7 +23,6 @@ const theme = extendTheme({
styles: { styles: {
global: { global: {
'html, body, #root': { 'html, body, #root': {
fontFamily: 'Avenir, Helvetica, Arial, sans-serif',
height: '100%', height: '100%',
outline: 'none', outline: 'none',
}, },

View File

@ -23,7 +23,7 @@ const OAuthConfig = ({
<div> <div>
<Box> <Box>
<Text fontSize="md" paddingTop="2%" fontWeight="bold" mb={6}> <Text fontSize="md" paddingTop="2%" fontWeight="bold" mb={6}>
Your instance information Authorizer Config
</Text> </Text>
<Stack spacing={6} padding="2% 0%"> <Stack spacing={6} padding="2% 0%">
<Flex direction={isNotSmallerScreen ? 'row' : 'column'}> <Flex direction={isNotSmallerScreen ? 'row' : 'column'}>

View File

@ -13,6 +13,7 @@ import {
Textarea, Textarea,
Switch, Switch,
Code, Code,
Text,
} from '@chakra-ui/react'; } from '@chakra-ui/react';
import { import {
FaRegClone, FaRegClone,
@ -183,7 +184,7 @@ const InputField = ({
w="100%" w="100%"
borderRadius={5} borderRadius={5}
paddingTop="0.5%" paddingTop="0.5%"
overflowX={variables[inputType].length > 3 ? "scroll" : "hidden"} overflowX={variables[inputType].length > 3 ? 'scroll' : 'hidden'}
overflowY="hidden" overflowY="hidden"
justifyContent="start" justifyContent="start"
alignItems="center" alignItems="center"
@ -301,7 +302,9 @@ const InputField = ({
if (Object.values(SwitchInputType).includes(inputType)) { if (Object.values(SwitchInputType).includes(inputType)) {
return ( return (
<Flex w="25%" justifyContent="space-between"> <Flex w="25%" justifyContent="space-between">
<Code h="75%">Off</Code> <Text h="75%" fontWeight="bold" marginRight="2">
Off
</Text>
<Switch <Switch
size="md" size="md"
isChecked={variables[inputType]} isChecked={variables[inputType]}
@ -312,7 +315,9 @@ const InputField = ({
}); });
}} }}
/> />
<Code h="75%">On</Code> <Text h="75%" fontWeight="bold" marginLeft="2">
On
</Text>
</Flex> </Flex>
); );
} }

View File

@ -119,7 +119,7 @@ interface SidebarProps extends BoxProps {
export const Sidebar = ({ onClose, ...rest }: SidebarProps) => { export const Sidebar = ({ onClose, ...rest }: SidebarProps) => {
const { pathname } = useLocation(); const { pathname } = useLocation();
const [{ fetching, data }] = useQuery({ query: MetaQuery }); const [{ data }] = useQuery({ query: MetaQuery });
const [isNotSmallerScreen] = useMediaQuery('(min-width:600px)'); const [isNotSmallerScreen] = useMediaQuery('(min-width:600px)');
return ( return (
<Box <Box
@ -127,7 +127,7 @@ export const Sidebar = ({ onClose, ...rest }: SidebarProps) => {
bg={useColorModeValue('white', 'gray.900')} bg={useColorModeValue('white', 'gray.900')}
borderRight="1px" borderRight="1px"
borderRightColor={useColorModeValue('gray.200', 'gray.700')} borderRightColor={useColorModeValue('gray.200', 'gray.700')}
w={{ base: 'full', md: 60 }} w={{ base: 'full', md: '64' }}
pos="fixed" pos="fixed"
h="full" h="full"
{...rest} {...rest}
@ -137,7 +137,7 @@ export const Sidebar = ({ onClose, ...rest }: SidebarProps) => {
alignItems="center" alignItems="center"
mx="18" mx="18"
justifyContent="space-between" justifyContent="space-between"
flexDirection="column" flexDirection="row"
> >
<NavLink to="/"> <NavLink to="/">
<Flex alignItems="center" mt="6"> <Flex alignItems="center" mt="6">
@ -298,7 +298,7 @@ export const MobileNav = ({ onOpen, ...rest }: MobileProps) => {
return ( return (
<Flex <Flex
ml={{ base: 0, md: 60 }} ml={{ base: 0, md: 64 }}
px={{ base: 4, md: 4 }} px={{ base: 4, md: 4 }}
height="20" height="20"
position="fixed" position="fixed"

View File

@ -20,6 +20,7 @@ export function AuthLayout({ children }: { children: React.ReactNode }) {
alignItems="center" alignItems="center"
justifyContent="center" justifyContent="center"
direction={['column', 'column']} direction={['column', 'column']}
padding={['2%', '2%', '2%', '2%']}
> >
<Flex alignItems="center" maxW="100%"> <Flex alignItems="center" maxW="100%">
<Image <Image

View File

@ -31,7 +31,7 @@ export function DashboardLayout({ children }: { children: ReactNode }) {
</Drawer> </Drawer>
{/* mobilenav */} {/* mobilenav */}
<MobileNav onOpen={onOpen} /> <MobileNav onOpen={onOpen} />
<Box ml={{ base: 0, md: 60 }} p="4" pt="24"> <Box ml={{ base: 0, md: '64' }} p="4" pt="24">
{children} {children}
</Box> </Box>
</Box> </Box>

View File

@ -101,10 +101,10 @@ export default function Auth() {
</FormControl> </FormControl>
<Button <Button
isLoading={signUpResult.fetching || loginResult.fetching} isLoading={signUpResult.fetching || loginResult.fetching}
loadingText="Submitting"
colorScheme="blue" colorScheme="blue"
size="lg" size="lg"
w="100%" w="100%"
d="block"
type="submit" type="submit"
> >
{isLogin ? 'Login' : 'Sign up'} {isLogin ? 'Login' : 'Sign up'}