Skip to content

Commit

Permalink
Always show power toggle if manually enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
xanderfrangos committed Jan 12, 2025
1 parent b250a2d commit 45d3a08
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/BrightnessPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ export default class BrightnessPanel extends PureComponent {
this.forceUpdate()
}
const showPowerButton = () => {
if(monitorFeatures?.["0xD6"] && monitor.features?.["0xD6"]) {
const customFeatureEnabled = window.settings?.monitorFeaturesSettings?.[monitor?.hwid[1]]?.["0xD6"]
if(monitorFeatures?.["0xD6"] && (monitor.features?.["0xD6"] || customFeatureEnabled)) {
return (<div className="feature-power-icon simple" onClick={powerOff}><span className="icon vfix">&#xE7E8;</span><span>{(monitor.features?.["0xD6"][0] >= 4 ? T.t("PANEL_LABEL_TURN_ON") : T.t("PANEL_LABEL_TURN_OFF"))}</span></div>)
}
}
Expand Down

0 comments on commit 45d3a08

Please sign in to comment.