diff --git a/src/components/SettingsWindow.jsx b/src/components/SettingsWindow.jsx index 0c2c71c4..d7c88ab9 100644 --- a/src/components/SettingsWindow.jsx +++ b/src/components/SettingsWindow.jsx @@ -861,6 +861,39 @@ export default class SettingsWindow extends PureComponent { } } + getSkipRestoreMonitors = () => { + try { + if (this.state.monitors == undefined || Object.keys(this.state.monitors).length == 0) { + return () + } else { + return Object.values(this.state.monitors).map((monitor, index) => { + + return ( + + { this.setSkipRestoreMonitor(e.target.checked, monitor) }} checked={(this.state.rawSettings?.userSkipReapply?.indexOf(monitor.hwid[1]) >= 0 ? true : false)} data-checked={(this.state.rawSettings?.userSkipReapply?.indexOf(monitor.hwid[1]) >= 0 ? true : false)} type="checkbox" /> + + } /> + ) + + }) + } + } catch (e) { + console.log(e) + } + } + + setSkipRestoreMonitor = (value, monitor) => { + const userSkipReapply = this.state.rawSettings?.userSkipReapply + const index = this.state.rawSettings?.userSkipReapply?.indexOf(monitor.hwid[1]) + if(index >= 0 && !value) { + userSkipReapply.splice(index, 1) + } else if(index === -1 && value) { + userSkipReapply.push(monitor.hwid[1]) + } + this.setSetting("userSkipReapply", userSkipReapply) + } + @@ -1081,6 +1114,10 @@ export default class SettingsWindow extends PureComponent { + + {this.getSkipRestoreMonitors()} + + {T.t("SETTINGS_GENERAL_RESET_BUTTON")}} />