
morgan pushed to branch tor-browser-128.1.0esr-14.0-1 at The Tor Project / Applications / Tor Browser Commits: ab241f69 by Henry Wilkes at 2024-08-07T21:22:16+00:00 fixup! Customize moz-toggle for tor-browser. Bug 42612: Reimplement the moz-toggle customization for 128 ESR. - - - - - 1 changed file: - toolkit/content/widgets/moz-toggle/moz-toggle.mjs Changes: ===================================== toolkit/content/widgets/moz-toggle/moz-toggle.mjs ===================================== @@ -34,6 +34,10 @@ export default class MozToggle extends MozLitElement { description: { type: String }, ariaLabel: { type: String, attribute: "aria-label" }, accessKey: { type: String, attribute: "accesskey" }, + // Extension for tor-browser. Used for tor-browser#41333. + title: { type: String, attribute: "title" }, + // Extension for tor-browser. Used for tor-browser#40837. + labelAlignAfter: { type: Boolean, attribute: "label-align-after" }, }; static get queries() { @@ -111,7 +115,11 @@ export default class MozToggle extends MozLitElement { } render() { - // TODO: Reimplement labelAlignAfter! + // For tor-browser, we want to be able to place the label after the toggle + // as well. + // Used for the enable-bridges switch tor-browser#40837. + const labelAlignAfter = this.labelAlignAfter; + return html` <link rel="stylesheet" @@ -126,11 +134,12 @@ export default class MozToggle extends MozLitElement { for="moz-toggle-button" accesskey=${ifDefined(this.accessKey)} > + ${labelAlignAfter ? this.buttonTemplate() : ""} <span> ${this.label} ${!this.description ? this.supportLinkTemplate() : ""} </span> - ${this.buttonTemplate()} + ${labelAlignAfter ? "" : this.buttonTemplate()} </label> ` : this.buttonTemplate()} View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/ab241f69... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/ab241f69... You're receiving this email because of your account on gitlab.torproject.org.
participants (1)
-
morgan (@morgan)