2022-12-16 12:03:31 +01:00
|
|
|
import { ActionIcon, Tooltip, Drawer, Stack, Divider, Button } from '@mantine/core';
|
2022-08-27 15:58:36 +02:00
|
|
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
|
|
|
import { debugAlert } from './debug/alert';
|
|
|
|
|
import { debugContext } from './debug/context';
|
|
|
|
|
import { debugInput } from './debug/input';
|
|
|
|
|
import { debugMenu } from './debug/menu';
|
2023-01-01 14:31:11 +01:00
|
|
|
import { debugCustomNotification } from './debug/notification';
|
2022-08-27 15:58:36 +02:00
|
|
|
import { debugCircleProgressbar, debugProgressbar } from './debug/progress';
|
|
|
|
|
import { debugTextUI } from './debug/textui';
|
2022-10-27 09:27:54 +02:00
|
|
|
import { debugSkillCheck } from './debug/skillcheck';
|
2022-12-16 12:03:31 +01:00
|
|
|
import { useState } from 'react';
|
2022-08-27 15:40:41 +02:00
|
|
|
|
|
|
|
|
const Dev: React.FC = () => {
|
2022-12-16 12:03:31 +01:00
|
|
|
const [opened, setOpened] = useState(false);
|
2022-08-27 15:40:41 +02:00
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<>
|
2022-12-16 12:03:31 +01:00
|
|
|
<Tooltip label="Developer drawer" position="bottom">
|
|
|
|
|
<ActionIcon
|
|
|
|
|
onClick={() => setOpened(true)}
|
|
|
|
|
radius="xl"
|
|
|
|
|
variant="filled"
|
|
|
|
|
color="orange"
|
|
|
|
|
sx={{ position: 'absolute', bottom: 0, right: 0, width: 50, height: 50 }}
|
|
|
|
|
size="xl"
|
|
|
|
|
mr={50}
|
|
|
|
|
mb={50}
|
|
|
|
|
>
|
|
|
|
|
<FontAwesomeIcon icon="wrench" fontSize={24} />
|
|
|
|
|
</ActionIcon>
|
2022-08-27 15:40:41 +02:00
|
|
|
</Tooltip>
|
2022-12-16 12:03:31 +01:00
|
|
|
|
|
|
|
|
<Drawer position="left" onClose={() => setOpened(false)} opened={opened} title="Developer drawer" padding="xl">
|
|
|
|
|
<Stack>
|
|
|
|
|
<Divider />
|
|
|
|
|
<Button fullWidth onClick={() => debugInput()}>
|
|
|
|
|
Open input dialog
|
|
|
|
|
</Button>
|
|
|
|
|
<Button fullWidth onClick={() => debugAlert()}>
|
|
|
|
|
Open alert dialog
|
|
|
|
|
</Button>
|
|
|
|
|
<Divider />
|
|
|
|
|
<Button fullWidth onClick={() => debugContext()}>
|
|
|
|
|
Open context menu
|
|
|
|
|
</Button>
|
|
|
|
|
<Button fullWidth onClick={() => debugMenu()}>
|
|
|
|
|
Open list menu
|
|
|
|
|
</Button>
|
|
|
|
|
<Divider />
|
|
|
|
|
<Button fullWidth onClick={() => debugCustomNotification()}>
|
2023-01-01 14:31:11 +01:00
|
|
|
Send notification
|
2022-12-16 12:03:31 +01:00
|
|
|
</Button>
|
|
|
|
|
<Divider />
|
|
|
|
|
<Button fullWidth onClick={() => debugProgressbar()}>
|
|
|
|
|
Activate progress bar
|
|
|
|
|
</Button>
|
|
|
|
|
<Button fullWidth onClick={() => debugCircleProgressbar()}>
|
|
|
|
|
Activate progress circle
|
|
|
|
|
</Button>
|
|
|
|
|
<Divider />
|
|
|
|
|
<Button fullWidth onClick={() => debugTextUI()}>
|
|
|
|
|
Show TextUI
|
|
|
|
|
</Button>
|
|
|
|
|
<Divider />
|
|
|
|
|
<Button fullWidth onClick={() => debugSkillCheck()}>
|
|
|
|
|
Run skill check
|
|
|
|
|
</Button>
|
|
|
|
|
</Stack>
|
2022-08-27 15:40:41 +02:00
|
|
|
</Drawer>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default Dev;
|