• R/O
  • HTTP
  • SSH
  • HTTPS

bytom-dashboard: 提交

dashboard of Bytom


Commit MetaInfo

修订版cf1454e4bb8dc9b2e9f7efaf4570878d956c0dc8 (tree)
时间2019-12-18 11:15:21
作者Zhiting Lin <zlin035@uott...>
CommiterZhiting Lin

Log Message

Revert "update tripple tags"

This reverts commit 9159b71a77d0424874ddc1a9487ea8ed86e35b1a.

更改概述

差异

--- a/src/features/app/components/Navigation/Navigation.jsx
+++ b/src/features/app/components/Navigation/Navigation.jsx
@@ -13,9 +13,6 @@ class Navigation extends React.Component {
1313 constructor(props) {
1414 super(props)
1515 this.openTutorial = this.openTutorial.bind(this)
16- this.state={
17- transaction:0
18- }
1916 }
2017
2118 openTutorial(event) {
@@ -35,35 +32,10 @@ class Navigation extends React.Component {
3532 </div>}
3633 <ul className={styles.navigation}>
3734 <li className={styles.navigationTitle}>{t('crumbName.coreData')}</li>
38- <li >
39- <Link to='/transactions'
40- onClick={() =>{this.setState({transaction:0})}}
41- activeClassName={this.state.transaction ==0 && styles.active}>
42- {navIcon('transaction', styles)}
43- {capitalize(t('crumbName.transaction'))}
44- </Link>
45- </li>
4635 <li>
47- <Link to={{
48- pathname: '/transactions',
49- state: { title: '"营业执照" 存证'}
50- }}
51- onClick={() =>{this.setState({transaction:1})}}
52- activeClassName={this.state.transaction ==1 && styles.active}
53- >
36+ <Link to='/transactions' activeClassName={styles.active}>
5437 {navIcon('transaction', styles)}
55- {'"营业执照" 存证'}
56- </Link>
57- </li>
58- <li>
59- <Link activeClassName={this.state.transaction ==2 && styles.active} to={{
60- pathname: '/transactions',
61- state: { title: '"不动产证明" 存证' }
62- }}
63- onClick={() =>{this.setState({transaction:2})}}
64- >
65- {navIcon('transaction', styles)}
66- {'"不动产证明" 存证'}
38+ {capitalize(t('crumbName.transaction'))}
6739 </Link>
6840 </li>
6941 <li>
--- a/src/features/app/components/Navigation/Navigation.scss
+++ b/src/features/app/components/Navigation/Navigation.scss
@@ -1,4 +1,3 @@
1-
21 .border {
32 padding-top: $gutter-size;
43 border-top: 1px solid $border-inverse-color;
--- a/src/features/shared/actions/create.js
+++ b/src/features/shared/actions/create.js
@@ -10,14 +10,7 @@ export default function(type, options = {}) {
1010 const created = (param) => ({ type: `CREATED_${type.toUpperCase()}`, param })
1111
1212 return {
13- showCreate: (title) =>
14- title? push({
15- pathname: createPath,
16- state: {
17- title
18- }
19- })
20- :push(createPath),
13+ showCreate: push(createPath),
2114 created,
2215 submitForm: (data) => {
2316 const clientApi = options.clientApi ? options.clientApi() : chainClient()[`${type}s`]
--- a/src/features/shared/components/BaseList/BaseList.jsx
+++ b/src/features/shared/components/BaseList/BaseList.jsx
@@ -16,9 +16,9 @@ class ItemList extends React.Component {
1616 const t = this.props.t
1717
1818 const objectName = humanize(t(`crumbName.${type.toLowerCase()}` ))
19- const title = this.props.title || capitalize(t(`crumbName.${type.toLowerCase()}` ) || label)
19+ const title = capitalize(t(`crumbName.${type.toLowerCase()}` ) || label)
2020
21- const newButton = <button key='showCreate' className='btn btn-primary' onClick={() =>this.props.showCreate(this.props.title)}>
21+ const newButton = <button key='showCreate' className='btn btn-primary' onClick={this.props.showCreate}>
2222 + { this.props.createLabel || t('crumbName.new')}
2323 </button>
2424 if (!this.props.skipCreate) {
@@ -63,7 +63,6 @@ class ItemList extends React.Component {
6363 <this.props.listItemComponent
6464 key={item.id}
6565 item={item}
66- title={this.props.title}
6766 btmAmountUnit={this.props.btmAmountUnit}
6867 {...this.props.itemActions}/>)
6968
@@ -133,7 +132,7 @@ export const mapStateToProps = (type, itemComponent, additionalProps = {}) => (s
133132 export const mapDispatchToProps = (type) => (dispatch) => {
134133 return {
135134 pushList: (query, pageNumber) => dispatch(actions[type].pushList(query, pageNumber)),
136- showCreate: (title) => dispatch(actions[type].showCreate(title)),
135+ showCreate: () => dispatch(actions[type].showCreate),
137136 }
138137 }
139138
--- a/src/features/shared/components/PageTitle/PageTitle.jsx
+++ b/src/features/shared/components/PageTitle/PageTitle.jsx
@@ -22,10 +22,7 @@ class PageTitle extends React.Component {
2222 <ul className={styles.crumbs}>
2323 {this.props.breadcrumbs.map(crumb =>
2424 <li className={styles.crumb} key={crumb.name}>
25- {!crumb.last && <Link to={{
26- pathname: '/' + crumb.path,
27- state: { title: this.props.changedTitle }
28- }}>
25+ {!crumb.last && <Link to={'/' + crumb.path}>
2926 {capitalize(crumb.name)}
3027 <img src={chevron} className={styles.chevron} />
3128 </Link>}
@@ -61,8 +58,6 @@ const mapStateToProps = (state, ownProps) => {
6158 const pathname = state.routing.locationBeforeTransitions.pathname
6259 const breadcrumbs = []
6360
64- const title = state.routing.locationBeforeTransitions.state && state.routing.locationBeforeTransitions.state.title
65-
6661 let currentRoutes = routes.childRoutes
6762 let currentPath = []
6863 pathname.split('/').forEach(component => {
@@ -85,11 +80,7 @@ const mapStateToProps = (state, ownProps) => {
8580
8681 breadcrumbs[breadcrumbs.length - 1].last = true
8782
88- if(title){
89- breadcrumbs[0].name = title
90- }
9183 return {
92- changedTitle: title,
9384 breadcrumbs,
9485 flashMessages: state.app.flashMessages,
9586 }
--- a/src/features/transactions/components/List.jsx
+++ b/src/features/transactions/components/List.jsx
@@ -15,9 +15,8 @@ class List extends React.Component {
1515 }
1616 }
1717 render() {
18- const title = this.props.location.state && this.props.location.state.title
1918 const ItemList = BaseList.ItemList
20- return (<ItemList title={ title} { ...this.props} />)
19+ return (<ItemList {...this.props} />)
2120 }
2221 }
2322
--- a/src/features/transactions/components/ListItem/ListItem.jsx
+++ b/src/features/transactions/components/ListItem/ListItem.jsx
@@ -54,12 +54,7 @@ class ListItem extends React.Component {
5454 <RelativeTime timestamp={item.timestamp} />
5555 </span>}
5656
57- <Link className={styles.viewLink}
58- to={{
59- pathname: `/transactions/${item.id}`,
60- state: { title: this.props.title}
61- }}
62- >
57+ <Link className={styles.viewLink} to={`/transactions/${item.id}`}>
6358 {t('commonWords.viewDetails')}
6459 </Link>
6560 </div>
Show on old repository browser