Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"@tauri-apps/cli": "^2.0.3",
"@types/react": "^18.3.11",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.2",
"@vitejs/plugin-react": "^4.3.3",
"eslint": "^8.57.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.31.0",
Expand Down
70 changes: 35 additions & 35 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/components/LoadingBar/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import CircularProgress from '@mui/material/CircularProgress';
import LinearProgress from '@mui/material/LinearProgress';

const LoadingBar = ({ marginTop }) => (
<div style={{
Expand All @@ -8,7 +8,7 @@ const LoadingBar = ({ marginTop }) => (
marginTop,
}}
>
<CircularProgress variant="indeterminate" disableShrink />
<LinearProgress variant="indeterminate" />
</div>
);

Expand Down
26 changes: 12 additions & 14 deletions src/routes/Home/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import Snackbar from '@mui/material/Snackbar';
import AddIcon from '@mui/icons-material/Add';
import RemoveIcon from '@mui/icons-material/Remove';
import IconButton from '@mui/material/IconButton';
import LoadingBar from '../../components/LoadingBar';
import LinearProgress from '@mui/material/LinearProgress';
import {
cancelScan,
scanAddresses,
Expand Down Expand Up @@ -120,8 +120,6 @@ const Home = () => {
cancelScan()
.catch((err) => {
d1(setError(err));
})
.finally(() => {
d1(setIsCancelling(false));
});
} else {
Expand All @@ -145,6 +143,7 @@ const Home = () => {
})
.finally(() => {
d1(setIsScanning(false));
d1(setIsCancelling(false));
});
}
};
Expand Down Expand Up @@ -411,16 +410,15 @@ const Home = () => {
</Grid>
</CardContent>
</Card>
{isScanning ? <LoadingBar marginTop={10} /> : (
<Paper sx={{ height: '50vh', width: '100%', mt: 2 }}>
<DataGrid
rows={scanResultRows}
columns={columns}
pageSizeOptions={[5, 10, 25, 50, 100]}
disableSelectionOnClick
/>
</Paper>
)}
<Paper sx={{ height: '50vh', width: '100%', mt: 2 }}>
<DataGrid
rows={scanResultRows}
columns={columns}
pageSizeOptions={[5, 10, 25, 50, 100]}
disableSelectionOnClick
/>
</Paper>
{isScanning ? <LinearProgress variant="indeterminate" /> : null}
<Button
variant="contained"
color="primary"
Expand All @@ -434,7 +432,7 @@ const Home = () => {
variant="contained"
color="primary"
sx={{ mt: 2, float: 'right' }}
disabled={addresses[0].length === 0 || isCancelling}
disabled={addresses[0].length === 0 || (isCancelling && isScanning)}
onClick={startStopScan}
>
{isScanning ? language.cancel : language.scan}
Expand Down
Loading