Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
finish some pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Taneeya committed Jan 19, 2021
1 parent 1584790 commit 5913183
Show file tree
Hide file tree
Showing 25 changed files with 993 additions and 61 deletions.
3 changes: 2 additions & 1 deletion app/actions/initialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ export const onBoard = () => async dispatch => {
const { isAgree } = await dispatch(verifyTermsVersion());
if (!isAgree) {
dispatch(AppActions.updateAppLoading(false));
dispatch(AppActions.changePage(NavConstants.TERMS_PAGE));
dispatch(AppActions.changePage(NavConstants.ENTRY_PAGE));
// dispatch(AppActions.changePage(NavConstants.TERMS_PAGE));
} else {
await dispatch(AccountActions.fetchAndSetAccounts);
const { result } = await OnBoarding.getIsAppOnBoarded();
Expand Down
14 changes: 14 additions & 0 deletions app/components/back-button/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React, { Component } from 'react';
import BackArrow from '../../images/back_arrow.svg';
import './styles.css';

export default class BackButton extends Component {
render() {
return (
<div className="back-wrapper">
<img height={7} width={4} src={BackArrow} alt="" />
<span>Back</span>
</div>
);
}
}
17 changes: 17 additions & 0 deletions app/components/back-button/styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.back-wrapper {
height: 36px;
line-height: 36px;
padding-left: 15px;
cursor: pointer;
}

.back-wrapper img {
margin-right: 5px;
vertical-align: middle;
}

.back-wrapper span {
color: #333333;
font-size: 11px;
vertical-align: middle;
}
6 changes: 6 additions & 0 deletions app/components/view-selector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,15 @@ import Chain from '../../views/chain';
import Trade from '../../views/trade';
import * as NavConstant from '../../constants/navigation';
import Settings from '../../views/settings';
import EntryPage from '../../views/entry-page';
import ImportWallet from '../../views/import-wallet';

const getView = page => {
switch (page) {
case NavConstant.ENTRY_PAGE:
return <EntryPage />;
case NavConstant.IMPORT_WALLET_PAGE:
return <ImportWallet />;
case NavConstant.TERMS_PAGE:
return <Terms />;
case NavConstant.DASHBOARD_PAGE:
Expand Down
10 changes: 9 additions & 1 deletion app/constants/navigation.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
export const TERMS_PAGE = 'TERMS_PAGE';
export const ENTRY_PAGE = 'ENTRY_PAGE';
export const IMPORT_WALLET_PAGE = 'IMPORT_WALLET_PAGE';
export const DASHBOARD_PAGE = 'DASHBOARD_PAGE';
export const TRANSFER_PAGE = 'TRANSFER_PAGE';
export const CONFIRM_PAGE = 'CONFIRM_PAGE';
Expand All @@ -22,7 +24,13 @@ export const CHAIN_PAGE = 'CHAIN_PAGE';
export const TRADE_PAGE = 'TRADE_PAGE';
export const SETTINGS_PAGE = 'SETTINGS_PAGE';

export const ONBOARDING_PAGES_GROUP = [TERMS_PAGE, SIGN_IN_PAGE, SIGN_UP_PAGE, CREATE_ACCOUNT_PAGE];
export const ONBOARDING_PAGES_GROUP = [
TERMS_PAGE,
SIGN_IN_PAGE,
SIGN_UP_PAGE,
CREATE_ACCOUNT_PAGE,
IMPORT_WALLET_PAGE,
];

export const DISABLE_NETWORKS_PAGES_GROUP = [
ADDRESS_BOOK_PAGE,
Expand Down
3 changes: 2 additions & 1 deletion app/containers/app.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
NODE_LIST_PAGE,
MANAGE_ACCOUNT_PAGE,
DAPP_REQUESTS_PAGE,
ENTRY_PAGE,
} from '../constants/navigation';
import CloverApp from '../components/clover-app';
import './styles.css';
Expand Down Expand Up @@ -77,7 +78,7 @@ export default class App extends Component {
};
}
return {
showHeader: prevProps.page !== QR_CODE_PAGE,
showHeader: prevProps.page !== QR_CODE_PAGE && prevProps.page !== ENTRY_PAGE,
showLogo: false,
showBanner: true,
showNetwork: !_.includes(hideNetworkPages, prevProps.page),
Expand Down
15 changes: 15 additions & 0 deletions app/images/back_arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 42 additions & 35 deletions app/images/clover_banner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions app/images/clover_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions app/images/entry_arrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5913183

Please sign in to comment.