The JSON response to /api/active became malformed after #4465 because raw hex strings need to be enclosed by quotes. This commit changes the variant format in the /api/materials response to be consistent with one used for /api/active. By using integers instead of strings, we're avoiding the need to parse integers at run time. The JSON error did not appear in the Chrome console because it was being silenced as a hack to appease "matinfo --web-server". I fix this by removing the hack and simply emitting a valid response when there's no live backend. Also fixed the display of materials, which were always being marked as active even when they had no active variants.
17 KiB
17 KiB