17 Commits

Author SHA1 Message Date
Maxim Prokhorov
7260ec833a all: fix typos, spelling, phrasing
resolve #2645 w/ some extra corrections
2025-06-03 21:25:44 +03:00
Maxim Prokhorov
e7acf9fb6a webui(build): rollup circular dependency
avoid sharing utility funcs through the main module
2025-04-14 04:08:48 +03:00
Maxim Prokhorov
0e4ae21368 webui(lint): explicit file patterns
eslint v9 replaces empty pattern list with a ['.']

ignore known directories when running locally
explicit paths for eslint in the ci script
2025-03-19 23:56:03 +03:00
Maxim Prokhorov
1d2503a19e webui(settings): enumerables for both datalist & select
generalize <options> handlers, providing same entrypoint for both
2025-03-19 04:40:05 +03:00
Maxim Prokhorov
f2153f4a38 webui(settings): allow string id mapping in enumerables
store names as {id: name, ...}, not [{id, name}, ...]
entries appear the same way, and js stores keys in the insertion order

fixup numbers converted to strings
fixup select options typing to accept [string, string] instead of [number, string]
2025-03-19 04:38:39 +03:00
Maxim Prokhorov
d7af980bdf test(webui): enumerables spec extended
minimum viable checks for ranges and manually created entries
listen to and trigger events for span & select enumerable elements
2025-03-19 00:05:16 +03:00
Maxim Prokhorov
cfb83300d0 test: node does not like when gc closes files
> (node:1916) Warning: Closing file descriptor 31 on garbage collection
> (Use `node --trace-warnings ...` to show where the warning was created)
> (node:1916) [DEP0137] DeprecationWarning: Closing a FileHandle object on garbage collection is deprecated. Please close FileHandle objects explicitly using FileHandle.prototype.close(). In the future, an error will be thrown if a file descriptor is closed during garbage collection.
> (node:1916) Warning: Closing file descriptor 32 on garbage collection

per https://nodejs.org/api/deprecations.html#DEP0137
explicitly close after reading
2024-08-24 01:57:41 +03:00
Maxim Prokhorov
5334739469 webui: key->value element setters with node root
allow to init limited set of elements, not whole document
update tests for 08f521dc35
2024-08-13 17:53:26 +03:00
Maxim Prokhorov
1041bcb26e webui: correctly send NaN and compress numeric strings
convert NaN into "nan" string for remote, since JSON does not have NaN type
always -2bytes from quotes surrounding the numeric value
2024-08-09 14:53:24 +03:00
Maxim Prokhorov
68892a0066 all: remove extra whitespace 2024-08-09 12:47:31 +03:00
Maxim Prokhorov
2e6389002f webui: numeric inputs and NaNs
allow empty numeric input
fix element setters sometimes forgetting to set the value
fix NaN equality comparison for element value getters
2024-07-30 00:37:29 +03:00
Maxim Prokhorov
4807a95627 test: extra condition check for #2613 2024-07-25 22:38:47 +03:00
Maxim Prokhorov
a2cd6857b1 webui: password pair validation fixes
move isChanged check to validator, always return both inputs for the given form
add assumeChanged?: boolean to opts, allowes forced check (similar to getData option)
small layout test for password and general forms, resolve #2613

attempt to make 'original' === undefined return consistent value
2024-07-25 22:01:58 +03:00
Maxim Prokhorov
71d96ed316 webui: fix "listen to" naming, proper array usage 2024-07-15 15:56:43 +03:00
Maxim Prokhorov
ed26dbda8b webui: more annoying group input/select
revert set:/del: merge, do not allow to miss key pruning

allow certain fields to have 'unset' state via 'required' attribute
ensure 'unset' fields cannot be added to data payload

generate ui tooltip when 'unset' field is created in a group or erased by user

ref. #2612
2024-07-12 18:27:42 +03:00
Maxim Prokhorov
53dc51ff41 webui: more typings, clean-up sensor units init 2024-07-04 07:30:50 +03:00
Maxim Prokhorov
31a838fab7 webui: vitest specs 2024-07-02 18:52:51 +03:00