Skip to content

Commit b8f79fd

Browse files
committed
feat: enable settings and backup warning
1 parent 8c9447c commit b8f79fd

File tree

4 files changed

+20
-14
lines changed

4 files changed

+20
-14
lines changed

src/dashboard/Dashboard.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ import { Path } from "../router/Path";
2828
import Console from "./console/Console";
2929
import MenuItem, { MenuItemProps } from "./menu/MenuItem";
3030
import Overview from "./overview/Overview";
31-
// import SetupWarning from "./SetupWarning";
31+
import SetupWarning from "./SetupWarning";
3232
import Trade from "./trade/Trade";
3333
import Tradehistory from "./tradehistory/Tradehistory";
3434
import Wallets from "./wallet/Wallets";
35-
/* import SettingsIcon from "@material-ui/icons/Settings";
36-
import Settings from "../settings/Settings"; */
35+
import SettingsIcon from "@material-ui/icons/Settings";
36+
import Settings from "../settings/Settings";
3737

3838
export const drawerWidth = 200;
3939

@@ -187,14 +187,14 @@ const Dashboard = (): ReactElement => {
187187
</List>
188188
</Grid>
189189
<Grid container item direction="column" justify="flex-end">
190-
{/* <Grid item container>
190+
<Grid item container>
191191
<MenuItem
192192
path={Path.SETTINGS}
193193
text={"Settings"}
194194
component={Settings}
195195
icon={SettingsIcon}
196196
/>
197-
</Grid> */}
197+
</Grid>
198198
{isElectron() && (
199199
<Grid item container justify="center">
200200
<Tooltip title="Disconnect from opendex-docker" placement="top">
@@ -213,18 +213,18 @@ const Dashboard = (): ReactElement => {
213213
</Grid>
214214
</Drawer>
215215
<main className={classes.content}>
216-
{/* <Grid item container>
216+
<Grid item container>
217217
{<SetupWarning />}
218-
</Grid> */}
218+
</Grid>
219219
<Switch>
220220
{menuItems.map((item) => (
221221
<Route exact path={`${path}${item.path}`} key={item.text}>
222222
{item.component}
223223
</Route>
224224
))}
225-
{/* <Route path={`${path}${Path.SETTINGS}`}>
225+
<Route path={`${path}${Path.SETTINGS}`}>
226226
<Settings />
227-
</Route> */}
227+
</Route>
228228
<Route exact path={path}>
229229
<Redirect to={`${path}${Path.OVERVIEW}`} />
230230
</Route>

src/dashboard/SetupWarning.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ const SetupWarning = inject(BACKUP_STORE)(
9090
color="inherit"
9191
variant="outlined"
9292
onClick={() =>
93-
history.push(`${Path.SETTINGS}${Path.INITIAL_SETUP}`)
93+
history.push(
94+
`${Path.DASHBOARD}${Path.SETTINGS}${Path.INITIAL_SETUP}`
95+
)
9496
}
9597
>
9698
Setup Now

src/settings/BackupDirectory.tsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ type BackupDirectoryProps = {
3131

3232
const useStyles = makeStyles(() =>
3333
createStyles({
34-
input: {
35-
minWidth: 270,
34+
inputContainer: {
35+
width: "100%",
36+
maxWidth: 500,
3637
},
3738
messageContainer: {
3839
minHeight: 50,
@@ -130,9 +131,11 @@ const BackupDirectory = inject(
130131
</Grid>
131132
)
132133
) : (
133-
<FormControl variant="outlined">
134+
<FormControl
135+
variant="outlined"
136+
className={classes.inputContainer}
137+
>
134138
<OutlinedInput
135-
className={classes.input}
136139
id="backup-input"
137140
value={backupDirectory || ""}
138141
placeholder="/home/user/opendex-backup"

src/settings/MnemonicPhrase.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ const MnemonicPhrase = inject(BACKUP_STORE)(
8585
setChecked((previousChecked) => !previousChecked)
8686
}
8787
name="checked"
88+
color="default"
8889
/>
8990
}
9091
label="I understand that I will not be able to recover my funds if I lose this data"

0 commit comments

Comments
 (0)