Skip to content

Commit

Permalink
fixed image thumbnails
Browse files Browse the repository at this point in the history
  • Loading branch information
devintegral6 committed Nov 15, 2019
1 parent f3eb413 commit 723e905
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { IAccountState } from '~/redux/account';
import { Push } from 'connected-react-router';
import styles from './styles.module.scss';
import { TextInput } from '../../inputs/TextInput';
import { getURL } from '~/utility/dom';

type IProps = {
push: Push;
Expand Down Expand Up @@ -135,15 +136,15 @@ const AccountCreateCredentialForm: FC<IProps> = ({ push, onSubmit, list }) => {
<Col md={4} lg={3}>
<div className={styles.validator}>
<div>
<img src={is_long_enough ? check : cross} alt="correct" className="ico" />
<img src={is_long_enough ? getURL(check) : getURL(cross)} alt="correct" className="ico" />
8+ Characters
</div>
<div>
<img src={has_capital ? check : cross} alt="correct" className="ico" />
<img src={has_capital ? getURL(check) : getURL(cross)} alt="correct" className="ico" />
1+ Upper Case Letter
</div>
<div>
<img src={has_number ? check : cross} alt="correct" className="ico" />
<img src={has_number ? getURL(check) : getURL(cross)} alt="correct" className="ico" />
1+ Number
</div>
</div>
Expand Down
7 changes: 4 additions & 3 deletions src/view/components/account/AccountCreateProccess/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import { PanelProgress } from '~/view/components/panels/PanelProgress';
import create_account from '~/images/icons/create_account.svg';
import account_information from '~/images/icons/account_information.svg';
import account_confirm from '~/images/icons/account_confirm.svg';
import { getURL } from '~/utility/dom';

const STAGES = [
{ icon: create_account, title: "Create Account" },
{ icon: account_information, title: "Account Information" },
{ icon: account_confirm, title: "Confirm" },
{ icon: getURL(create_account), title: "Create Account" },
{ icon: getURL(account_information), title: "Account Information" },
{ icon: getURL(account_confirm), title: "Confirm" },
];

interface IProps {
Expand Down
3 changes: 2 additions & 1 deletion src/view/components/account/CreateAccountIcons/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Identicon from '~/view/general/Identicon';
import refreshIcon from '~/images/icons/refresh-icon.svg';
import classNames from 'classnames';
import styles from './styles.module.scss';
import { getURL } from '~/utility/dom';

interface IProps {
date: number;
Expand Down Expand Up @@ -34,7 +35,7 @@ const CreateAccountIcons: FC<IProps> = ({ date, selected, onSelect, onRefresh })
</Col>

<Col className={styles.refresh} md={4} lg={3}>
<img aria-hidden src={refreshIcon} alt="Refresh" onClick={onRefresh} />
<img aria-hidden src={getURL(refreshIcon)} alt="Refresh" onClick={onRefresh} />
</Col>
</Row>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/view/components/inputs/Select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { FC, SelectHTMLAttributes, useCallback, ChangeEventHandler, React
import styles from './styles.module.scss';
import { FaIcon } from '../FaIcon';
import classNames from 'classnames';
import { getURL } from '~/utility/dom';

type IProps = SelectHTMLAttributes<HTMLSelectElement> & {
handler?: (val: string) => void;
Expand Down Expand Up @@ -30,7 +31,7 @@ const Select: FC<IProps> = ({ handler, label, options, icon, fa_icon, placeholde
{label && <div className={styles.label}>{label}:</div>}
{right && <div className={styles.right}>{right}</div>}
{fa_icon && <FaIcon icon={fa_icon} />}
{icon && <img src={icon} alt="icon" />}
{icon && <img src={getURL(icon)} alt="icon" />}
<select onChange={onChange} placeholder="placeholder" {...props}>
{placeholder && (
<option disabled value="">
Expand Down
3 changes: 2 additions & 1 deletion src/view/components/inputs/TextInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Input } from 'reactstrap';
import styles from './styles.module.scss';
import { FaIcon } from '../FaIcon';
import classNames from 'classnames';
import { getURL } from '~/utility/dom';

type IProps = InputHTMLAttributes<HTMLInputElement> & {
icon?: string;
Expand Down Expand Up @@ -38,7 +39,7 @@ const TextInput: FC<IProps> = ({
{label && <div className={styles.label}>{label}:</div>}

{fa_icon && <FaIcon icon={fa_icon} />}
{icon && <img src={icon} alt="icon" />}
{icon && <img src={getURL(icon)} alt="icon" />}

<input {...props} onChange={onChange} />
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/view/components/layout/LayoutHeaderNav/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,15 @@ const LayoutHeaderNavUnconnected: FC<IProps> = ({ location: { pathname }, isBlur
</div>

<div className={styles.burger} onClick={toggleMenu}>
<img src={hamburgerBtn} alt="menu" />
<img src={getURL(hamburgerBtn)} alt="menu" />
</div>
</Col>
</Row>
</Container>

<div className={classNames(styles.menu, { [styles.active]: is_menu_active })}>
<div className={styles.close} onClick={toggleMenu}>
<img src={closeBtn} alt="close" />
<img src={getURL(closeBtn)} alt="close" />
</div>

<div className={styles.menu_content}>
Expand Down
3 changes: 2 additions & 1 deletion src/view/components/print/AccountDetailPrint/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Row, Col } from 'reactstrap';
import QRCodeIcon from '~/view/general/QRCodeIcon/index';
import BrandLogo from '~/images/logo/FantomWallet.svg';
import styles from './styles.module.scss';
import { getURL } from '~/utility/dom';

interface IProps {
mnemonic: string;
Expand All @@ -24,7 +25,7 @@ const AccountDetailPrint: FC<IProps> = ({ mnemonic, address }) => (

<Col className="brand">
<div className="brand-holder">
<img src={BrandLogo} alt="logo" />
<img src={getURL(BrandLogo)} alt="logo" />
<p>https://fantom.foundation/</p>
</div>
</Col>
Expand Down
3 changes: 2 additions & 1 deletion src/view/pages/account/AccountCreateInfo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { PanelTitle } from '~/view/components/panels/PanelTitle';
import { PanelButton } from '~/view/components/panels/PanelButton';
import { Address } from '~/view/components/account/Address';
import { TextInput } from '~/view/components/inputs/TextInput';
import { getURL } from '~/utility/dom';

const mapStateToProps = selectAccountCreate;
const mapDispatchToProps = {
Expand Down Expand Up @@ -147,7 +148,7 @@ const AccountCreateInfoUnconnected: FC<IProps> = ({
</Row>
<Row>
<Col className={styles.notice}>
<img src={noView} alt="no-view" />
<img src={getURL(noView)} alt="no-view" />

<h2>Screenshots are not secure</h2>

Expand Down
3 changes: 2 additions & 1 deletion src/view/pages/modals/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import classNames from 'classnames';
import close from '~/images/icons/close.svg';
import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock';
import * as MODAL_ACTIONS from '~/redux/modal/actions';
import { getURL } from '~/utility/dom';

const mapStateToProps = selectModal;
const mapDispatchToProps = {
Expand Down Expand Up @@ -36,7 +37,7 @@ const ModalUnconnected: FC<IProps> = ({ isOpened, modalHide, current }) => {
<div className={classNames(styles.modal, { [styles.active]: is_visible })} ref={ref}>
<div className={styles.header}>
<div onClick={modalHide} className={styles.close}>
<img src={close} alt="close" />
<img src={getURL(close)} alt="close" />
</div>
</div>

Expand Down

0 comments on commit 723e905

Please sign in to comment.