Skip to content

Commit 072f9f9

Browse files
committed
readme is improved
1 parent 1375bf2 commit 072f9f9

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,16 @@ const login=(username,password)=>{
111111
```
112112
Another way is to place another instance of ```useGlobalInputApp``` in a component, and then switch to that component.
113113
114+
115+
When ```useGlobalInputApp``` is invoked for the first time, the module will start to initialize itself. In this phase, ```mobile.isLoading``` is set to true, and ```<mobile.ConnectQR/>``` displays a loading symbol. After the initialization is completed, if the application is ready to accept connection, ```mobile.isReady``` is set to true, and ```<mobile.ConnectQR/>``` displays an encrypted QR Code. When a mobile app has connected to your application, ```mobile.isConnected``` is set to true, and ```<mobile.ConnectQR/>``` displays nothing. Those variables are useful if you would like to control what to display during different phases:
116+
```JavaScript
117+
{mobile.isConnected && (<>
118+
<h1>Mobile Connected</h1>
119+
<div>Please operate on your mobile to provide your credential!</div>
120+
</>)}
121+
```
122+
123+
114124
For an element in a ```form```, ```type``` attribute defines how to process/display the data contained in it. For example, if it is set to ```button```, the mobile app display a ```Button```:
115125
116126
```JavaScript
@@ -217,13 +227,7 @@ const informationField={
217227

218228
````
219229

220-
When ```useGlobalInputApp``` is invoked for the first time, the module will start to initialize itself. In this phase, ```mobile.isLoading``` is set to true, and ```<mobile.ConnectQR/>``` displays a loading symbol. After the initialization is completed, if the application is ready to accept connection, ```mobile.isReady``` is set to true, and ```<mobile.ConnectQR/>``` displays an encrypted QR Code. When a mobile app has connected to your application, ```mobile.isConnected``` is set to true, and ```<mobile.ConnectQR/>``` displays nothing. Those variables are useful if you would like to control what to display during different phases:
221-
```JavaScript
222-
{mobile.isConnected && (<>
223-
<h1>Mobile Connected</h1>
224-
<div>Please operate on your mobile to provide your credential!</div>
225-
</>)}
226-
```
230+
227231

228232

229233
Finally, the examples in the [website](https://globalinput.co.uk/), and tests in the [test project](https://github.com/global-input/test-global-input-app-libs) contain more information about various use cases that you can implement in your Typescript/JavaScript applications.

0 commit comments

Comments
 (0)