@@ -110,7 +110,8 @@ function generateQRCode() {
110110 return ;
111111 }
112112
113- const url = `${ location . origin } /?code=${ currentFlightCode } ` ;
113+ const origin = window . electronAPI ? 'https://dropsilk.xyz' : location . origin ;
114+ const url = `${ origin } /?code=${ currentFlightCode } ` ;
114115 const qrDotColor = getComputedStyle ( document . documentElement ) . getPropertyValue ( '--c-primary' ) . trim ( ) ;
115116 const qrColors = { dark : qrDotColor , light : '#00000000' } ;
116117
@@ -380,7 +381,8 @@ function setupInviteModal() {
380381 if ( navigator . vibrate ) {
381382 navigator . vibrate ( [ 50 , 40 , 15 ] ) ;
382383 }
383- copyToClipboard ( `https://dropsilk.xyz/?code=${ store . getState ( ) . currentFlightCode } ` , e . currentTarget , i18next . t ( 'linkCopied' ) ) ;
384+ const origin = window . electronAPI ? 'https://dropsilk.xyz' : location . origin ;
385+ copyToClipboard ( `${ origin } /?code=${ store . getState ( ) . currentFlightCode } ` , e . currentTarget , i18next . t ( 'linkCopied' ) ) ;
384386 } ) ;
385387
386388 document . getElementById ( 'copyCodeBtn' ) ?. addEventListener ( 'click' , ( e ) => {
@@ -392,7 +394,8 @@ function setupInviteModal() {
392394
393395 shareNativeBtn ?. addEventListener ( 'click' , async ( ) => {
394396 const { currentFlightCode } = store . getState ( ) ;
395- if ( navigator . share ) await navigator . share ( { title : i18next . t ( 'joinMyFlight' ) , text : i18next . t ( 'joinMyFlightDescription' , { code : currentFlightCode } ) , url : `${ location . origin } /?code=${ currentFlightCode } ` } ) ;
397+ const origin = window . electronAPI ? 'https://dropsilk.xyz' : location . origin ;
398+ if ( navigator . share ) await navigator . share ( { title : i18next . t ( 'joinMyFlight' ) , text : i18next . t ( 'joinMyFlightDescription' , { code : currentFlightCode } ) , url : `${ origin } /?code=${ currentFlightCode } ` } ) ;
396399 } ) ;
397400}
398401
0 commit comments