Skip to content

Commit

Permalink
Improve QR Code pairing instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
fttx committed Apr 27, 2021
1 parent 658a109 commit 49af034
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
17 changes: 8 additions & 9 deletions ionic/src/pages/home/pop-over-qrcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@
</ion-header>

<ion-content padding text-center>
<p>
<p [hidden]="qrCodeUrl == ''">
<qr-code class="qr-code-element" [value]="qrCodeUrl" [size]="240"></qr-code>
</p>

<ion-spinner class="qr-spinner" color="primary" [hidden]="qrCodeUrl != ''"></ion-spinner>

<div style="margin: 20px; font-size: 1.3em">
In order to pair the app:
Instructions:
<ol text-left>
<li>Launch the app</li>
<li>Open the
<i>Select server</i> page</li>
<li>Tap on the scan icon
<ion-icon style="margin-left: 6px; font-size: .9em" name="qr-scanner"></ion-icon>
</li>
<li>Open the app on your smartphone</li>
<li>Open the <b>Select server</b> page by tapping the Wi-Fi shaped icon <ion-icon style="margin-left: 3px; font-size: .9em" name="ios-wifi"></ion-icon></li>
<li>Tap on the <b><ion-icon style="margin-left: 3px; font-size: .9em" name="qr-scanner"></ion-icon> QR Code Pairing</b> button</li>
<li>Scan the QR code above</li>
</ol>
</div>
</ion-content>
</ion-content>
5 changes: 3 additions & 2 deletions ionic/src/pages/welcome/welcome.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ <h3>1) Install the app on your smartphone</h3>
</div>

<h3>2) Launch the app and scan this QR code to connect</h3>
<qr-code [value]="qrCodeUrl" [size]="240"></qr-code>
<qr-code [hidden]="qrCodeUrl == ''" [value]="qrCodeUrl" [size]="240"></qr-code>
<ion-spinner [hidden]="qrCodeUrl != ''" class="qr-spinner" color="primary"></ion-spinner>

<div *ngIf="electronProvider.isDev()">
<br>
Expand All @@ -36,4 +37,4 @@ <h3>2) Launch the app and scan this QR code to connect</h3>
</div>
</div>

</ion-content>
</ion-content>
4 changes: 1 addition & 3 deletions ionic/src/providers/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ export class UtilsProvider {
if (defaultLocalAddress) { // Adds the defaultLocalAddress at very beginning of the list
localAddresses.unshift(defaultLocalAddress);
}
// this.ngZone.run(() => {
resolve(Config.URL_PAIR + '/?h=' + encodeURIComponent(hostname) + '&a=' + encodeURIComponent(localAddresses.join('-')));
// })
});
})
}
Expand Down Expand Up @@ -131,7 +129,7 @@ export class UtilsProvider {
}

public upgradeDisplayValue(requireRestart = false) {
return new Promise((resolve, reject) => {
return new Promise<void>((resolve, reject) => {
// mark the update as "started"
this.store.set('upgraded_displayValue', false);

Expand Down
5 changes: 5 additions & 0 deletions ionic/src/theme/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,8 @@ blockquote {
left: 0;
}

.qr-spinner {
width: 100px;
height: 100px;
margin: 50px auto;
}

0 comments on commit 49af034

Please sign in to comment.