Made Show in popup always toggleable https://github.com/libredirect/browser_extension/issues/995
This commit is contained in:
parent
823af5a0a3
commit
ef4bc14882
|
@ -94,23 +94,23 @@
|
||||||
/>
|
/>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<div style={!serviceOptions.enabled && "pointer-events: none;opacity: 0.4;user-select: none;"}>
|
<Row>
|
||||||
<Row>
|
<Label>{browser.i18n.getMessage("showInPopup") || "Show in popup"}</Label>
|
||||||
<Label>{browser.i18n.getMessage("showInPopup") || "Show in popup"}</Label>
|
<Checkbox
|
||||||
<Checkbox
|
checked={_options.popupServices.includes(selectedService)}
|
||||||
checked={_options.popupServices.includes(selectedService)}
|
onChange={e => {
|
||||||
onChange={e => {
|
if (e.target.checked && !_options.popupServices.includes(selectedService)) {
|
||||||
if (e.target.checked && !_options.popupServices.includes(selectedService)) {
|
_options.popupServices.push(selectedService)
|
||||||
_options.popupServices.push(selectedService)
|
} else if (_options.popupServices.includes(selectedService)) {
|
||||||
} else if (_options.popupServices.includes(selectedService)) {
|
const index = _options.popupServices.indexOf(selectedService)
|
||||||
const index = _options.popupServices.indexOf(selectedService)
|
if (index !== -1) _options.popupServices.splice(index, 1)
|
||||||
if (index !== -1) _options.popupServices.splice(index, 1)
|
}
|
||||||
}
|
options.set(_options)
|
||||||
options.set(_options)
|
}}
|
||||||
}}
|
/>
|
||||||
/>
|
</Row>
|
||||||
</Row>
|
|
||||||
|
|
||||||
|
<div style={!serviceOptions.enabled && "pointer-events: none;opacity: 0.4;user-select: none;"}>
|
||||||
<Row>
|
<Row>
|
||||||
<Label>
|
<Label>
|
||||||
<a href={frontendWebsite} style="text-decoration: underline;" target="_blank" rel="noopener noreferrer">
|
<a href={frontendWebsite} style="text-decoration: underline;" target="_blank" rel="noopener noreferrer">
|
||||||
|
|
Loading…
Reference in New Issue