From f1bae6d0e4cc05f0c9d84b8c45c75a49d0e773b4 Mon Sep 17 00:00:00 2001 From: tomivm Date: Wed, 12 Apr 2023 13:41:42 -0300 Subject: [PATCH 1/2] Hide the Export functionality on Cordova IOS until fix export on cordova ios --- src/components/Board/Navbar/Navbar.js | 4 +- src/components/Settings/Settings.component.js | 62 ++++++++++--------- 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/src/components/Board/Navbar/Navbar.js b/src/components/Board/Navbar/Navbar.js index 2aedf11cb..0c94b1dd4 100644 --- a/src/components/Board/Navbar/Navbar.js +++ b/src/components/Board/Navbar/Navbar.js @@ -17,7 +17,7 @@ import AnalyticsButton from '../../UI/AnalyticsButton'; import HelpButton from '../../UI/HelpButton'; import SettingsButton from '../../UI/SettingsButton'; import messages from '../Board.messages'; -import { isCordova, isAndroid } from '../../../cordova-util'; +import { isCordova, isAndroid, isIOS } from '../../../cordova-util'; import './Navbar.css'; import { injectIntl } from 'react-intl'; import PremiumFeature from '../../PremiumFeature'; @@ -152,7 +152,7 @@ export class Navbar extends React.Component {
{!isLocked && ( - + {!isIOS() && } {!isMobile.any && } {isLogged && !isCordova() && ( diff --git a/src/components/Settings/Settings.component.js b/src/components/Settings/Settings.component.js index 50dc9c1cd..f49940d57 100644 --- a/src/components/Settings/Settings.component.js +++ b/src/components/Settings/Settings.component.js @@ -25,7 +25,7 @@ import Paper from '@material-ui/core/Paper'; import UserIcon from '../UI/UserIcon'; import SettingsTour from './SettingsTour.component'; -import { isCordova, isAndroid } from '../../cordova-util'; +import { isCordova, isAndroid, isIOS } from '../../cordova-util'; import './Settings.css'; import { CircularProgress } from '@material-ui/core'; @@ -107,6 +107,38 @@ export class Settings extends PureComponent { peopleSettings.push(subscribeSection); } + const systemSettings = [ + { + icon: , + text: messages.import, + url: '/settings/import' + }, + { + icon: , + text: messages.display, + url: '/settings/display' + }, + { + icon: , + text: messages.scanning, + url: '/settings/scanning' + }, + { + icon: , + text: messages.navigation, + url: '/settings/navigation' + } + ]; + //only untill fix export on cordova IOS after that add it directly to the systemSetting array + if (!isIOS) { + const exportSetting = { + icon: , + text: messages.export, + url: '/settings/export' + }; + systemSettings.unshift(exportSetting); + } + return [ { subheader: messages.people, @@ -129,33 +161,7 @@ export class Settings extends PureComponent { }, { subheader: messages.system, - settings: [ - { - icon: , - text: messages.export, - url: '/settings/export' - }, - { - icon: , - text: messages.import, - url: '/settings/import' - }, - { - icon: , - text: messages.display, - url: '/settings/display' - }, - { - icon: , - text: messages.scanning, - url: '/settings/scanning' - }, - { - icon: , - text: messages.navigation, - url: '/settings/navigation' - } - ] + settings: systemSettings }, { subheader: messages.help, From fc866968940fac0c0f5210d7413682573e2313de Mon Sep 17 00:00:00 2001 From: tomivm Date: Wed, 12 Apr 2023 13:48:06 -0300 Subject: [PATCH 2/2] fix call to isIOS() --- src/components/Settings/Settings.component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Settings/Settings.component.js b/src/components/Settings/Settings.component.js index f49940d57..bea88f649 100644 --- a/src/components/Settings/Settings.component.js +++ b/src/components/Settings/Settings.component.js @@ -130,7 +130,7 @@ export class Settings extends PureComponent { } ]; //only untill fix export on cordova IOS after that add it directly to the systemSetting array - if (!isIOS) { + if (!isIOS()) { const exportSetting = { icon: , text: messages.export,