This repository was archived by the owner on Sep 2, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +11
-7
lines changed Expand file tree Collapse file tree 5 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export default class AccountItemsList extends PureComponent {
2020 }
2121 { accounts
2222 . filter ( x => x . account !== loginid )
23- . map ( x => < AccountMenuItem key = { x . token } account = { x . account } token = { x . token } /> )
23+ . map ( x => < AccountMenuItem key = { x . token } account = { x . account } token = { x . token } currency = { x . currency } /> )
2424 }
2525 </ div >
2626 ) ;
Original file line number Diff line number Diff line change 11import React , { PureComponent } from 'react' ;
2- import { M } from 'binary-components' ;
32import storage from '../_store/storage' ;
43
54export default class AccountMenuItem extends PureComponent {
65
76 props : {
87 account : string ,
98 token : string ,
9+ currency : string
1010 } ;
1111
1212 switchToAccount = ( ) => {
@@ -20,7 +20,7 @@ export default class AccountMenuItem extends PureComponent {
2020 } ;
2121
2222 render ( ) {
23- const { account } = this . props ;
23+ const { account, currency } = this . props ;
2424
2525 return (
2626 < a
@@ -29,9 +29,9 @@ export default class AccountMenuItem extends PureComponent {
2929 onClick = { this . switchToAccount }
3030 >
3131 < img src = "img/icon.png" alt = "" />
32- < M m = "Switch to" />
33-
3432 { account }
33+
34+ { currency && `(${ currency } )` }
3535 </ a >
3636 ) ;
3737 }
Original file line number Diff line number Diff line change 1010 display : block ;
1111
1212 > .sidebar {
13- top : -300px !important ;
13+ top : -2000px !important ;
14+ max-height : 100% ;
15+ overflow : hidden ;
1416 left : inherit ;
1517 right : 0 ;
1618 }
Original file line number Diff line number Diff line change 2525.account-items-list {
2626 display : flex ;
2727 flex-direction : column ;
28+ overflow : scroll ;
2829}
Original file line number Diff line number Diff line change 3535 accounts . push ( { account : account , token : token , currency : currency || '' , } ) ;
3636 }
3737
38- return accounts ;
38+ var sortedAccounts = accounts . sort ( ( a , b ) => b . currency . length - a . currency . length ) ;
39+ return sortedAccounts ;
3940 }
4041
4142 function readConfig ( ) {
You can’t perform that action at this time.
0 commit comments