Download REST API endpoints (#72)

* backend and frontend hotfixes, see message

Improved rendering on the frontend by cutting unecessary useStates.
Backend side, downloads now auto resume even on application kill.

* download rest api endpoints, general code refactor

* download request json mappings
This commit is contained in:
Marco
2023-07-31 08:30:09 +02:00
committed by GitHub
parent 68c829c40e
commit 8327d1e94c
22 changed files with 560 additions and 300 deletions

View File

@@ -0,0 +1,16 @@
import { useDispatch } from "react-redux"
import { setMessage } from "../features/ui/toastSlice"
import { AlertColor } from "@mui/material"
export const useToast = () => {
const dispatch = useDispatch()
return {
pushMessage: (message: string, severity?: AlertColor) => {
dispatch(setMessage({
message: message,
severity: severity
}))
}
}
}