Let the add-printer form take every supported kind

A kind selector (Bambu, Klipper, PrusaLink, OctoPrint) decides which fields
appear: serial and access code for Bambu, an API key for PrusaLink and
OctoPrint, neither for Klipper. Discovered printers of any of these kinds
now fill the form in.
This commit is contained in:
2026-10-30 07:49:31 +00:00
parent 6b1c7c6db3
commit 69f35c2a6b
4 changed files with 62 additions and 21 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ async function addPrinter(farmId: string, printer: NewPrinter) {
try {
await apiFetch(`/farms/${farmId}/printers`, {
method: "POST",
body: { ...printer, vendor: "bambu" },
body: printer,
});
} catch (err) {
throw new Error(apiErrorMessage(err, "the printer could not be added"));