Skip to content

Commit

Permalink
add missing component to sync ui
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto committed Jun 12, 2019
1 parent c90dbb4 commit 4a530d7
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 61 deletions.
45 changes: 24 additions & 21 deletions components/brave_sync/ui/components/disabledContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
TableGrid,
Paragraph,
SyncCard,
SyncCardContent,
DisabledContent
} from 'brave-ui/features/sync'

Expand Down Expand Up @@ -76,27 +77,29 @@ export default class SyncDisabledContent extends React.PureComponent<Props, Stat
: null
}
<SyncCard>
<TableGrid>
<SyncStartIcon />
<div>
<Title level={2}>{getLocale('syncTitle')}</Title>
<Paragraph>{getLocale('syncDescription')}</Paragraph>
<DisabledContentButtonGrid>
<Button
level='primary'
type='accent'
onClick={this.onClickNewSyncChainButton}
text={getLocale('startSyncChain')}
/>
<Button
level='secondary'
type='accent'
onClick={this.onClickEnterSyncChainCodeButton}
text={getLocale('enterSyncChainCode')}
/>
</DisabledContentButtonGrid>
</div>
</TableGrid>
<SyncCardContent>
<TableGrid>
<SyncStartIcon />
<div>
<Title level={2}>{getLocale('syncTitle')}</Title>
<Paragraph>{getLocale('syncDescription')}</Paragraph>
<DisabledContentButtonGrid>
<Button
level='primary'
type='accent'
onClick={this.onClickNewSyncChainButton}
text={getLocale('startSyncChain')}
/>
<Button
level='secondary'
type='accent'
onClick={this.onClickEnterSyncChainCodeButton}
text={getLocale('enterSyncChainCode')}
/>
</DisabledContentButtonGrid>
</div>
</TableGrid>
</SyncCardContent>
</SyncCard>
</Main>
</DisabledContent>
Expand Down
83 changes: 43 additions & 40 deletions components/brave_sync/ui/components/enabledContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
TableGrid,
TableButtonGrid,
EnabledContent,
SyncCardContent,
SyncCard
} from 'brave-ui/features/sync'

Expand Down Expand Up @@ -257,46 +258,48 @@ export default class SyncEnabledContent extends React.PureComponent<Props, State
: null
}
<SyncCard>
<Title level={2}>{getLocale('braveSync')}</Title>
<Paragraph>{getLocale('syncChainDevices')}</Paragraph>
<SectionBlock>
<TableGrid isDeviceTable={true}>
<Table header={this.devicesHeader} rows={this.getDevicesRows(syncData.devices)}>
Device list is empty
</Table>
<TableButtonGrid>
<br />
<Button
level='secondary'
type='accent'
size='medium'
text={getLocale('viewSyncCode')}
onClick={this.onClickViewSyncCodeButton}
/>
<Button
level='primary'
type='accent'
size='medium'
text={getLocale('addDevice')}
onClick={this.onClickAddDeviceButton}
/>
</TableButtonGrid>
</TableGrid>
</SectionBlock>
<Title level={2}>{getLocale('settingsTitle')}</Title>
<Paragraph>{getLocale('settingsDescription')}</Paragraph>
<SectionBlock>
<Table header={this.settingsHeader} rows={this.settingsRows} />
</SectionBlock>
<SectionBlock>
<Button
level='primary'
type='accent'
size='medium'
text={getLocale('leaveSyncChain')}
onClick={this.onClickResetSyncButton}
/>
</SectionBlock>
<SyncCardContent>
<Title level={2}>{getLocale('braveSync')}</Title>
<Paragraph>{getLocale('syncChainDevices')}</Paragraph>
<SectionBlock>
<TableGrid isDeviceTable={true}>
<Table header={this.devicesHeader} rows={this.getDevicesRows(syncData.devices)}>
Device list is empty
</Table>
<TableButtonGrid>
<br />
<Button
level='secondary'
type='accent'
size='medium'
text={getLocale('viewSyncCode')}
onClick={this.onClickViewSyncCodeButton}
/>
<Button
level='primary'
type='accent'
size='medium'
text={getLocale('addDevice')}
onClick={this.onClickAddDeviceButton}
/>
</TableButtonGrid>
</TableGrid>
</SectionBlock>
<Title level={2}>{getLocale('settingsTitle')}</Title>
<Paragraph>{getLocale('settingsDescription')}</Paragraph>
<SectionBlock>
<Table header={this.settingsHeader} rows={this.settingsRows} />
</SectionBlock>
<SectionBlock>
<Button
level='primary'
type='accent'
size='medium'
text={getLocale('leaveSyncChain')}
onClick={this.onClickResetSyncButton}
/>
</SectionBlock>
</SyncCardContent>
</SyncCard>
</Main>
</EnabledContent>
Expand Down

0 comments on commit 4a530d7

Please sign in to comment.