Commit Graph
203 Commits
Author SHA1 Message Date
Donkie e09d63b443 client_v2: accept decimal commas in every numeric field
Most of the world writes 1,75 rather than 1.75, and `<input type="number">`
only accepts the separator the browser locale dictates: everything else it
reports as an empty value. A user typing a comma therefore watched a weight
or a diameter silently come out blank or, once the separator was dropped,
a hundred times too large. The same input type also accepts "e", "+" and "-"
anywhere in the text, since they are legal exponent syntax, and then reports
the whole value as empty too, so "1e" read back as nothing at all.

Numeric fields are now text inputs with `inputmode="decimal"`, guarded by a
shared `numericInput` action that filters at the keystroke: both separators
go in, letters cannot, and a pasted "12,5 g" is cleaned rather than refused.
Reading is centralised in `parseDecimal`, which takes either separator and
returns null instead of NaN for text that is not a number, so an unset field
stays distinguishable from a real 0. What the parent, and the API, receive is
always canonical.

The typed separator stays on screen: each field keeps a draft of the text and
gives it up only when the value moves somewhere that text no longer means, so
storing 1.5 does not rewrite a typed "1,5" between keystrokes. Arrow-key
stepping, which was native to the old input type, is now the component's own.

Covers the spool/filament/vendor inspectors, the add-spool modal (whose price
box was a bare text input accepting anything at all), extra fields of every
numeric type, the extra-field editor's order box and the low-stock threshold.
2026-08-08 19:42:39 +02:00
Donkie 93f49449a0 client_v2: restore the remembered view by navigating, not by parsing
Folding the remembered grouping into parseLibraryState left the address
bar saying nothing while the list was grouped, and that gap broke the
group control: picking the default grouping serialises back to the very
same bare URL, and an unchanged URL means SvelteKit reuses its cached
load, so the choice never took effect. The load was also no longer a
pure function of the URL, which is what that per-URL cache assumes -
preloading the nav tab cached a redirect built from the old preference
and replayed it.

The page now navigates on arrival to the URL that spells the remembered
view out, replacing the history entry. The load goes back to reading the
URL alone, the view stays linkable, and every distinct view has a
distinct URL again. Only on arrival: a goto is a choice the user just
made and a popstate is Back, and overruling either would be wrong.
2026-08-08 10:01:10 +02:00
Donkie 538c78e7b3 client_v2: remember the library's grouping and sorting
Group and sort live in the URL, so they survive a reload of a library
link but not a trip to Settings and back: every other route links to a
bare `/`, which handed back the shipped view and made a deliberately
chosen grouping something the user re-picked several times a day.

A URL that mentions neither grouping nor sorting now means "however I
had it last", restored from localStorage; one that mentions either still
wins outright, so a shared link shows its recipient what its sender saw.
Only the layout is remembered - filters, search and archived-visibility
hide spools, and one silently restored days later reads as missing data.

Fixes #1036
2026-08-08 10:00:33 +02:00
Miloslav Kos 4c1c905a83 Translated using Weblate (Czech)
Currently translated at 82.8% (425 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/cs/
2026-08-08 06:43:28 +00:00
Donkie 16e34da538 client_v2: make the library list column resizable
The list was a fixed 470px, which truncated longer filament names with no
way to see the rest. The divider between the list and the inspector is now
a draggable, focusable separator, and the width is remembered per browser.

Fixes #1034
2026-08-08 08:33:43 +02:00
Miloslav Kos 216eba5d26 Translated using Weblate (Czech)
Currently translated at 76.2% (391 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/cs/
2026-08-07 07:57:27 +00:00
Donkie f38720314b Bump version to 0.26.1 2026-08-06 18:44:00 +00:00
변성운 29113812f3 Translated using Weblate (Korean)
Currently translated at 29.8% (153 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ko/
2026-08-06 09:27:17 +02:00
Miloslav Kos a03229be6f Translated using Weblate (Czech)
Currently translated at 75.8% (389 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/cs/
2026-08-06 09:27:16 +02:00
Sungjun Park 3583c5d011 Translated using Weblate (Korean)
Currently translated at 29.8% (153 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ko/
2026-08-06 08:20:30 +02:00
Sungjun Park e4813ce86c Translated using Weblate (Korean)
Currently translated at 28.8% (148 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ko/
2026-08-06 08:15:47 +02:00
Daniel Hultgren c1a0882ee9 Translated using Weblate (Swedish)
Currently translated at 56.7% (291 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/sv/
2026-08-06 08:13:40 +02:00
Sungjun Park 52deaf7c8c Translated using Weblate (Korean)
Currently translated at 28.2% (145 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ko/
2026-08-06 08:13:38 +02:00
Miloslav Kos b0c9f572f7 Translated using Weblate (Czech)
Currently translated at 70.7% (363 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/cs/
2026-08-06 08:13:37 +02:00
Donkie 5cfdde4cc6 Merge pull request #1025 from Donkie/worktree-issue-1019-unassigned-extra-group
Show every unassigned spool when grouping by an extra field
2026-08-05 19:49:29 +02:00
Donkie dd39a11c7e Show every unassigned spool when grouping by an extra field
Fixes #1019. A dashboard card grouped by a custom spool field counted more
spools than it listed: the group aggregate summed them, the card's own query
returned a subset.

Grouping and filtering disagreed about what "no value" means. group_by keys on
the decoded value, so a spool holding the JSON empty string a cleared text box
writes became its own group, separate from the null one; the client renders
both as "unassigned" and adds the counts. The card then fetches its spools with
`extra.<key>=`, whose empty branch matched only NULL and JSON null - never the
empty string. Built-in string columns have matched both NULL and '' since
forever (add_where_clause_str_opt), which is why grouping by location was fine.

- The empty extra-field filter matches a stored empty string too.
- Value-keyed group axes (extra fields, location, material) fold a blank into
  NULL, so "unassigned" is one group rather than two the client can only draw
  as one.
- Emptying a text extra field clears it instead of storing "", so no new spool
  lands in the state above.
- The dashboard clears an extra field with a real JSON null. It sent the string
  'null', which the API rejects as not-a-string, so dragging a spool onto the
  unassigned card 400'd on every extra-field board.
2026-08-05 19:42:59 +02:00
Anonymous 5208b47007 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/zh_Hans/
2026-08-05 18:59:23 +02:00
Anonymous 0d73e0d34e Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/zh_Hant/
2026-08-05 18:59:17 +02:00
Anonymous 5e2c4b0c0c Translated using Weblate (Ukrainian)
Currently translated at 25.3% (130 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/uk/
2026-08-05 18:59:12 +02:00
Anonymous 63eee038d7 Translated using Weblate (Turkish)
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/tr/
2026-08-05 18:59:07 +02:00
Anonymous f38743b179 Translated using Weblate (Thai)
Currently translated at 26.3% (135 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/th/
2026-08-05 18:59:02 +02:00
Anonymous 9bf4022776 Translated using Weblate (Tamil)
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ta/
2026-08-05 18:58:56 +02:00
Anonymous de8c6de460 Translated using Weblate (Swedish)
Currently translated at 32.1% (165 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/sv/
2026-08-05 18:58:50 +02:00
Anonymous 0d75364b07 Translated using Weblate (Slovenian)
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/sl/
2026-08-05 18:58:45 +02:00
Anonymous 7d07905091 Translated using Weblate (Slovak)
Currently translated at 1.7% (9 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/sk/
2026-08-05 18:58:39 +02:00
Anonymous 08bbd6480b Translated using Weblate (Russian)
Currently translated at 68.6% (352 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ru/
2026-08-05 18:58:33 +02:00
Anonymous 86204ffddb Translated using Weblate (Romanian)
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ro/
2026-08-05 18:58:28 +02:00
Anonymous 4be91b365a Translated using Weblate (Portuguese)
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/pt/
2026-08-05 18:58:23 +02:00
Anonymous 5af5ca17d1 Translated using Weblate (Portuguese (Brazil))
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/pt_BR/
2026-08-05 18:58:18 +02:00
Anonymous 8013dd1ce2 Translated using Weblate (Polish)
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/pl/
2026-08-05 18:58:13 +02:00
Anonymous ee9cf0d830 Translated using Weblate (Dutch)
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/nl/
2026-08-05 18:58:08 +02:00
Anonymous 3e8eaf6aaf Translated using Weblate (Norwegian Bokmål)
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/nb_NO/
2026-08-05 18:58:03 +02:00
Anonymous 2af3b95d4f Translated using Weblate (Latvian)
Currently translated at 0.9% (5 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/lv/
2026-08-05 18:57:58 +02:00
Anonymous 7707dad1a4 Translated using Weblate (Lithuanian)
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/lt/
2026-08-05 18:57:53 +02:00
Anonymous 8382a9037d Translated using Weblate (Korean)
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ko/
2026-08-05 18:57:48 +02:00
Anonymous fc4cf78451 Translated using Weblate (Japanese)
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/ja/
2026-08-05 18:57:43 +02:00
Anonymous 13b1ab7f94 Translated using Weblate (Italian)
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/it/
2026-08-05 18:57:38 +02:00
Anonymous 7262563e4d Translated using Weblate (Hungarian)
Currently translated at 25.3% (130 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/hu/
2026-08-05 18:57:29 +02:00
Anonymous 7cf8f6f0eb Translated using Weblate (Hindi (Latin script))
Currently translated at 0.3% (2 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/hi_Latn/
2026-08-05 18:57:24 +02:00
Anonymous 01462d3df3 Translated using Weblate (French)
Currently translated at 26.3% (135 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/fr/
2026-08-05 18:57:19 +02:00
Anonymous faa4659b6d Translated using Weblate (Persian)
Currently translated at 26.3% (135 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/fa/
2026-08-05 18:57:14 +02:00
Anonymous aaa8714f66 Translated using Weblate (Estonian)
Currently translated at 3.1% (16 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/et/
2026-08-05 18:57:09 +02:00
Anonymous da5eeef1a0 Translated using Weblate (Spanish)
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/es/
2026-08-05 18:57:02 +02:00
Anonymous e73f603f39 Translated using Weblate (Greek)
Currently translated at 22.4% (115 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/el/
2026-08-05 18:56:56 +02:00
Anonymous a7be90ef4a Translated using Weblate (German)
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/de/
2026-08-05 18:56:49 +02:00
Anonymous 5b889c2e7a Translated using Weblate (Danish)
Currently translated at 26.7% (137 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/da/
2026-08-05 18:56:44 +02:00
Anonymous 796ef5941e Translated using Weblate (Czech)
Currently translated at 42.8% (220 of 513 strings)

Translation: Spoolman/Spoolman Web UI v2
Translate-URL: https://hosted.weblate.org/projects/spoolman/spoolman-web-ui-v2/cs/
2026-08-05 18:56:37 +02:00
Donkie b2f5088081 client_v2: let a filament's manufacturer be changed
The manufacturer was decided once, in the add-spool modal, and there was no
way back: a filament created under the wrong brand — or under none — stayed
there, and since the library groups by manufacturer that mis-files every
spool of it. The companion to the spool's change-filament (#1010), one level
up the chain.

Adds a "Change" action to the MANUFACTURER section of the filament
inspector, opening a dialog with the three destinations the API allows: one
of your manufacturers, a new one named on the spot (as the add-spool form
already allows), or none at all. There is no SpoolmanDB side to this one —
the external catalog carries filaments and materials, not manufacturers — so
the picker fetches the vendor list whole and filters it in the browser.

The dialog spells out the one consequence that isn't obvious. A filament
with no empty spool weight of its own takes its manufacturer's, and that is
the figure `PUT /spool/{id}/measure` subtracts from a reading off the scale,
so the note says what it becomes — or that it is about to have none. A
filament that has its own keeps it and gets no note: unlike the spool's full
weight, that field is editable right there in the panel.

Clearing the manufacturer travels as an explicit `vendor_id: null`, which is
what the API reads as "no manufacturer"; dropping the key instead would have
made that choice a silent no-op.
2026-08-05 18:14:28 +02:00
Donkie 7aa864e457 Merge pull request #1016 from Donkie/worktree-fix-1012-unused-grouping
client_v2: file unused spools under their own filament
2026-08-03 20:35:11 +02:00
Donkie 032b3f05c2 client_v2: file unused spools under their own filament
A collapsed "×N unused" row speaks for its whole pile with one filament's
name, swatch, weight and location, all read off the first spool. That only
holds within a filament group. Under Manufacturer (or Material/Location) a
group spans many filaments, so the whole unused pile was filed under
whichever filament happened to sort first: five different SUNLU woods
listed as "Wood Cherry ×5 unused" (#1012).

Bucket the pile by filament before collapsing it, keeping the backend's
order via first appearance. Buckets of one render inline as before.

Fixes #1012
2026-08-03 20:27:33 +02:00