diff --git a/packages/app-mobile/components/screens/ConfigScreen/FileSystemPathSelector.tsx b/packages/app-mobile/components/screens/ConfigScreen/FileSystemPathSelector.tsx index fef2eed7a7f..a603d1420ca 100644 --- a/packages/app-mobile/components/screens/ConfigScreen/FileSystemPathSelector.tsx +++ b/packages/app-mobile/components/screens/ConfigScreen/FileSystemPathSelector.tsx @@ -17,6 +17,7 @@ interface Props { styles: ConfigScreenStyles; settingMetadata: SettingItem; mode: 'read'|'readwrite'; + description: React.ReactNode|null; updateSettingValue: UpdateSettingValueCallback; } @@ -26,9 +27,11 @@ type ExtendedSelf = (typeof window.self) & { declare const self: ExtendedSelf; const pathSelectorStyles = StyleSheet.create({ - container: { - flexDirection: 'row', - alignItems: 'center', + innerContainer: { + paddingTop: 0, + paddingBottom: 0, + paddingLeft: 0, + paddingRight: 0, }, mainButton: { flexGrow: 1, @@ -95,7 +98,9 @@ const FileSystemPathSelector: FunctionComponent = props => { /> ); - return + const containerStyles = props.styles.getContainerStyle(!!props.description); + + const control = = props => { {fileSystemPath ? clearButton : null} ; + + if (!supported) return null; + return + {control} + {props.description} + ; }; export default FileSystemPathSelector; diff --git a/packages/app-mobile/components/screens/ConfigScreen/SettingComponent.tsx b/packages/app-mobile/components/screens/ConfigScreen/SettingComponent.tsx index 33eec599b49..748ffdaace1 100644 --- a/packages/app-mobile/components/screens/ConfigScreen/SettingComponent.tsx +++ b/packages/app-mobile/components/screens/ConfigScreen/SettingComponent.tsx @@ -124,16 +124,14 @@ const SettingComponent: React.FunctionComponent = props => { } else if (md.type === Setting.TYPE_STRING) { if (['sync.2.path', 'plugins.devPluginPaths'].includes(md.key) && (shim.fsDriver().isUsingAndroidSAF() || shim.mobilePlatform() === 'web')) { return ( - - - {descriptionComp} - + ); } diff --git a/packages/lib/models/settings/builtInMetadata.ts b/packages/lib/models/settings/builtInMetadata.ts index 8b9ba85111a..0b153543518 100644 --- a/packages/lib/models/settings/builtInMetadata.ts +++ b/packages/lib/models/settings/builtInMetadata.ts @@ -931,7 +931,13 @@ const builtInMetadata = (Setting: typeof SettingType) => { advanced: true, appTypes: [AppType.Desktop, AppType.Mobile], // For now, development plugins are only enabled on desktop & web. - show: () => shim.isElectron() || shim.mobilePlatform() === 'web', + show: (settings) => { + if (shim.isElectron()) return true; + if (shim.mobilePlatform() !== 'web') return false; + + const pluginSupportEnabled = settings['plugins.pluginSupportEnabled']; + return !!pluginSupportEnabled; + }, label: () => 'Development plugins', description: () => { if (shim.mobilePlatform()) {