-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Description --- Added a mode switch to the sidebar - this needs to be hooked up to the backend Added a basic settings dialog with 2 demo fields Added an error notification to the bottom - this currently just shows any error caught, so we'd need to refine it a bit Improvements to sidebar Visual mode switch connected Added a basic dialog for the scheduler General ui improvements Motivation and Context --- UI updates How Has This Been Tested? --- Manually What process can a PR reviewer use to test or verify this change? --- <!-- Checklist --> <!-- 1. Is the title of your PR in the form that would make nice release notes? The title, excluding the conventional commit tag, will be included exactly as is in the CHANGELOG, so please think about it carefully. --> Breaking Changes --- x - [x] None - [ ] Requires data directory on base node to be deleted - [ ] Requires hard fork - [ ] Other - Please specify <!-- Does this include a breaking change? If so, include this line as a footer --> <!-- BREAKING CHANGE: Description what the user should do, e.g. delete a database, resync the chain -->
- Loading branch information
Showing
32 changed files
with
620 additions
and
414 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { styled } from '@mui/material/styles'; | ||
import { Box } from '@mui/material'; | ||
|
||
export const AppContainer = styled(Box)( | ||
({ theme, status }: { theme: any; status: any }) => ({ | ||
backgroundColor: theme.palette.background.default, | ||
backgroundSize: 'cover', | ||
backgroundImage: `url(${status})`, | ||
backgroundPosition: 'center', | ||
}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/containers/Dashboard/MiningView/components/TopStatus.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { useEffect } from 'react'; | ||
import { Typography } from '@mui/material'; | ||
import useAppStateStore from '../../../../store/appStateStore'; | ||
|
||
function TopStatus() { | ||
const { topStatus, setTopStatus, appState } = useAppStateStore((state) => ({ | ||
topStatus: state.topStatus, | ||
setTopStatus: state.setTopStatus, | ||
appState: state.appState, | ||
})); | ||
|
||
useEffect(() => { | ||
if (appState?.cpu?.is_mining) { | ||
setTopStatus('Mining'); | ||
} else { | ||
setTopStatus('Not mining'); | ||
} | ||
}, [appState?.cpu?.is_mining]); | ||
|
||
return ( | ||
<Typography variant="h5" textTransform="uppercase"> | ||
{topStatus} | ||
</Typography> | ||
); | ||
} | ||
|
||
export default TopStatus; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { Box, Alert, IconButton, Snackbar } from '@mui/material'; | ||
import { IoClose } from 'react-icons/io5'; | ||
import useAppStateStore from '../../store/appStateStore'; | ||
|
||
function ErrorSnackbar() { | ||
const { error, setError } = useAppStateStore((state) => ({ | ||
error: state.error, | ||
setError: state.setError, | ||
})); | ||
|
||
const handleClose = ( | ||
_event: React.SyntheticEvent | Event, | ||
reason?: string | ||
) => { | ||
if (reason === 'clickaway') { | ||
return; | ||
} | ||
|
||
setError(''); | ||
}; | ||
|
||
return ( | ||
<Snackbar | ||
open={error !== ''} | ||
autoHideDuration={20000} | ||
onClose={handleClose} | ||
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }} | ||
> | ||
<Alert | ||
onClose={handleClose} | ||
severity="error" | ||
variant="filled" | ||
sx={{ | ||
width: '100%', | ||
}} | ||
action={ | ||
<IconButton | ||
aria-label="close" | ||
color="inherit" | ||
size="small" | ||
onClick={handleClose} | ||
> | ||
<IoClose fontSize="inherit" style={{ color: 'white' }} /> | ||
</IconButton> | ||
} | ||
> | ||
<Box | ||
style={{ | ||
minWidth: '238px', | ||
}} | ||
> | ||
{error} | ||
</Box> | ||
</Alert> | ||
</Snackbar> | ||
); | ||
} | ||
|
||
export default ErrorSnackbar; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.