Skip to content
Snippets Groups Projects
Commit ab241f69 authored by henry's avatar henry Committed by morgan
Browse files

fixup! Customize moz-toggle for tor-browser.

Bug 42612: Reimplement the moz-toggle customization for 128 ESR.
parent 5921a342
No related branches found
No related tags found
1 merge request!1066Re-implement moz-toggle customizations
Pipeline #192464 passed
......@@ -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()}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment