Skip to content

Commit

Permalink
Made Show in popup always toggleable #995
Browse files Browse the repository at this point in the history
  • Loading branch information
ManeraKai committed Sep 15, 2024
1 parent 823af5a commit ef4bc14
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/pages/options_src/Services/Services.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -94,23 +94,23 @@
/>
</Row>

<div style={!serviceOptions.enabled && "pointer-events: none;opacity: 0.4;user-select: none;"}>
<Row>
<Label>{browser.i18n.getMessage("showInPopup") || "Show in popup"}</Label>
<Checkbox
checked={_options.popupServices.includes(selectedService)}
onChange={e => {
if (e.target.checked && !_options.popupServices.includes(selectedService)) {
_options.popupServices.push(selectedService)
} else if (_options.popupServices.includes(selectedService)) {
const index = _options.popupServices.indexOf(selectedService)
if (index !== -1) _options.popupServices.splice(index, 1)
}
options.set(_options)
}}
/>
</Row>
<Row>
<Label>{browser.i18n.getMessage("showInPopup") || "Show in popup"}</Label>
<Checkbox
checked={_options.popupServices.includes(selectedService)}
onChange={e => {
if (e.target.checked && !_options.popupServices.includes(selectedService)) {
_options.popupServices.push(selectedService)
} else if (_options.popupServices.includes(selectedService)) {
const index = _options.popupServices.indexOf(selectedService)
if (index !== -1) _options.popupServices.splice(index, 1)
}
options.set(_options)
}}
/>
</Row>

<div style={!serviceOptions.enabled && "pointer-events: none;opacity: 0.4;user-select: none;"}>
<Row>
<Label>
<a href={frontendWebsite} style="text-decoration: underline;" target="_blank" rel="noopener noreferrer">
Expand Down

0 comments on commit ef4bc14

Please sign in to comment.