Skip to content

Commit

Permalink
UI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel committed Oct 8, 2020
1 parent 7699ac3 commit 1a6ad74
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 30 deletions.
6 changes: 3 additions & 3 deletions src/renderer/auth/provisions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import DeprovisionDialog from './provision/deprovision'
import {authTypeDescription} from './helper'
import {breakWords, contentTop} from '../theme'
import {openSnack, openSnackError} from '../snack'
import {store as appStore} from '../store'
import {store as appStore, loadStatus} from '../store'

type Props = {}

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

React.useEffect(() => {
loadStatus()
refresh(selected)
}, [])

Expand Down Expand Up @@ -147,7 +148,7 @@ export default (props: Props) => {
return (
<Box display="flex" flexDirection="column" flex={1}>
<Box display="flex" flexDirection="row" flex={1} style={{height: '100%', position: 'relative'}}>
<Box display="flex" flexDirection="column" style={{width: 204}}>
<Box display="flex" flexDirection="column" style={{width: 204, background: column2Color}}>
<Box
display="flex"
flexDirection="row"
Expand All @@ -174,7 +175,6 @@ export default (props: Props) => {
width: col1,
overflowX: 'hidden',
overflowY: 'auto',
background: column2Color,
}}
>
<Table size="small">
Expand Down
6 changes: 5 additions & 1 deletion src/renderer/auth/unlock/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import AuthUnlockPasswordView from './password'
import AuthUnlockFIDO2View from './fido2'
import AuthForgotView from './forgot'

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

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

React.useEffect(() => {
loadStatus()
}, [])

let actions = [] as Action[]

switch (step) {
Expand Down
52 changes: 30 additions & 22 deletions src/renderer/keys/grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -246,30 +246,38 @@ export default (_: {}) => {
<Box
display="flex"
flexDirection="row"
style={{paddingLeft: 8, paddingTop: 20, position: 'relative'}}
style={{paddingLeft: 8, paddingTop: 20, marginTop: 8, position: 'relative'}}
>
<IconButton color="primary" onClick={() => setCreateOpen(true)} id="newKeyButton">
<Tooltip title="Generate Key" placement="top">
<AddIcon />
</Tooltip>
</IconButton>
<IconButton onClick={openImport}>
<Tooltip title="Import Key" placement="top">
<ImportIcon />
</Tooltip>
</IconButton>
<IconButton onClick={() => setSearchOpen(true)}>
<Tooltip title="Search Keys" placement="top">
<SearchIcon />
</Tooltip>
</IconButton>
{syncEnabled && (
<IconButton onClick={sync} disabled={syncing}>
<Tooltip title="Sync Vault" placement="top">
<SyncIcon />
<Box style={{marginTop: 4}}>
<IconButton
size="small"
color="primary"
onClick={() => setCreateOpen(true)}
id="newKeyButton"
style={{marginRight: 12}}
>
<Tooltip title="Generate Key" placement="top">
<AddIcon />
</Tooltip>
</IconButton>
)}
<IconButton size="small" onClick={openImport} style={{marginRight: 12}}>
<Tooltip title="Import Key" placement="top">
<ImportIcon />
</Tooltip>
</IconButton>
<IconButton size="small" onClick={() => setSearchOpen(true)} style={{marginRight: 12}}>
<Tooltip title="Search Keys" placement="top">
<SearchIcon />
</Tooltip>
</IconButton>
{syncEnabled && (
<IconButton size="small" onClick={sync} disabled={syncing} style={{marginRight: 12}}>
<Tooltip title="Sync Vault" placement="top">
<SyncIcon />
</Tooltip>
</IconButton>
)}
</Box>

<Box display="flex" flexDirection="row" flexGrow={1} />
<TextField
Expand All @@ -278,7 +286,7 @@ export default (_: {}) => {
value={input}
onChange={onInputChange}
inputProps={{style: {paddingTop: 8, paddingBottom: 8}}}
style={{marginTop: 8, marginBottom: 8, marginRight: 10, width: 300}}
style={{marginBottom: 8, marginRight: 10, width: 300}}
/>

<SearchDialog open={searchOpen} close={() => setSearchOpen(false)} reload={reload} />
Expand Down
4 changes: 0 additions & 4 deletions src/renderer/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ export default (_: {}) => {
snackOpen: s.snackOpen,
}))

React.useEffect(() => {
loadStatus()
}, [])

return (
<ThemeProvider theme={theme}>
<Box display="flex" flex={1} flexDirection="row" style={{height: '100%'}} onContextMenu={onContextMenu}>
Expand Down

0 comments on commit 1a6ad74

Please sign in to comment.