File tree Expand file tree Collapse file tree 4 files changed +34
-1
lines changed Expand file tree Collapse file tree 4 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 9898 padding : 32px ;
9999 margin : auto;
100100 box-sizing : border-box;
101+ position : relative;
101102}
102103
103104section {
@@ -461,4 +462,20 @@ button {
461462 font-size : 10px ;
462463 font-weight : 500 ;
463464 color : var (--content-muted );
465+ }
466+
467+ .Welcome {
468+ background-color : var (--int-support-info-primary-default );
469+ display : none;
470+ }
471+
472+ .Welcome p {
473+ font-size : 16px ;
474+ font-weight : 600 ;
475+ line-height : 1.45 ;
476+ color : var (--content-secondary );
477+ }
478+
479+ .Welcome span {
480+ color : var (--content-warning )
464481}
Original file line number Diff line number Diff line change 1414 < main class ="fc f-wrap-32 ">
1515 < img src ="assets/logo-1000.png " class ="Logo " />
1616
17+ < section id ="welcome-flag " class ="Section Welcome ">
18+ < p > Setup your trading account parameters to use the position size builder. Scroll to the bottom
19+ to see the account settings.</ p >
20+ </ section >
21+
1722 < section class ="Section ">
1823 < div class ="fc f-wrap-24 ">
1924 < div class ="fc f-wrap-12 ">
Original file line number Diff line number Diff line change @@ -70,11 +70,14 @@ var AccountSettings = ($, db) => {
7070 }
7171
7272 var updateDB = ( ) => {
73+ var that = this ;
7374 db . findOne ( { exchange : 'default' } , ( err , docs ) => {
7475 if ( ! docs ) {
75- db . insert ( data )
76+ db . insert ( data ) ;
77+ that . observer . fire ( 'AccountSettingsLoaded' ) ;
7678 } else {
7779 db . update ( { exchange : 'default' } , data ) ;
80+ that . observer . fire ( 'AccountSettingsLoaded' ) ;
7881 }
7982 } )
8083 }
@@ -118,6 +121,8 @@ var AccountSettings = ($, db) => {
118121 if ( docs ) {
119122 updateLocalData ( docs ) ;
120123 that . observer . fire ( 'AccountSettingsLoaded' ) ;
124+ } else {
125+ that . observer . fire ( 'AccountSettingsNotFound' ) ;
121126 }
122127 render ( ) ;
123128 } )
Original file line number Diff line number Diff line change @@ -20,4 +20,10 @@ $(window).on('load', () => {
2020
2121 this . observer . on ( 'PositionSizeCalculated' , this . modules . PositionSizeSuggestion . render ) ;
2222 this . observer . on ( 'AccountSettingsLoaded' , this . modules . PositionSizeBuilder . sync ) ;
23+ this . observer . on ( 'AccountSettingsNotFound' , ( ) => {
24+ $ ( '#welcome-flag' ) . show ( ) ;
25+ } ) ;
26+ this . observer . on ( 'AccountSettingsLoaded' , ( ) => {
27+ $ ( '#welcome-flag' ) . hide ( ) ;
28+ } ) ;
2329} )
You can’t perform that action at this time.
0 commit comments