• R/O
  • HTTP
  • SSH
  • HTTPS

bytom-dashboard: Commit

dashboard of Bytom


Commit MetaInfo

Revisionb058557016fb731065c6d0b3261b8fd4135a61d1 (tree)
Zeit2019-12-19 11:19:53
AutorZhiting Lin <zlin035@uott...>
CommiterZhiting Lin

Log Message

Revert "update tripple tags"

This reverts commit dfa21b5a76cc6e274ec5b9edd5e0995327c4d04c.

Ändern Zusammenfassung

Diff

--- 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 super(props)
1414
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
@@ -17,9 +17,9 @@ class ItemList extends React.Component {
1717 const t = this.props.t
1818
1919 const objectName = humanize(t(`crumbName.${type.toLowerCase()}` ))
20- const title = this.props.title || capitalize(t(`crumbName.${type.toLowerCase()}` ) || label)
20+ const title = capitalize(t(`crumbName.${type.toLowerCase()}` ) || label)
2121
22- const newButton = <button key='showCreate' className='btn btn-primary' onClick={() =>this.props.showCreate(this.props.title)}>
22+ const newButton = <button key='showCreate' className='btn btn-primary' onClick={this.props.showCreate}>
2323 + { this.props.createLabel || t('crumbName.new')}
2424 </button>
2525 if (!this.props.skipCreate) {
@@ -64,7 +64,6 @@ class ItemList extends React.Component {
6464 <this.props.listItemComponent
6565 key={item.id}
6666 item={item}
67- title={this.props.title}
6867 btmAmountUnit={this.props.btmAmountUnit}
6968 {...this.props.itemActions}/>)
7069
@@ -137,7 +136,7 @@ export const mapStateToProps = (type, itemComponent, additionalProps = {}) => (s
137136 export const mapDispatchToProps = (type) => (dispatch) => {
138137 return {
139138 pushList: (query, pageNumber) => dispatch(actions[type].pushList(query, pageNumber)),
140- showCreate: (title) => dispatch(actions[type].showCreate(title)),
139+ showCreate: () => dispatch(actions[type].showCreate),
141140 }
142141 }
143142
--- 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