Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Commit

Permalink
Mobile: Fix minor bugs (#771)
Browse files Browse the repository at this point in the history
* Mobile: Fix global keyboard avoidance

* Mobile: Remove unused method

* Mobile: Reorder useExistingSeed UI

* Mobile: Minor visual fixes

* Mobile: Disable back swipe gesture on iOS

* Mobile: Fix animation direction when entering 2fa on login

* Mobile: Cleanup navigator object

* Mobile: Fix navigation animations

* Resolve conflicts
  • Loading branch information
cvarley100 authored and rajivshah3 committed Dec 12, 2018
1 parent 80fe0ae commit f54f1e9
Show file tree
Hide file tree
Showing 32 changed files with 80 additions and 279 deletions.
5 changes: 1 addition & 4 deletions src/desktop/src/ui/components/modal/Password.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,4 @@ const mapDispatchToProps = {
generateAlert,
};

export default connect(
null,
mapDispatchToProps,
)(withI18n()(ModalPassword));
export default connect(null, mapDispatchToProps)(withI18n()(ModalPassword));
5 changes: 1 addition & 4 deletions src/desktop/src/ui/global/Idle.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,4 @@ const mapDispatchToProps = {
setPassword,
};

export default connect(
mapStateToProps,
mapDispatchToProps,
)(Idle);
export default connect(mapStateToProps, mapDispatchToProps)(Idle);
2 changes: 1 addition & 1 deletion src/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,4 @@
"tls": false
},
"snyk": true
}
}
2 changes: 1 addition & 1 deletion src/mobile/src/ui/components/MultiTextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ class MultiTextInput extends Component {
{selectedTab === 'amount' && (
<AmountTextInput
label={null}
containerStyle={{ width: width / 1.25 }}
containerStyle={{ flex: 1 }}
denomination={denomination}
amount={amount}
multiplier={multiplier}
Expand Down
72 changes: 37 additions & 35 deletions src/mobile/src/ui/components/SeedVaultExportComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,41 +356,43 @@ class SeedVaultExportComponent extends Component {
</InfoBox>
</View>
<View style={styles.viewContainer}>
<Button
onPress={() => {
this.setState({ saveToDownloadFolder: true });
this.onExportPress();
}}
style={{
wrapper: {
width: width / 1.36,
height: height / 13,
borderRadius: height / 90,
backgroundColor: theme.secondary.color,
},
children: { color: theme.primary.body },
}}
>
{t('saveToDownloadFolder')}
</Button>
<View style={{ flex: 0.5 }} />
<Button
onPress={() => {
this.setState({ saveToDownloadFolder: false });
this.onExportPress();
}}
style={{
wrapper: {
width: width / 1.36,
height: height / 13,
borderRadius: height / 90,
backgroundColor: theme.secondary.color,
},
children: { color: theme.primary.body },
}}
>
{t('global:share')}
</Button>
<View>
<Button
onPress={() => {
this.setState({ saveToDownloadFolder: true });
this.onExportPress();
}}
style={{
wrapper: {
width: width / 1.36,
height: height / 13,
borderRadius: height / 90,
backgroundColor: theme.secondary.color,
marginBottom: height / 20,
},
children: { color: theme.primary.body },
}}
>
{t('saveToDownloadFolder')}
</Button>
<Button
onPress={() => {
this.setState({ saveToDownloadFolder: false });
this.onExportPress();
}}
style={{
wrapper: {
width: width / 1.36,
height: height / 13,
borderRadius: height / 90,
backgroundColor: theme.secondary.color,
},
children: { color: theme.primary.body },
}}
>
{t('global:share')}
</Button>
</View>
</View>
</Animated.View>
);
Expand Down
36 changes: 18 additions & 18 deletions src/mobile/src/ui/routes/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,24 @@ const onAppStart = () => {
};

const renderInitialScreen = (initialScreen, state, store) => {
Navigation.setDefaultOptions({
layout: {
backgroundColor: state.settings.theme.body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
background: {
color: 'black',
},
},
statusBar: {
drawBehind: false,
backgroundColor: state.settings.theme.body.bg,
},
});
Navigation.setRoot({
root: {
stack: {
Expand All @@ -71,24 +89,6 @@ const renderInitialScreen = (initialScreen, state, store) => {
{
component: {
name: initialScreen,
options: {
layout: {
backgroundColor: state.settings.theme.body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
background: {
color: state.settings.theme.body.bg,
},
},
statusBar: {
drawBehind: false,
backgroundColor: state.settings.theme.body.bg,
},
},
},
},
],
Expand Down
7 changes: 0 additions & 7 deletions src/mobile/src/ui/views/onboarding/EnterSeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,8 @@ class EnterSeed extends React.Component {
},
layout: {
backgroundColor: body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
},
statusBar: {
drawBehind: false,
backgroundColor: body.bg,
},
});
Expand Down
7 changes: 0 additions & 7 deletions src/mobile/src/ui/views/onboarding/LanguageSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,8 @@ class LanguageSetup extends Component {
},
layout: {
backgroundColor: body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
},
statusBar: {
drawBehind: false,
backgroundColor: !acceptedTerms || !acceptedPrivacy ? bar.bg : body.bg,
},
});
Expand Down
5 changes: 0 additions & 5 deletions src/mobile/src/ui/views/onboarding/NewSeedSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,18 +173,13 @@ class NewSeedSetup extends Component {
},
layout: {
backgroundColor: body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
title: {
color: body.color,
},
},
statusBar: {
drawBehind: false,
backgroundColor: body.bg,
},
});
Expand Down
7 changes: 0 additions & 7 deletions src/mobile/src/ui/views/onboarding/OnboardingComplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,8 @@ class OnboardingComplete extends Component {
},
layout: {
backgroundColor: body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
},
statusBar: {
drawBehind: false,
backgroundColor: body.bg,
},
});
Expand Down
7 changes: 0 additions & 7 deletions src/mobile/src/ui/views/onboarding/PrivacyPolicy.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,8 @@ class PrivacyPolicy extends Component {
},
layout: {
backgroundColor: body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
},
statusBar: {
drawBehind: false,
backgroundColor: body.bg,
},
});
Expand Down
7 changes: 0 additions & 7 deletions src/mobile/src/ui/views/onboarding/SaveSeedConfirmation.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,8 @@ class SaveSeedConfirmation extends Component {
},
layout: {
backgroundColor: body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
},
statusBar: {
drawBehind: false,
backgroundColor: body.bg,
},
});
Expand Down
21 changes: 0 additions & 21 deletions src/mobile/src/ui/views/onboarding/SaveYourSeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,8 @@ class SaveYourSeed extends Component {
},
layout: {
backgroundColor: body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
},
statusBar: {
drawBehind: false,
backgroundColor: body.bg,
},
});
Expand Down Expand Up @@ -161,15 +154,8 @@ class SaveYourSeed extends Component {
},
layout: {
backgroundColor: body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
},
statusBar: {
drawBehind: false,
backgroundColor: body.bg,
},
});
Expand All @@ -196,15 +182,8 @@ class SaveYourSeed extends Component {
},
layout: {
backgroundColor: body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
},
statusBar: {
drawBehind: false,
backgroundColor: body.bg,
},
});
Expand Down
8 changes: 0 additions & 8 deletions src/mobile/src/ui/views/onboarding/SeedReentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,8 @@ class SeedReentry extends Component {
},
layout: {
backgroundColor: body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
},
statusBar: {
drawBehind: false,
backgroundColor: body.bg,
},
});
Expand Down Expand Up @@ -190,7 +183,6 @@ class SeedReentry extends Component {
case 'qrScanner':
return this.props.toggleModalActivity(modalContent, {
theme,
print: () => this.print(),
hideModal: () => this.props.toggleModalActivity(),
onQRRead: (data) => this.onQRRead(data),
});
Expand Down
7 changes: 0 additions & 7 deletions src/mobile/src/ui/views/onboarding/SetAccountName.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,8 @@ export class SetAccountName extends Component {
},
layout: {
backgroundColor: body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
},
statusBar: {
drawBehind: false,
backgroundColor: body.bg,
},
});
Expand Down
7 changes: 0 additions & 7 deletions src/mobile/src/ui/views/onboarding/SetPassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,8 @@ class SetPassword extends Component {
},
layout: {
backgroundColor: body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
},
statusBar: {
drawBehind: false,
backgroundColor: body.bg,
},
});
Expand Down
7 changes: 0 additions & 7 deletions src/mobile/src/ui/views/onboarding/TermsAndConditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,8 @@ class TermsAndConditions extends Component {
},
layout: {
backgroundColor: body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
},
statusBar: {
drawBehind: false,
backgroundColor: bar.bg,
},
});
Expand Down
7 changes: 0 additions & 7 deletions src/mobile/src/ui/views/onboarding/WalletSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,8 @@ class WalletSetup extends Component {
},
layout: {
backgroundColor: body.bg,
orientation: ['portrait'],
},
topBar: {
visible: false,
drawBehind: false,
elevation: 0,
},
statusBar: {
drawBehind: false,
backgroundColor: body.bg,
},
});
Expand Down
Loading

0 comments on commit f54f1e9

Please sign in to comment.