@@ -11,23 +11,26 @@ export class PlaygroundQrCodeGenerator implements IPlaygroundQrCodeGenerator {
1111 }
1212
1313 public async generateQrCodeForiOS ( ) : Promise < void > {
14- await this . generateQrCode ( PlaygroundStoreUrls . APP_STORE_URL ) ;
14+ const message = `Scan the QR code below to install ${ "NativeScript Playground app" . underline . bold } on your ${ "iOS" . underline . bold } device or get it from ${ PlaygroundStoreUrls . APP_STORE_URL . underline . bold } .` ;
15+ await this . generateQrCode ( PlaygroundStoreUrls . APP_STORE_URL , message ) ;
1516 }
1617
1718 public async generateQrCodeForAndroid ( ) : Promise < void > {
18- await this . generateQrCode ( PlaygroundStoreUrls . GOOGLE_PLAY_URL ) ;
19+ const message = `Scan the QR code below to install ${ "NativeScript Playground app" . underline . bold } on your ${ "Android" . underline . bold } device or get it from ${ PlaygroundStoreUrls . GOOGLE_PLAY_URL . underline . bold } .` ;
20+ await this . generateQrCode ( PlaygroundStoreUrls . GOOGLE_PLAY_URL , message ) ;
1921 }
2022
2123 public async generateQrCodeForCurrentApp ( options : IHasUseHotModuleReloadOption ) : Promise < void > {
22- await this . generateQrCode ( this . $previewSdkService . getQrCodeUrl ( options ) ) ;
24+ const message = `Use ${ "NativeScript Playground app" . underline . bold } and scan the QR code below to preview the application on your device.` ;
25+ await this . generateQrCode ( this . $previewSdkService . getQrCodeUrl ( options ) , message ) ;
2326 }
2427
25- private async generateQrCode ( url : string ) : Promise < void > {
26- await this . generateQrCodeCore ( url ) ;
28+ private async generateQrCode ( url : string , message : string ) : Promise < void > {
29+ await this . generateQrCodeCore ( url , message ) ;
2730 this . printUsage ( ) ;
2831 }
2932
30- private async generateQrCodeCore ( url : string ) : Promise < void > {
33+ private async generateQrCodeCore ( url : string , message : string ) : Promise < void > {
3134 const shortenUrlEndpoint = util . format ( this . $config . SHORTEN_URL_ENDPOINT , encodeURIComponent ( url ) ) ;
3235 try {
3336 const response = await this . $httpClient . httpRequest ( shortenUrlEndpoint ) ;
@@ -37,14 +40,14 @@ export class PlaygroundQrCodeGenerator implements IPlaygroundQrCodeGenerator {
3740 // use the longUrl
3841 }
3942
40- this . $qrCodeTerminalService . generate ( url ) ;
43+ this . $qrCodeTerminalService . generate ( url , message ) ;
4144 }
4245
4346 private printUsage ( ) : void {
4447 this . $logger . info ( `
45- -> Press ${ this . underlineBoldCyan ( "a" ) } to show the QR code of NativeScript Playground app for ${ this . underlineBoldCyan ( "Android" ) } devices
46- -> Press ${ this . underlineBoldCyan ( "i" ) } to show the QR code of NativeScript Playground app for ${ this . underlineBoldCyan ( "iOS" ) } devices
47- -> Press ${ this . underlineBoldCyan ( "c" ) } to display the QR code of the ${ this . underlineBoldCyan ( "current application" ) } .
48+ -> Press ${ this . underlineBoldCyan ( "a" ) } to get a link to NativeScript Playground app for ${ this . underlineBoldCyan ( "Android" ) }
49+ -> Press ${ this . underlineBoldCyan ( "i" ) } to get a link to NativeScript Playground app for ${ this . underlineBoldCyan ( "iOS" ) }
50+ -> Press ${ this . underlineBoldCyan ( "c" ) } to show the QR code of the ${ this . underlineBoldCyan ( "current application" ) } .
4851 ` ) ;
4952 }
5053
0 commit comments