richard pushed to branch tor-browser-115.2.1esr-13.0-1 at The Tor Project / Applications / Tor Browser
Commits: 0ce95033 by Henry Wilkes at 2023-09-15T20:11:51+00:00 fixup! Bug 30237: Add v3 onion services client authentication prompt
Bug 42092: Fix layout styling of saved onion keys dialog.
- - - - -
3 changed files:
- browser/components/onionservices/content/authPreferences.css - browser/components/onionservices/content/savedKeysDialog.js - browser/components/onionservices/content/savedKeysDialog.xhtml
Changes:
===================================== browser/components/onionservices/content/authPreferences.css ===================================== @@ -3,7 +3,11 @@ @import url("chrome://browser/skin/browser-colors.css");
#torOnionServiceKeys-overview-container { - margin-right: 30px; + margin-inline-end: 30px; +} + +#onionservices-savedkeys-dialog { + min-width: 45em; }
#onionservices-savedkeys-tree treechildren::-moz-tree-cell-text { @@ -11,14 +15,17 @@ }
#onionservices-savedkeys-errorContainer { - margin-top: 4px; + margin-block-start: 4px; min-height: 3em; }
+#onionservices-savedkeys-errorContainer:not(.show-error) { + visibility: hidden; +} + #onionservices-savedkeys-errorIcon { - margin-right: 4px; + margin-inline-end: 4px; list-style-image: url("chrome://global/skin/icons/warning.svg"); -moz-context-properties: fill; fill: var(--warning-color); - visibility: hidden; }
===================================== browser/components/onionservices/content/savedKeysDialog.js ===================================== @@ -189,10 +189,10 @@ var gOnionServicesSavedKeysDialog = { },
_showError(aMessage) { - const dialog = document.querySelector(this.selector.dialog); - const errorIcon = dialog.querySelector(this.selector.errorIcon); - errorIcon.style.visibility = aMessage ? "visible" : "hidden"; - const errorDesc = dialog.querySelector(this.selector.errorMessage); + document + .getElementById("onionservices-savedkeys-errorContainer") + .classList.toggle("show-error", !!aMessage); + const errorDesc = document.querySelector(this.selector.errorMessage); errorDesc.textContent = aMessage ? aMessage : ""; },
===================================== browser/components/onionservices/content/savedKeysDialog.xhtml ===================================== @@ -9,7 +9,6 @@ id="onionservices-savedkeys-dialog" windowtype="OnionServices:SavedKeys" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" - style="width: 45em"
<script src="chrome://browser/content/onionservices/savedKeysDialog.js" />
@@ -23,8 +22,6 @@ id="onionservices-savedkeys-tree" flex="1" hidecolumnpicker="true" - width="750" - style="height: 20em" onselect="gOnionServicesSavedKeysDialog.updateButtonsState();" > <treecols> @@ -38,7 +35,7 @@ </treecols> <treechildren /> </tree> - <hbox id="onionservices-savedkeys-errorContainer" align="baseline" flex="1"> + <hbox id="onionservices-savedkeys-errorContainer" align="center"> <image id="onionservices-savedkeys-errorIcon" /> <description id="onionservices-savedkeys-errorMessage" flex="1" /> </hbox>
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/0ce95033...