File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 4545 return ;
4646 }
4747
48- if ( overlay . innerHTML . includes ( 'QR ') || overlay . innerHTML . includes ( 'bezahlen ') ) {
48+ if ( overlay . classList . contains ( 'overlay-qr ') || overlay . classList . contains ( 'overlay-both ') ) {
4949 startPolling ( ) ;
5050 }
5151 } ) ;
Original file line number Diff line number Diff line change @@ -671,6 +671,12 @@ const photoboothTools = (function () {
671671 const qrUrl =
672672 'https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=' +
673673 encodeURIComponent ( data . payment_url ) ;
674+ const statusClass = {
675+ both : 'overlay-both' ,
676+ qr : 'overlay-qr'
677+ } [ data . status ] ;
678+ const overlay = document . querySelector ( '.overlay' ) ;
679+
674680 api . overlay . show ( `
675681 <div style="text-align:center;">
676682 <div style="font-size:1.4em; margin-bottom:12px;">${ paymentMessage } </div>
@@ -680,6 +686,8 @@ const photoboothTools = (function () {
680686 </div>
681687 ` ) ;
682688 api . isPrinting = false ;
689+ overlay . classList . remove ( 'overlay-both' , 'overlay-qr' ) ;
690+ overlay . classList . add ( statusClass ) ;
683691 } else {
684692 api . overlay . showError ( data . error || api . getTranslation ( 'payments_failed' ) ) ;
685693 api . resetPrintErrorMessage ( cb , notificationTimeout ) ;
You can’t perform that action at this time.
0 commit comments