783 Commits

Author SHA1 Message Date
Maxim Prokhorov
53dc51ff41 webui: more typings, clean-up sensor units init 2024-07-04 07:30:50 +03:00
Maxim Prokhorov
c3e587d6fd webui: attempt to reduce wifi element searches 2024-07-03 02:09:34 +03:00
Maxim Prokhorov
1c19066eab webui: incorrect initial types, add ota and cmd 2024-07-03 01:41:04 +03:00
Maxim Prokhorov
0157a62f69 webui: fix empty actions, typings for connection and errors 2024-07-03 01:18:08 +03:00
Maxim Prokhorov
31a838fab7 webui: vitest specs 2024-07-02 18:52:51 +03:00
Maxim Prokhorov
02e825571f webui: (key in cfg) => check for null too
should not do implicit 'falsy' check by accessing the value, since boolean 'false' triggers it too
2024-07-02 18:45:19 +03:00
Maxim Prokhorov
937a51d0d4 webui: missing type="range" in input setter 2024-07-02 18:43:07 +03:00
Maxim Prokhorov
3a2da6341e webui: group element indexing typo 2024-07-02 18:42:43 +03:00
Maxim Prokhorov
41e8360e25 webui: pending changes canceling out 2024-07-02 18:41:59 +03:00
Maxim Prokhorov
585efd2cba webui: more handlers typings 2024-07-02 18:41:29 +03:00
Maxim Prokhorov
28c748e393 webui: types for templates, clean-up consumers 2024-07-01 23:24:22 +03:00
Maxim Prokhorov
a47764c80c webui: separate originals setter for node and list of elems
'FromValuesForNode' is never referencing 'node' when list of elems is provided
'FromValues' with '[]' would simply do nothing

prefer either an explicit list, or a root to perform default query 'input,select'
2024-07-01 19:46:57 +03:00
Maxim Prokhorov
b286859d7a webui: select value list as stringify func input 2024-07-01 19:42:52 +03:00
Maxim Prokhorov
7926c44b9c webui: keep save button green with pending changes
change event handler should not apply style without checking settings 'changed' property first
export extra func to determine whether element 'changed' attribute itself was changed
2024-07-01 16:12:48 +03:00
Maxim Prokhorov
efd2da6269 webui: enumerables getter cannot return undefined 2024-07-01 16:10:39 +03:00
Maxim Prokhorov
f5b0340cea webui: bogus original update when setting select 2024-07-01 16:10:15 +03:00
Maxim Prokhorov
7870972492 webui: select setter always replaces the value 2024-07-01 16:09:42 +03:00
Maxim Prokhorov
10d93daf69 webui: span value replacement and argument fixes
separate span and input,select handling in kvs updater
ensure array value can be passed into the handler
ensure value is converted into a string before string operations happen
2024-06-30 17:33:52 +03:00
Maxim Prokhorov
1b58c24e7f webui: boolean.toString(), typeof is an expression 2024-06-30 17:28:01 +03:00
Maxim Prokhorov
bf85dc7aed webui: data attribute for pre= and post= 2024-06-30 17:28:01 +03:00
Maxim Prokhorov
cca45a69be webui: getGata fixes
inverse logic for 'get everything' agrument (currently, only external use)
search specific forms vs. all document when performing cleanup
more explicit types, allow imports
2024-06-30 17:28:01 +03:00
Maxim Prokhorov
764ff09116 webui: settings-group-add unused payload 2024-06-29 02:01:07 +03:00
Maxim Prokhorov
c442d0f3a2 webui: stricter types for events 2024-06-29 02:00:33 +03:00
Maxim Prokhorov
d9e3774f17 webui: typo 2024-06-29 01:52:08 +03:00
Maxim Prokhorov
300c9b64b3 webui: initial clean-up
trying to streamline get/set for element data
switch on actual type instead of tag, since ts seems to like that more
2024-06-29 01:51:14 +03:00
Maxim Prokhorov
324ed9761b webui: more type warnings clean-up 2024-06-25 22:14:03 +03:00
Maxim Prokhorov
f007db1ff6 webui: implicit build-only consts via .d file 2024-06-25 17:53:50 +03:00
Maxim Prokhorov
a7697a2578 webui: attempt to clean-up index js types
minimal type info for internal and some external funcs
fix Ago updates depending on uptime, use onmessage

html/src/types/* useless (at least without tsc actually running)
2024-06-25 17:53:50 +03:00
Maxim Prokhorov
2dadf01839 webui: gulpfile in strict mode
amends f58d086dd6
attempt to distinguish build and ui scripts
2024-06-25 17:53:50 +03:00
Maxim Prokhorov
4f520a8798 webui: consistent settingsMax check
remove leftover manual template merge, idForContainer() should just use template-id data key
group add event now checks that instead, raising alert when number is greater than max

ref. #2610
2024-06-24 22:43:19 +03:00
Maxim Prokhorov
ce5ada9d32 webui: type filter for element setters 2024-06-24 22:43:19 +03:00
Maxim Prokhorov
a1363ddad9 system: iso8601 datetime & webui in local timezone
ref. #2608
2024-06-24 22:42:00 +03:00
Maxim Prokhorov
ddcbd0e885 webui: color hierarchy for custom toggle 2024-06-24 22:42:00 +03:00
Maxim Prokhorov
4975a2382c webui: removing original .html & .js & .css 2024-06-24 22:42:00 +03:00
Maxim Prokhorov
289fea4f3d webui: separate sources per module
* migrate to esbuild from terser, since now js source needs bundling
* (temporary?) hijack inline-source object handling to inline html files
* get rid of legacy removeIf comments in source in favour of explicit
  removal either through bundling tree-shaking and / or manual module-*
  class element removal w/ jsdom
* get rid of multi-layered custom checkboxes in favour of
  `appearance: none` directly styling the `input` elem
  also removes scripting part that was supposed to adjust for=... labels
* update to html-minifier-terser, up-to-date html-minifier fork
* update to iro.js 5.5.x, using npm to manage dependencies
* build script can now update resulting html output
  (called after bundling stage, before minification)
2024-06-22 19:49:59 +03:00
Maxim Prokhorov
d6f807d68c scheduler: midnight as default HH:MM
allow just "UTC", "Monday", "05-01", etc.
clarify webui paragraph and mention KEYWORD as an element

ignore sunrise and sunset keywords when sun module is disabled

move all of parsing to time module, test whether combined match works
2024-05-27 19:10:25 +03:00
Maxim Prokhorov
8735f4d762 scheduler: webui sun module, utc cannot be alone 2024-05-16 19:59:49 +03:00
Maxim Prokhorov
bfc716894d webui: scheduler 2024-05-16 01:25:50 +03:00
Maxim Prokhorov
87197470cb web: group delete button should not assume it is at the top 2024-05-16 00:00:32 +03:00
Maxim Prokhorov
dd6bedeec7 webui: style save button 2024-04-15 01:23:08 +03:00
Maxim Prokhorov
c70fe1a016 web: bump html-validate@8 again
fixes 3f1cf8cd *-dup false positives
2024-04-12 00:22:38 +03:00
Maxim Prokhorov
af797fddb7 ha: reorder settings in webui 2024-03-19 19:51:53 +03:00
Maxim Prokhorov
3f1cf8cd04 webui: autocomplete="off" fixes
update dev html-validate@8 and eslint
workaround for form-dup-name (false-positive?)
2024-03-19 19:51:53 +03:00
Maxim Prokhorov
452cd78c41 ha: handle homeassistant/status
birth message should trigger discovery, enabled by default
ref. #1637

clean-up discovery code to properly re-init when something goes wrong
also restore manual discovery trigger from WebUI
2024-03-19 19:51:35 +03:00
Dmitry
238dc130af garland: fixes and updates (#2600)
* garland: fix issue with division by zero in first scene setup

* garland: update setters code

* garland: fix web UI

* garland: update scene default settings

* garland: update palettes, add random run animation

* garland: enable and update anim_glow

* garland: update anim_spread

* garland: add anim_crossing

* garland: get rid of redundant variables in main class

* garland: provide anims with all palettes

* garland: unify anim_waves and anim_run to use ColorWave class

* garland: update format for color_wave.h and garland.cpp

* graland: update anim code with clear rands and auto counters

* garland: implement pixel caching for color waves to reduce redundant calculations

* garland: fix anim dolphins out of range issue

* garland: tune anim comets

* garland: combine all wave-based anims; add wave comet anim

* garland: fixes for PR notes
2024-01-20 22:23:05 +03:00
Maxim Prokhorov
f3c3efca4a dcz: typo in relay settings key
resolve #2596
2023-11-05 00:37:45 +03:00
Indu Prakash
2e19de7a44 webui: show message only for real pin-lock failures (#2584) 2023-03-17 14:39:03 +03:00
Maxim Prokhorov
3a1e041f51 gpio: notify about failed locks 2023-03-16 14:45:04 +03:00
Maxim Prokhorov
909949b5cc light: hide extra toggle in webui
amend b5a03dac72
2023-01-12 03:16:07 +03:00
Maxim Prokhorov
b5a03dac72 light: experiment with relay state provider
* dynamic relays should not overlap with configuration
* prefer explicit relay configuration vs. dynamic addition

resolve #2568
2023-01-11 05:46:38 +03:00