Skip to content
Snippets Groups Projects
Commit 693c411b 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 8d7768b5
Branches
Tags
2 merge requests!1202Bug_43099: 2024 YEC Strings,!1136Bug 43085: Rebased alpha onto 128.2.0esr
......@@ -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.
Please to comment