Skip to content

Commit 1a6ad74

Browse files
committed
UI fixes
1 parent 7699ac3 commit 1a6ad74

File tree

4 files changed

+38
-30
lines changed

4 files changed

+38
-30
lines changed

src/renderer/auth/provisions.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import DeprovisionDialog from './provision/deprovision'
3333
import {authTypeDescription} from './helper'
3434
import {breakWords, contentTop} from '../theme'
3535
import {openSnack, openSnackError} from '../snack'
36-
import {store as appStore} from '../store'
36+
import {store as appStore, loadStatus} from '../store'
3737

3838
type Props = {}
3939

@@ -69,6 +69,7 @@ export default (props: Props) => {
6969
const fido2Enabled = appStore.useState((s) => s.fido2Enabled)
7070

7171
React.useEffect(() => {
72+
loadStatus()
7273
refresh(selected)
7374
}, [])
7475

@@ -147,7 +148,7 @@ export default (props: Props) => {
147148
return (
148149
<Box display="flex" flexDirection="column" flex={1}>
149150
<Box display="flex" flexDirection="row" flex={1} style={{height: '100%', position: 'relative'}}>
150-
<Box display="flex" flexDirection="column" style={{width: 204}}>
151+
<Box display="flex" flexDirection="column" style={{width: 204, background: column2Color}}>
151152
<Box
152153
display="flex"
153154
flexDirection="row"
@@ -174,7 +175,6 @@ export default (props: Props) => {
174175
width: col1,
175176
overflowX: 'hidden',
176177
overflowY: 'auto',
177-
background: column2Color,
178178
}}
179179
>
180180
<Table size="small">

src/renderer/auth/unlock/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import AuthUnlockPasswordView from './password'
77
import AuthUnlockFIDO2View from './fido2'
88
import AuthForgotView from './forgot'
99

10-
import {store, unlocked} from '../../store'
10+
import {store, unlocked, loadStatus} from '../../store'
1111
import {authUnlock} from '../../rpc/keys'
1212
import {AuthType} from '../../rpc/keys.d'
1313
import {Action} from './actions'
@@ -19,6 +19,10 @@ export default (props: Props) => {
1919

2020
const fido2Enabled = store.useState((s) => s.fido2Enabled)
2121

22+
React.useEffect(() => {
23+
loadStatus()
24+
}, [])
25+
2226
let actions = [] as Action[]
2327

2428
switch (step) {

src/renderer/keys/grid.tsx

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -246,30 +246,38 @@ export default (_: {}) => {
246246
<Box
247247
display="flex"
248248
flexDirection="row"
249-
style={{paddingLeft: 8, paddingTop: 20, position: 'relative'}}
249+
style={{paddingLeft: 8, paddingTop: 20, marginTop: 8, position: 'relative'}}
250250
>
251-
<IconButton color="primary" onClick={() => setCreateOpen(true)} id="newKeyButton">
252-
<Tooltip title="Generate Key" placement="top">
253-
<AddIcon />
254-
</Tooltip>
255-
</IconButton>
256-
<IconButton onClick={openImport}>
257-
<Tooltip title="Import Key" placement="top">
258-
<ImportIcon />
259-
</Tooltip>
260-
</IconButton>
261-
<IconButton onClick={() => setSearchOpen(true)}>
262-
<Tooltip title="Search Keys" placement="top">
263-
<SearchIcon />
264-
</Tooltip>
265-
</IconButton>
266-
{syncEnabled && (
267-
<IconButton onClick={sync} disabled={syncing}>
268-
<Tooltip title="Sync Vault" placement="top">
269-
<SyncIcon />
251+
<Box style={{marginTop: 4}}>
252+
<IconButton
253+
size="small"
254+
color="primary"
255+
onClick={() => setCreateOpen(true)}
256+
id="newKeyButton"
257+
style={{marginRight: 12}}
258+
>
259+
<Tooltip title="Generate Key" placement="top">
260+
<AddIcon />
270261
</Tooltip>
271262
</IconButton>
272-
)}
263+
<IconButton size="small" onClick={openImport} style={{marginRight: 12}}>
264+
<Tooltip title="Import Key" placement="top">
265+
<ImportIcon />
266+
</Tooltip>
267+
</IconButton>
268+
<IconButton size="small" onClick={() => setSearchOpen(true)} style={{marginRight: 12}}>
269+
<Tooltip title="Search Keys" placement="top">
270+
<SearchIcon />
271+
</Tooltip>
272+
</IconButton>
273+
{syncEnabled && (
274+
<IconButton size="small" onClick={sync} disabled={syncing} style={{marginRight: 12}}>
275+
<Tooltip title="Sync Vault" placement="top">
276+
<SyncIcon />
277+
</Tooltip>
278+
</IconButton>
279+
)}
280+
</Box>
273281

274282
<Box display="flex" flexDirection="row" flexGrow={1} />
275283
<TextField
@@ -278,7 +286,7 @@ export default (_: {}) => {
278286
value={input}
279287
onChange={onInputChange}
280288
inputProps={{style: {paddingTop: 8, paddingBottom: 8}}}
281-
style={{marginTop: 8, marginBottom: 8, marginRight: 10, width: 300}}
289+
style={{marginBottom: 8, marginRight: 10, width: 300}}
282290
/>
283291

284292
<SearchDialog open={searchOpen} close={() => setSearchOpen(false)} reload={reload} />

src/renderer/root.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,6 @@ export default (_: {}) => {
7171
snackOpen: s.snackOpen,
7272
}))
7373

74-
React.useEffect(() => {
75-
loadStatus()
76-
}, [])
77-
7874
return (
7975
<ThemeProvider theme={theme}>
8076
<Box display="flex" flex={1} flexDirection="row" style={{height: '100%'}} onContextMenu={onContextMenu}>

0 commit comments

Comments
 (0)