@@ -108,6 +108,10 @@ export class CreatePage {
|
|||||||
return new URLSearchParams(window.location.search).get('ref') ?? window.location.hostname;
|
return new URLSearchParams(window.location.search).get('ref') ?? window.location.hostname;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get isMobile(): boolean {
|
||||||
|
return window.innerWidth < 768;
|
||||||
|
}
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.loadSettings();
|
this.loadSettings();
|
||||||
}
|
}
|
||||||
@@ -164,6 +168,12 @@ export class CreatePage {
|
|||||||
// Real API uses 'nspkurl'; doc says 'Payload' — try both
|
// Real API uses 'nspkurl'; doc says 'Payload' — try both
|
||||||
const nspkUrl = res?.nspkurl ?? res?.Payload;
|
const nspkUrl = res?.nspkurl ?? res?.Payload;
|
||||||
this.qrStatus.set(res?.status ?? '');
|
this.qrStatus.set(res?.status ?? '');
|
||||||
|
|
||||||
|
if (nspkUrl && this.isMobile) {
|
||||||
|
window.location.href = nspkUrl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (qrId || nspkUrl) {
|
if (qrId || nspkUrl) {
|
||||||
this.activeQrId = qrId;
|
this.activeQrId = qrId;
|
||||||
const qrData = nspkUrl
|
const qrData = nspkUrl
|
||||||
|
|||||||
Reference in New Issue
Block a user