Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Revert "Merge pull request #308 from brave/sync_img"
Browse files Browse the repository at this point in the history
This reverts commit 2c16ae2.
  • Loading branch information
cezaraugusto committed Dec 11, 2018
1 parent c4694e2 commit c5e16c7
Show file tree
Hide file tree
Showing 21 changed files with 79 additions and 99 deletions.
46 changes: 0 additions & 46 deletions src/features/sync/images/index.ts

This file was deleted.

4 changes: 4 additions & 0 deletions src/features/sync/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ export {
} from './grid'
export {
ModalHeader,
ModalIcon,
ModalTitle,
ModalSubTitle,
ModalContent,
TwoColumnButtonGrid,
OneColumnButtonGrid,
DeviceGrid,
DeviceContainer,
DeviceImage,
ViewSyncCodeGrid,
QRCode,
ScanGrid,
MobileHandImage,
QRCodeContainer,
ThreeColumnButtonGrid,
ThreeColumnButtonGridCol1,
Expand Down
21 changes: 21 additions & 0 deletions src/features/sync/modal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ export const ModalHeader = styled<{}, 'header'>('header')`
margin-bottom: 20px;
`

export const ModalIcon = styled<{}, 'img'>('img')`
margin-top: 3px;
height: 60px;
`

export const ModalTitle = styled(Heading)`
font-weight: 500;
font-size: 26px;
Expand Down Expand Up @@ -83,6 +88,11 @@ export const DeviceContainer = styled<{}, 'div'>('div')`
align-items: center;
`

export const DeviceImage = styled<{}, 'img'>('img')`
margin-bottom: 20px;
height: 100px;
`

export const ScanGrid = styled<{}, 'div'>('div')`
display: grid;
height: 100%;
Expand All @@ -92,6 +102,11 @@ export const ScanGrid = styled<{}, 'div'>('div')`
max-width: 550px;
`

export const MobileHandImage = styled<{}, 'img'>('img')`
max-width: 100%;
display: block;
`

export const QRCodeContainer = styled<{}, 'div'>('div')`
display: flex;
flex-direction: column;
Expand All @@ -110,3 +125,9 @@ export const ViewSyncCodeGrid = styled<{}, 'div'>('div')`
grid-gap: 20px;
margin: 0 0 25px;
`

export const QRCode = styled<{}, 'img'>('img')`
max-width: 100%;
display: block;
width: 140px;
`
Binary file added stories/assets/img/sync/qrCode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 2 additions & 3 deletions stories/features/sync/disabledContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ import {
import DeviceType from './modals/deviceType'
import EnterSyncCode from './modals/enterSyncCode'

// Images
import { SyncStartIcon } from '../../../src/features/sync/images'
const syncStart = require('../../assets/img/sync/sync_start.svg')

// Utils
import { getLocale } from './page/fakeLocale'
Expand Down Expand Up @@ -69,7 +68,7 @@ export default class SyncDisabledContent extends React.PureComponent<{}, State>
: null
}
<TableGrid>
<SyncStartIcon />
<img src={syncStart} />
<div>
<Title level={2}>{getLocale('syncTitle')}</Title>
<Paragraph>{getLocale('syncDescription')}</Paragraph>
Expand Down
10 changes: 5 additions & 5 deletions stories/features/sync/modals/addNewChainCameraOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ import Modal from '../../../../src/components/popupModals/modal'
import TextAreaClipboard from '../../../../src/components/formControls/textareaClipboard'

// Feature-specific components
import { ModalHeader, ModalTitle, ModalSubTitle, ModalContent, ThreeColumnButtonGrid, ThreeColumnButtonGridCol2, ThreeColumnButtonGridCol1 } from '../../../../src/features/sync'

// Images
import { SyncAddIcon } from '../../../../src/features/sync/images'
import { ModalHeader, ModalTitle, ModalIcon, ModalSubTitle, ModalContent, ThreeColumnButtonGrid, ThreeColumnButtonGridCol2, ThreeColumnButtonGridCol1 } from '../../../../src/features/sync'

// Modals
import ScanCode from './scanCode'
Expand All @@ -22,6 +19,9 @@ import ScanCode from './scanCode'
import { getLocale } from '../page/fakeLocale'
import data from '../page/fakeData'

// Images
import syncAddIcon from '../../../assets/img/sync/sync_add_icon.svg'

interface Props {
fromMobileScreen?: boolean
onClose: () => void
Expand Down Expand Up @@ -54,7 +54,7 @@ export default class AddNewChainCameraOptionModal extends React.PureComponent<Pr
: null
}
<ModalHeader>
<SyncAddIcon />
<ModalIcon src={syncAddIcon} />
<div>
<ModalTitle level={1}>
{
Expand Down
9 changes: 5 additions & 4 deletions stories/features/sync/modals/addNewChainNoCamera.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,21 @@ import TextAreaClipboard from '../../../../src/components/formControls/textareaC
// Feature-specific components
import {
ModalHeader,
ModalIcon,
ModalTitle,
ModalSubTitle,
ModalContent,
TwoColumnButtonGrid,
OneColumnButtonGrid
} from '../../../../src/features/sync'

// Images
import { SyncAddIcon } from '../../../../src/features/sync/images'

// Utils
import { getLocale } from '../page/fakeLocale'
import data from '../page/fakeData'

// Images
import syncAddIcon from '../../../assets/img/sync/sync_add_icon.svg'

interface Props {
onClose: () => void
}
Expand All @@ -36,7 +37,7 @@ export default class AddNewChainNoCameraModal extends React.PureComponent<Props,
return (
<Modal id='addNewChainNoCameraModal' onClose={onClose} size='small'>
<ModalHeader>
<SyncAddIcon />
<ModalIcon src={syncAddIcon} />
<div>
<ModalTitle level={1}>{getLocale('enterThisCode')}</ModalTitle>
<ModalSubTitle>{getLocale('syncChainCodeHowTo')}</ModalSubTitle>
Expand Down
16 changes: 10 additions & 6 deletions stories/features/sync/modals/deviceType.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,26 @@ import Modal from '../../../../src/components/popupModals/modal'
// Feature-specific components
import {
ModalHeader,
ModalIcon,
ModalTitle,
DeviceGrid,
DeviceContainer,
DeviceImage,
ModalSubTitle
} from '../../../../src/features/sync'

// Images
import { SyncAddIcon, SyncMobileIcon, SyncDesktopIcon } from '../../../../src/features/sync/images'

// Modals
import AddNewChainNoCamera from './addNewChainNoCamera'
import ScanCode from './scanCode'

// Utils
import { getLocale } from '../page/fakeLocale'

// Images
import syncMobileImg from '../../../assets/img/sync/sync_mobile.svg'
import syncDesktopImg from '../../../assets/img/sync/sync_desktop.svg'
import syncAddIcon from '../../../assets/img/sync/sync_add_icon.svg'

interface Props {
mainDeviceName: string
onClose: () => void
Expand Down Expand Up @@ -70,15 +74,15 @@ export default class DeviceTypeModal extends React.PureComponent<Props, State> {
: null
}
<ModalHeader>
<SyncAddIcon />
<ModalIcon src={syncAddIcon} />
<div>
<ModalTitle level={1}>{getLocale('letsSync')}<br />{mainDeviceName}”.</ModalTitle>
<ModalSubTitle>{getLocale('chooseDeviceType')}</ModalSubTitle>
</div>
</ModalHeader>
<DeviceGrid>
<DeviceContainer>
<SyncMobileIcon />
<DeviceImage src={syncMobileImg} />
<Button
level='primary'
type='accent'
Expand All @@ -88,7 +92,7 @@ export default class DeviceTypeModal extends React.PureComponent<Props, State> {
/>
</DeviceContainer>
<DeviceContainer>
<SyncDesktopIcon />
<DeviceImage src={syncDesktopImg} />
<Button
level='primary'
type='accent'
Expand Down
5 changes: 3 additions & 2 deletions stories/features/sync/modals/enterSyncCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import TextAreaClipboard from '../../../../src/components/formControls/textareaC
// Feature-specific components
import {
ModalHeader,
ModalIcon,
ModalTitle,
ModalSubTitle,
ModalContent,
Expand All @@ -26,7 +27,7 @@ import {
import { getLocale } from '../page/fakeLocale'

// Images
import { SyncDefaultIcon } from '../../../../src/features/sync/images'
import syncIcon from '../../../assets/img/sync/sync_icon.svg'

interface Props {
onClose: () => void
Expand Down Expand Up @@ -74,7 +75,7 @@ export default class EnterSyncCodeModal extends React.PureComponent<Props, State
: null
}
<ModalHeader>
<SyncDefaultIcon />
<ModalIcon src={syncIcon} />
<div>
<ModalTitle level={1}>{getLocale('enterSyncCode')}</ModalTitle>
<ModalSubTitle>{getLocale('enterSyncCodeDescription')}</ModalSubTitle>
Expand Down
6 changes: 3 additions & 3 deletions stories/features/sync/modals/removeMainDevice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import Modal from '../../../../src/components/popupModals/modal'
import {
Paragraph,
ModalHeader,
// ModalIcon,
ModalIcon,
ModalTitle,
ModalContent,
TwoColumnButtonGrid,
Expand All @@ -23,7 +23,7 @@ import {
import { getLocale } from '../page/fakeLocale'

// Images
import { SyncRemoveIcon } from '../../../../src/features/sync/images'
import syncRemoveIcon from '../../../assets/img/sync/sync_remove_icon.svg'

interface Props {
mainDeviceName: string
Expand All @@ -36,7 +36,7 @@ export default class RemoveMainDeviceModal extends React.PureComponent<Props, {}
return (
<Modal id='removeMainDeviceModal' onClose={onClose} size='small'>
<ModalHeader>
<SyncRemoveIcon />
<ModalIcon src={syncRemoveIcon} />
<ModalTitle level={1}>{getLocale('remove')}{mainDeviceName}{getLocale('thisSyncChain')}?</ModalTitle>
</ModalHeader>
<ModalContent>
Expand Down
9 changes: 5 additions & 4 deletions stories/features/sync/modals/removeOtherDevice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ import Modal from '../../../../src/components/popupModals/modal'
import {
Paragraph,
ModalHeader,
ModalIcon,
ModalTitle,
ModalContent,
TwoColumnButtonGrid,
OneColumnButtonGrid
} from '../../../../src/features/sync'

// Images
import { SyncRemoveIcon } from '../../../../src/features/sync/images'

// Utils
import { getLocale } from '../page/fakeLocale'

// Images
import syncRemoveIcon from '../../../assets/img/sync/sync_remove_icon.svg'

interface Props {
otherDeviceName: string
onClose: () => void
Expand All @@ -35,7 +36,7 @@ export default class RemoveMainDeviceModal extends React.PureComponent<Props, {}
return (
<Modal id='removeMainDeviceModal' onClose={onClose} size='small'>
<ModalHeader>
<SyncRemoveIcon />
<ModalIcon src={syncRemoveIcon} />
<ModalTitle level={1}>{getLocale('remove')}{otherDeviceName}{getLocale('thisSyncChain')}</ModalTitle>
</ModalHeader>
<ModalContent>
Expand Down
9 changes: 5 additions & 4 deletions stories/features/sync/modals/resetSync.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import AlertBox from '../../../../src/components/popupModals/alertBox'
// Feature-specific components
import {
ModalHeader,
ModalIcon,
ModalTitle,
ModalSubTitle,
ModalContent,
Expand All @@ -21,12 +22,12 @@ import {
Paragraph
} from '../../../../src/features/sync'

// Images
import { SyncRemoveIcon } from '../../../../src/features/sync/images'

// Utils
import { getLocale } from '../page/fakeLocale'

// Images
import syncRemoveIcon from '../../../assets/img/sync/sync_remove_icon.svg'

interface Props {
mainDeviceName: string
onClose: () => void
Expand Down Expand Up @@ -70,7 +71,7 @@ export default class ResetSyncModal extends React.PureComponent<Props, State> {
: null
}
<ModalHeader>
<SyncRemoveIcon />
<ModalIcon src={syncRemoveIcon} />
<div>
<ModalSubTitle highlight={true}>{getLocale('warning')}</ModalSubTitle>
<ModalTitle level={1}>{getLocale('removing')}{mainDeviceName}{getLocale('deleteSyncChain')}</ModalTitle>
Expand Down
Loading

0 comments on commit c5e16c7

Please sign in to comment.