Merge pull request #461 from samturner3/master
Feature: Add option to use full URL in QR codes instead of web+spoolman: prefix
This commit is contained in:
@@ -18,6 +18,11 @@ const QRCodeScannerModal: React.FC = () => {
|
||||
setVisible(false);
|
||||
navigate(`/spool/show/${match.groups.id}`);
|
||||
}
|
||||
const fullURLmatch = result.match(/^https?:\/\/[^/]+\/spool\/show\/(?<id>[0-9]+)$/);
|
||||
if (fullURLmatch && fullURLmatch.groups) {
|
||||
setVisible(false);
|
||||
navigate(`/spool/show/${fullURLmatch.groups.id}`);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user