Repository navigation
feat(webui): signal the development UI-issue button through a meta tag - #178
Merged
Merged
Conversation
The manager now reads CRYPTOS_DEV_UI_ISSUE_COPY and, when set to "true", injects <meta name="cryptos-dev-ui-issue-copy" content="true"> into the served index page. A development console build uses the tag to decide whether to show its "Copy for UI issue" button; a release build has no such button regardless of this setting. Refs CryptOS-PKI/cryptos-web#163 Signed-off-by: Bugs5382 <12115015+Bugs5382@users.noreply.github.com>
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.
What and why
The web console is getting a development-only "Copy for UI issue" button (CryptOS-PKI/cryptos-web#163). It is compiled in only for development builds, and it shows only when the manager also says so, so a dev build pointed at a normal manager never shows it.
This adds that runtime signal.
webui.Handlernow takeswebui.Options{DevUIIssueCopy bool}. WhenCRYPTOS_DEV_UI_ISSUE_COPY=trueis set, the manager adds<meta name="cryptos-dev-ui-issue-copy" content="true">to the servedindex.htmlonce at startup and logs that it is on. Otherwise the page is unchanged.Testing
TestHandlerInjectsDevUIIssueMetaOnlyWhenEnabledcovers the on and off cases throughServeHTTP.task cipasses.Docs
The README documents
CRYPTOS_DEV_UI_ISSUE_COPY.Refs CryptOS-PKI/cryptos-web#163