UI: added preview images for mobile app qr code widgets

This commit is contained in:
rusikv 2024-05-10 11:08:57 +03:00
parent 14ebfe7975
commit 21872468e2
3 changed files with 11 additions and 12 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -71,13 +71,15 @@ export class MobileAppQrcodeWidgetComponent extends PageComponent implements OnI
}
ngOnInit(): void {
if (this.ctx) {
this.mobileAppSettings = this.ctx.settings;
} else {
this.mobileAppService.getMobileAppSettings().subscribe((settings => {
this.mobileAppSettings = settings;
this.cd.detectChanges();
}));
if (!this.previewMode) {
if (this.ctx) {
this.mobileAppSettings = this.ctx.settings;
} else {
this.mobileAppService.getMobileAppSettings().subscribe((settings => {
this.mobileAppSettings = settings;
this.cd.detectChanges();
}));
}
}
}
@ -105,9 +107,6 @@ export class MobileAppQrcodeWidgetComponent extends PageComponent implements OnI
updateQRCode(link: string) {
import('qrcode').then((QRCode) => {
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';
});
}