code refactoring
This commit is contained in:
1361
frontend/pnpm-lock.yaml
generated
Normal file
1361
frontend/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -47,6 +47,5 @@ export const savedTemplatesState = selector<CustomTemplate[]>({
|
|||||||
either,
|
either,
|
||||||
getOrElse(() => new Array<CustomTemplate>())
|
getOrElse(() => new Array<CustomTemplate>())
|
||||||
)
|
)
|
||||||
},
|
}
|
||||||
dangerouslyAllowMutability: true
|
|
||||||
})
|
})
|
||||||
@@ -23,6 +23,7 @@ import Typography from '@mui/material/Typography'
|
|||||||
import { TransitionProps } from '@mui/material/transitions'
|
import { TransitionProps } from '@mui/material/transitions'
|
||||||
import {
|
import {
|
||||||
FC,
|
FC,
|
||||||
|
Suspense,
|
||||||
forwardRef,
|
forwardRef,
|
||||||
useMemo,
|
useMemo,
|
||||||
useRef,
|
useRef,
|
||||||
@@ -114,7 +115,7 @@ const DownloadDialog: FC<Props> = ({ open, onClose, onDownloadStart }) => {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
resetInput()
|
resetInput()
|
||||||
setDownloadFormats(undefined)
|
setDownloadFormats(undefined)
|
||||||
onDownloadStart(url)
|
onDownloadStart(immediate || url || workingUrl)
|
||||||
}, 250)
|
}, 250)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -306,7 +307,9 @@ const DownloadDialog: FC<Props> = ({ open, onClose, onDownloadStart }) => {
|
|||||||
</Grid>
|
</Grid>
|
||||||
}
|
}
|
||||||
</Grid>
|
</Grid>
|
||||||
|
<Suspense>
|
||||||
<ExtraDownloadOptions />
|
<ExtraDownloadOptions />
|
||||||
|
</Suspense>
|
||||||
<Grid container spacing={1} pt={2} justifyContent="space-between">
|
<Grid container spacing={1} pt={2} justifyContent="space-between">
|
||||||
<Grid item>
|
<Grid item>
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Autocomplete, Box, TextField, Typography } from '@mui/material'
|
import { Autocomplete, Box, TextField } from '@mui/material'
|
||||||
import { useRecoilState, useRecoilValue } from 'recoil'
|
import { useRecoilState, useRecoilValue } from 'recoil'
|
||||||
import { customArgsState, savedTemplatesState } from '../atoms/downloadTemplate'
|
import { customArgsState, savedTemplatesState } from '../atoms/downloadTemplate'
|
||||||
import { useI18n } from '../hooks/useI18n'
|
import { useI18n } from '../hooks/useI18n'
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package rpc
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/gorilla/websocket"
|
"github.com/gorilla/websocket"
|
||||||
@@ -29,6 +30,7 @@ func WebSocket(w http.ResponseWriter, r *http.Request) {
|
|||||||
mtype, reader, err := c.NextReader()
|
mtype, reader, err := c.NextReader()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
|
log.Println(err)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -37,6 +39,7 @@ func WebSocket(w http.ResponseWriter, r *http.Request) {
|
|||||||
writer, err := c.NextWriter(mtype)
|
writer, err := c.NextWriter(mtype)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
|
log.Println(err)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user