[GENERIC viewer] Display a warning message, using the errorWrapper
, for documents with signatures (PR 13214 follow-up, issue 13215)
#13217
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.
To simplify the overall implementation, given that it only applies to the GENERIC-viewer, this patch purposely re-uses the existing
errorWrapper
-functionality to display the message.While that one is mostly intended for actual errors, by re-using it here we considerably reduce the amount of code/complexity necessary for supporting this new warning. It's obviously possible to re-factor/improve this later on, but the patch should do just fine here since it'll indeed inform users (of the GENERIC-viewer) about unverified signatures.
Finally this patch also tweaks the background-color of the
errorWrapper
, making it 20 percent lighter respectively darker (depending on the theme) to make it "stand out" a little bit less.[1] While it may perhaps be useful to re-style/re-factor theerrorWrapper
, this patch probably isn't the right place for doing that.Fixes #13215
[1] Note how in the MOZCENTRAL-viewer, which instead uses the browser notification-bar, we're purposely using a neutral colour to not draw too much attention to the notification-bar.