Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-05-06 18:21:22 +04:00
parent 98423be0c3
commit e0df81c071

View File

@@ -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