Repository navigation
Installer: one module for storing settings (assistant and settings form) - #253
Merged
Merged
Conversation
wizard.js and device-setup.js each had their own hex encoding, list of secret settings and value checks. web/hub-settings.js now holds them once; both forms apply the same checks, which mirror hub_config_rules.cpp. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Csa4N778M5kZxErLfAfd7D
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The setup assistant (
wizard.js) and the settings form of the advanced view (device-setup.js) each had their own hex encoding, their own list of secret settings and their own checks of the values, and the copies had drifted apart.New
web/hub-settings.js(window.trailcamSettings) holds what both need: the list of secrets, the value of a form field as it is stored (passwords untrimmed), the early checks, theconfig set-hexcommand and the text shown for it, and clearing the secret fields.Differences that come from merging the two copies:
web_passwordandcamera_password(it has no such fields today, so nothing was shown in clear).hub_config_rules.cpp), so only the moment of the message changes.Tested in headless Chrome with a simulated hub: saving in the assistant (order, hex values, an untrimmed password, masked secrets, cleared fields) and in the settings form, and the rejected values in both. Not tested on a hub.
Generated by Claude Code