Add task creation form.

This commit is contained in:
Drew 2025-09-22 21:39:51 -07:00
parent a683a071d1
commit f6e96f7f61
6 changed files with 286 additions and 16 deletions

View file

@ -13,8 +13,8 @@ import {
Toolbar,
Typography,
useTheme,
Fab,
LinearProgress,
Button,
} from '@mui/material'
import {
Menu as MenuIcon,
@ -22,6 +22,7 @@ import {
Add as AddIcon,
Settings as SettingsIcon,
} from '@mui/icons-material'
import { Link } from 'react-router'
const drawerWidth = 240
@ -137,6 +138,28 @@ export default function Layout({ children, loading = false }: LayoutProps) {
>
Captain's Log
</Typography>
<Button
component={Link}
to="/task/new"
variant="contained"
startIcon={<AddIcon />}
sx={{
backgroundColor: theme.palette.secondary.main,
color: theme.palette.secondary.contrastText,
'&:hover': {
backgroundColor: theme.palette.secondary.dark || '#b7791f',
},
fontWeight: 600,
fontSize: '1rem',
px: 2,
py: 1.5,
minWidth: 'auto',
height: '44px',
}}
>
New Task
</Button>
</Toolbar>
</AppBar>
@ -198,19 +221,6 @@ export default function Layout({ children, loading = false }: LayoutProps) {
{children}
</Box>
{/* Quick capture FAB */}
<Fab
color="primary"
aria-label="add task"
sx={{
position: 'fixed',
bottom: 16,
right: 16,
zIndex: theme.zIndex.fab,
}}
>
<AddIcon />
</Fab>
</Box>
)
}