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:
Donkie
2024-08-26 20:23:25 +02:00
committed by GitHub
7 changed files with 92 additions and 3 deletions

View File

@@ -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 (