()
| 12 | const LOGO_URL = '/logo-icon-on-white.png'; |
| 13 | |
| 14 | export const JamQrCodeButton: FC = () => { |
| 15 | const { t } = useTranslation('remote'); |
| 16 | const [jamEnabled] = useCoreSetting<boolean>('integrations.jam.enabled'); |
| 17 | const [remoteUrl] = useCoreSetting<string>('integrations.jam.remoteUrl'); |
| 18 | |
| 19 | if (!jamEnabled) { |
| 20 | return null; |
| 21 | } |
| 22 | |
| 23 | return ( |
| 24 | <Tooltip content={t('qrCode.tooltip')} side="bottom"> |
| 25 | <Popover |
| 26 | trigger={<QrCode size={20} />} |
| 27 | anchor="bottom" |
| 28 | className="relative" |
| 29 | panelClassName="flex max-w-80 w-80 flex-col items-center gap-2 p-4" |
| 30 | > |
| 31 | <QRCodeSVG |
| 32 | className="text-primary rounded-lg" |
| 33 | value={remoteUrl ?? ''} |
| 34 | size={200} |
| 35 | fgColor="currentColor" |
| 36 | bgColor="#ffffff" |
| 37 | marginSize={2} |
| 38 | imageSettings={{ |
| 39 | src: LOGO_URL, |
| 40 | height: LOGO_SIZE, |
| 41 | width: LOGO_SIZE, |
| 42 | excavate: true, |
| 43 | }} |
| 44 | /> |
| 45 | <InfoField label={t('qrCode.instructions')} value={remoteUrl} /> |
| 46 | </Popover> |
| 47 | </Tooltip> |
| 48 | ); |
| 49 | }; |
nothing calls this directly
no test coverage detected