Browse Source

UI: added preview images for mobile app qr code widgets

pull/10591/head
rusikv 2 years ago
parent
commit
21872468e2
  1. 2
      application/src/main/data/json/system/widget_types/home_mobile_app_qr_code.json
  2. 2
      application/src/main/data/json/system/widget_types/mobile_app_qr_code.json
  3. 19
      ui-ngx/src/app/modules/home/components/widget/lib/mobile-app-qrcode-widget.component.ts

2
application/src/main/data/json/system/widget_types/home_mobile_app_qr_code.json

File diff suppressed because one or more lines are too long

2
application/src/main/data/json/system/widget_types/mobile_app_qr_code.json

File diff suppressed because one or more lines are too long

19
ui-ngx/src/app/modules/home/components/widget/lib/mobile-app-qrcode-widget.component.ts

@ -71,13 +71,15 @@ export class MobileAppQrcodeWidgetComponent extends PageComponent implements OnI
} }
ngOnInit(): void { ngOnInit(): void {
if (this.ctx) { if (!this.previewMode) {
this.mobileAppSettings = this.ctx.settings; if (this.ctx) {
} else { this.mobileAppSettings = this.ctx.settings;
this.mobileAppService.getMobileAppSettings().subscribe((settings => { } else {
this.mobileAppSettings = settings; this.mobileAppService.getMobileAppSettings().subscribe((settings => {
this.cd.detectChanges(); this.mobileAppSettings = settings;
})); this.cd.detectChanges();
}));
}
} }
} }
@ -105,9 +107,6 @@ export class MobileAppQrcodeWidgetComponent extends PageComponent implements OnI
updateQRCode(link: string) { updateQRCode(link: string) {
import('qrcode').then((QRCode) => { import('qrcode').then((QRCode) => {
QRCode.toCanvas(this.canvasRef.nativeElement, link, { width: 100 }); QRCode.toCanvas(this.canvasRef.nativeElement, link, { width: 100 });
// QRCode.toCanvas(this.canvasRef.nativeElement, link);
// this.canvasRef.nativeElement.style.width = '4.6vw';
// this.canvasRef.nativeElement.style.height = '4.6vw';
}); });
} }

Loading…
Cancel
Save