Gate Events-linked joins behind registration and badge check-in.
Deploy Ladill Meet / deploy (push) Successful in 43s
Deploy Ladill Meet / deploy (push) Successful in 43s
Attendees register or sign in with a badge before the display-name screen; email is no longer collected on the Meet join form. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -71,5 +71,72 @@ Alpine.data('leaveFeedback', () => ({
|
||||
},
|
||||
}));
|
||||
|
||||
Alpine.data('meetBadgeScanner', () => ({
|
||||
scanning: false,
|
||||
scanError: '',
|
||||
scanner: null,
|
||||
|
||||
toggle() {
|
||||
if (this.scanning) {
|
||||
this.stop();
|
||||
return;
|
||||
}
|
||||
|
||||
this.scanning = true;
|
||||
this.scanError = '';
|
||||
this.$nextTick(() => this.start());
|
||||
},
|
||||
|
||||
start() {
|
||||
if (typeof Html5Qrcode === 'undefined') {
|
||||
this.scanError = 'QR scanner could not load. Enter your badge code manually.';
|
||||
this.scanning = false;
|
||||
return;
|
||||
}
|
||||
|
||||
const el = document.getElementById('meet-badge-qr-reader');
|
||||
if (!el) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.scanner = new Html5Qrcode('meet-badge-qr-reader');
|
||||
this.scanner.start(
|
||||
{ facingMode: 'environment' },
|
||||
{ fps: 10, qrbox: { width: 220, height: 220 } },
|
||||
(decoded) => {
|
||||
const code = (decoded || '').trim().toUpperCase();
|
||||
if (!code) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.stop();
|
||||
const input = document.querySelector('input[name="badge_code"]');
|
||||
if (input) {
|
||||
input.value = code;
|
||||
}
|
||||
|
||||
input?.closest('form')?.requestSubmit();
|
||||
},
|
||||
() => {},
|
||||
).catch(() => {
|
||||
this.scanError = 'Camera access was denied or unavailable.';
|
||||
this.scanning = false;
|
||||
});
|
||||
},
|
||||
|
||||
stop() {
|
||||
if (!this.scanner) {
|
||||
this.scanning = false;
|
||||
return;
|
||||
}
|
||||
|
||||
this.scanner.stop().catch(() => {}).finally(() => {
|
||||
this.scanner.clear().catch(() => {});
|
||||
this.scanner = null;
|
||||
this.scanning = false;
|
||||
});
|
||||
},
|
||||
}));
|
||||
|
||||
window.Alpine = Alpine;
|
||||
Alpine.start();
|
||||
|
||||
Reference in New Issue
Block a user