Cleanup usages of isMono

This commit is contained in:
Mark McDowall 2022-05-29 18:07:45 -07:00
parent d3018fb501
commit fbe412d847
5 changed files with 11 additions and 12 deletions

View File

@ -100,7 +100,6 @@ class GeneralSettings extends Component {
settings, settings,
hasSettings, hasSettings,
isResettingApiKey, isResettingApiKey,
isMono,
isWindows, isWindows,
isWindowsService, isWindowsService,
mode, mode,
@ -166,7 +165,7 @@ class GeneralSettings extends Component {
<UpdateSettings <UpdateSettings
advancedSettings={advancedSettings} advancedSettings={advancedSettings}
settings={settings} settings={settings}
isMono={isMono} isWindows={isWindows}
packageUpdateMechanism={packageUpdateMechanism} packageUpdateMechanism={packageUpdateMechanism}
onInputChange={onInputChange} onInputChange={onInputChange}
/> />
@ -208,7 +207,6 @@ GeneralSettings.propTypes = {
settings: PropTypes.object.isRequired, settings: PropTypes.object.isRequired,
isResettingApiKey: PropTypes.bool.isRequired, isResettingApiKey: PropTypes.bool.isRequired,
hasSettings: PropTypes.bool.isRequired, hasSettings: PropTypes.bool.isRequired,
isMono: PropTypes.bool.isRequired,
isWindows: PropTypes.bool.isRequired, isWindows: PropTypes.bool.isRequired,
isWindowsService: PropTypes.bool.isRequired, isWindowsService: PropTypes.bool.isRequired,
mode: PropTypes.string.isRequired, mode: PropTypes.string.isRequired,

View File

@ -24,7 +24,6 @@ function createMapStateToProps() {
return { return {
advancedSettings, advancedSettings,
isResettingApiKey, isResettingApiKey,
isMono: systemStatus.isMono,
isWindows: systemStatus.isWindows, isWindows: systemStatus.isWindows,
isWindowsService: systemStatus.isWindows && systemStatus.mode === 'service', isWindowsService: systemStatus.isWindows && systemStatus.mode === 'service',
mode: systemStatus.mode, mode: systemStatus.mode,

View File

@ -16,7 +16,7 @@ function UpdateSettings(props) {
const { const {
advancedSettings, advancedSettings,
settings, settings,
isMono, isWindows,
packageUpdateMechanism, packageUpdateMechanism,
onInputChange onInputChange
} = props; } = props;
@ -68,7 +68,8 @@ function UpdateSettings(props) {
</FormGroup> </FormGroup>
{ {
isMono && isWindows ?
null :
<div> <div>
<FormGroup <FormGroup
advancedSettings={advancedSettings} advancedSettings={advancedSettings}
@ -129,7 +130,7 @@ function UpdateSettings(props) {
UpdateSettings.propTypes = { UpdateSettings.propTypes = {
advancedSettings: PropTypes.bool.isRequired, advancedSettings: PropTypes.bool.isRequired,
settings: PropTypes.object.isRequired, settings: PropTypes.object.isRequired,
isMono: PropTypes.bool.isRequired, isWindows: PropTypes.bool.isRequired,
packageUpdateMechanism: PropTypes.string.isRequired, packageUpdateMechanism: PropTypes.string.isRequired,
onInputChange: PropTypes.func.isRequired onInputChange: PropTypes.func.isRequired
}; };

View File

@ -50,7 +50,7 @@ class MediaManagement extends Component {
error, error,
settings, settings,
hasSettings, hasSettings,
isMono, isWindows,
onInputChange, onInputChange,
onSavePress, onSavePress,
...otherProps ...otherProps
@ -147,7 +147,8 @@ class MediaManagement extends Component {
</FormGroup> </FormGroup>
{ {
isMono && isWindows ?
null :
<FormGroup <FormGroup
advancedSettings={advancedSettings} advancedSettings={advancedSettings}
isAdvanced={true} isAdvanced={true}
@ -357,7 +358,7 @@ class MediaManagement extends Component {
</FieldSet> </FieldSet>
{ {
advancedSettings && isMono && advancedSettings && !isWindows &&
<FieldSet <FieldSet
legend="Permissions" legend="Permissions"
> >
@ -432,7 +433,7 @@ MediaManagement.propTypes = {
error: PropTypes.object, error: PropTypes.object,
settings: PropTypes.object.isRequired, settings: PropTypes.object.isRequired,
hasSettings: PropTypes.bool.isRequired, hasSettings: PropTypes.bool.isRequired,
isMono: PropTypes.bool.isRequired, isWindows: PropTypes.bool.isRequired,
onSavePress: PropTypes.func.isRequired, onSavePress: PropTypes.func.isRequired,
onInputChange: PropTypes.func.isRequired onInputChange: PropTypes.func.isRequired
}; };

View File

@ -22,7 +22,7 @@ function createMapStateToProps() {
advancedSettings, advancedSettings,
...sectionSettings, ...sectionSettings,
hasPendingChanges: !_.isEmpty(namingSettings.pendingChanges) || sectionSettings.hasPendingChanges, hasPendingChanges: !_.isEmpty(namingSettings.pendingChanges) || sectionSettings.hasPendingChanges,
isMono: systemStatus.isMono isWindows: systemStatus.isWindows
}; };
} }
); );