@@ -3,12 +3,12 @@ import { traceEvent } from '../../lib/telemetry.js';
33import './helpOverlay.css' ;
44import closeButton from '../../img/closeButton.png' ;
55// import connectionStringInPortal from '../../img/connectionStringInPortal.png';
6- import img1 from '../../img/test-1 .png' ;
7- import img2_1 from '../../img/test-2-1 .png' ;
8- import img2_2 from '../../img/test-2-2 .png' ;
9- import img2_3 from '../../img/test-2-3 .png' ;
10- import img3_1 from '../../img/test-3-1 .png' ;
11- import img3_2 from '../../img/test-3-2 .png' ;
6+ import img1 from '../../img/step1 .png' ;
7+ import img2_1 from '../../img/step2_1 .png' ;
8+ import img2_2 from '../../img/step2_2 .png' ;
9+ import img2_3 from '../../img/step2_3 .png' ;
10+ import img3_1 from '../../img/step3_1 .png' ;
11+ import img3_2 from '../../img/step3_2 .png' ;
1212
1313class HelpOverlay extends Component {
1414 constructor ( props ) {
@@ -17,13 +17,14 @@ class HelpOverlay extends Component {
1717 step : 0 ,
1818 numOfSteps : 3 ,
1919 subStep : 0 ,
20+ timeSpan : 3000 ,
2021 numOfSubStep : [ 3 , 3 , 2 ] ,
21- offset : [ [ 0 , 50 , 120 ] , [ 0 , 90 , 140 ] , [ 0 , 50 ] ]
22+ offset : [ [ 0 , 50 , 120 ] , [ 0 , 70 , 120 ] , [ 0 , 50 ] ]
2223 } ;
2324 if ( this . toggleInterval ) {
2425 clearInterval ( this . toggleInterval ) ;
2526 }
26- this . toggleInterval = setInterval ( ( ) => { this . toggleStep ( ) ; } , 5000 ) ;
27+ this . toggleInterval = setInterval ( ( ) => { this . toggleStep ( ) ; } , this . state . timeSpan ) ;
2728 }
2829
2930 nextStep = ( ) => {
@@ -51,7 +52,7 @@ class HelpOverlay extends Component {
5152 if ( this . toggleInterval ) {
5253 clearInterval ( this . toggleInterval ) ;
5354 }
54- this . toggleInterval = setInterval ( ( ) => { this . toggleStep ( ) ; } , 5000 ) ;
55+ this . toggleInterval = setInterval ( ( ) => { this . toggleStep ( ) ; } , this . state . timeSpan ) ;
5556 }
5657
5758 goToSubStep = ( id ) => {
@@ -122,7 +123,7 @@ class HelpOverlay extends Component {
122123 if ( this . toggleInterval ) {
123124 clearInterval ( this . toggleInterval ) ;
124125 }
125- this . toggleInterval = setInterval ( ( ) => { this . toggleStep ( ) ; } , 5000 ) ;
126+ this . toggleInterval = setInterval ( ( ) => { this . toggleStep ( ) ; } , this . state . timeSpan ) ;
126127 }
127128 }
128129
@@ -178,7 +179,7 @@ class HelpOverlay extends Component {
178179 </ div >
179180 < div className = { `paragraph-container ${ this . state . step === 1 ? '' :'element-none' } ` } >
180181 < div className = { `paragraph ${ this . state . subStep === 0 ? 'paragraph-selected' :'' } ` } style = { { transform :"translate(0,-" + this . state . offset [ this . state . step ] [ this . state . subStep ] + "px" } } >
181- 1. In the Azure portal( https://portal.azure.com/) , click New > Internet of Things > IoT Hub to provision a new IoT hub .
182+ 1. In the < a target = "_blank" href = " https://portal.azure.com/" > Azure portal </ a > , click New > Internet of Things > IoT Hub to provision a new IoT hub .
182183 </ div >
183184 < div className = { `paragraph ${ this . state . subStep === 1 ? 'paragraph-selected' :'' } ` } style = { { transform :"translate(0,-" + this . state . offset [ this . state . step ] [ this . state . subStep ] + "px" } } >
184185 2. In the Device Explorer pane, click Add to add a device to your IoT hub.
@@ -209,6 +210,10 @@ class HelpOverlay extends Component {
209210 { this . state . step === this . state . numOfSteps - 1 ? "Got it" : "Next" }
210211 </ div >
211212 </ div >
213+ < div className = "link-container" >
214+ < a target = "_blank" href = "https://docs.microsoft.com/azure/iot-hub/iot-hub-raspberry-pi-web-simulator-get-started" > See doc</ a >
215+ < a target = "_blank" href = "https://github.com/Azure-Samples/raspberry-pi-web-simulator" > View source</ a >
216+ </ div >
212217 </ div >
213218 < div onWheel = { this . changeSubStep } className = "picture-instruction" >
214219 < div className = { `picture-container ${ this . state . step === 0 ? '' :'element-none' } ` } >
@@ -228,10 +233,7 @@ class HelpOverlay extends Component {
228233 < div className = { `picture-indicator ${ this . state . step === 0 || this . state . numOfSubStep [ this . state . step ] <= 1 ? 'element-hide' :'' } ${ this . state . subStep === 1 ? 'picture-indicator-selected' :'' } ` } onClick = { this . goToSubStep . bind ( this , 1 ) } />
229234 < div className = { `picture-indicator ${ this . state . step === 0 || this . state . numOfSubStep [ this . state . step ] <= 2 ? 'element-hide' :'' } ${ this . state . subStep === 2 ? 'picture-indicator-selected' :'' } ` } onClick = { this . goToSubStep . bind ( this , 2 ) } />
230235 </ div >
231- < div className = "link-container" >
232- < a target = "_blank" href = "https://docs.microsoft.com/azure/iot-hub/iot-hub-raspberry-pi-web-simulator-get-started" > See doc</ a >
233- < a target = "_blank" href = "https://github.com/Azure-Samples/raspberry-pi-web-simulator" > View source</ a >
234- </ div >
236+
235237 </ div >
236238 </ div >
237239 </ div >
0 commit comments