2 Commits
Author SHA1 Message Date
Sebastian f2e71f63c5 feat: open models in any installed slicer and download from the same menu (#133)
* feat: open models in any installed slicer and download from the same menu

The slicer configuration now takes every slicer installed on the computer,
not just one. A model's main button opens the last one used; its arrow lists
the others, downloads the chosen file and, with several files, all of them
as a zip. That replaces the separate "Download model files" button.

Which file the actions apply to is picked in a compact file box above the
button, instead of in the button's own dropdown.

User.slicer stays the slicer the button opens; the new User.slicers lists
the installed ones, seeded from the old choice. A PATCH with only `slicer`,
as older frontends send it, still works and adds it to the list.

* fix: keep the saved slicer with an older backend and count only zipped files

An older backend answers GET /settings/slicer with `slicer` alone, which left
no installed slicers and turned the model's main button into a download.
getSlicer now treats that slicer as the one installed, for both the hook and
the configuration panel.

The zip holds the plates and supporting files, not the prepared print, so
"Download all N files" counts the plates only, as it did before.

* fix: lock slicer settings while changing them and read older PATCH replies

setUserSlicerSettings read, computed and wrote without a lock, so two changes
at once (two tabs, two devices) could each undo the other's. It now runs in a
transaction that locks the user's row first.

An older backend also answers PATCH /settings/slicer with `slicer` alone,
which left the cached settings without a list. GET and PATCH replies now go
through the same fallback.

* fix: switch one slicer at a time so another device's toggle stays

The configuration panel sent its whole list, so two devices that loaded the
same settings and each switched a different slicer kept only the later one;
the row lock can't help with a stale list. PATCH /settings/slicer now takes
`enable` and `disable`, applied under the lock to the list as it is, and the
panel sends those.

The concurrency test now sends four overlapping slicer-only changes and
checks all four are kept, which fails without the lock.

* fix: save slicer toggles one at a time so a late answer can't win

Two quick toggles in the configuration panel sent overlapping PATCHes, and
an older answer arriving last put an outdated list in the panel and the
shared cache. Saves now queue: the panel shows its own toggles until the
last save is back, then the server's answer to it, which also undoes any
that failed.
2026-10-22 21:58:04 +02:00
Tautvydas Derzinskas f10bd133f2 docs: update docs and site (#50)
* docs: update docs and site

* docs: image theme adaptability
2026-10-17 05:59:03 +02:00