Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/src/components/qrCodeScanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ const QRCodeScannerModal: React.FC = () => {

const onScan = (result: string) => {
// Check for the spoolman ID format
const match = result.match(/^web\+spoolman:s-(?<id>[0-9]+)$/);
const match = result.match(/^web\+spoolman:s-(?<id>[0-9]+)$/i);
if (match && match.groups) {
setVisible(false);
navigate(`/spool/show/${match.groups.id}`);
}
const fullURLmatch = result.match(/^https?:\/\/[^/]+\/spool\/show\/(?<id>[0-9]+)$/);
const fullURLmatch = result.match(/^https?:\/\/[^/]+\/spool\/show\/(?<id>[0-9]+)$/i);
if (fullURLmatch && fullURLmatch.groups) {
setVisible(false);
navigate(`/spool/show/${fullURLmatch.groups.id}`);
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/printing/qrCodePrintingDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const QRCodePrintingDialog: React.FC<QRCodePrintingDialogProps> = ({
</Radio.Group>
</Form.Item>
<Form.Item label={t("printing.qrcode.useHTTPUrl.preview")}>
<Text> {useHTTPUrl ? `${baseUrlRoot}/spool/show/{id}` : `web+spoolman:s-{id}`}</Text>
<Text> {useHTTPUrl ? `${baseUrlRoot}/spool/show/{id}` : `WEB+SPOOLMAN:S-{id}`}</Text>
</Form.Item>
</>
)}
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/printing/spoolQrCodePrintingDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ Spool Weight: {filament.spool_weight} g
</>
}
items={items.map((spool) => ({
value: useHTTPUrl ? `${baseUrlRoot}/spool/show/${spool.id}` : `web+spoolman:s-${spool.id}`,
value: useHTTPUrl ? `${baseUrlRoot}/spool/show/${spool.id}` : `WEB+SPOOLMAN:S-${spool.id}`,
label: (
<p
style={{
Expand Down