Skip to content

Commit

Permalink
feat: Improve the settings menu and add easy access via the top bar (#…
Browse files Browse the repository at this point in the history
…1144)

* Improve the settings menu and add easy access via the top bar

* change the size of the icons and  change margin between the 2 buttons

* refactor: renaming, fixed size, added params

* refactor: remove custom size, update icons

* refactor: showMenuItem > showInMainMenu

* refactor: rename showInMainMenu = showAddWebAppDialog

* fix snapshots

Co-authored-by: Alexey Kosinski <36693645+AlexeyKosinski@users.noreply.github.com>
  • Loading branch information
2 people authored and sirpy committed Jan 10, 2020
1 parent bdd3915 commit 08331a4
Show file tree
Hide file tree
Showing 17 changed files with 817 additions and 172 deletions.
Binary file modified src/assets/fonts/gooddollar.eot 100755 → 100644
Binary file not shown.
10 changes: 8 additions & 2 deletions src/assets/fonts/gooddollar.svg 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/assets/fonts/gooddollar.ttf 100755 → 100644
Binary file not shown.
Binary file modified src/assets/fonts/gooddollar.woff 100755 → 100644
Binary file not shown.
Binary file modified src/assets/fonts/gooddollar.woff2 100755 → 100644
Binary file not shown.
16 changes: 14 additions & 2 deletions src/components/appNavigation/TabsView.js
Expand Up @@ -108,7 +108,9 @@ const TabsView = React.memo((props: TabViewProps) => {
navigation.navigate('Rewards')
}
}

const goToSupport = () => {
navigation.navigate('Support')
}
const goToMarketplace = () => {
if (isIOS) {
const src = `${config.marketUrl}?jwt=${marketToken}&nofooter=true`
Expand All @@ -126,12 +128,20 @@ const TabsView = React.memo((props: TabViewProps) => {
</TouchableOpacity>
)}
<Appbar.Content />
<TouchableOpacity onPress={goToRewards}>
<Icon name="invite2" size={36} color="white" />
</TouchableOpacity>
<Appbar.Content />
{config.market && (
<TouchableOpacity onPress={goToMarketplace} style={styles.marketIconBackground}>
<Icon name="goodmarket" size={36} color="white" />
</TouchableOpacity>
)}
<Appbar.Content />
<TouchableOpacity onPress={goToSupport} style={styles.feedback}>
<Icon name="support2" size={36} color="white" />
</TouchableOpacity>
<Appbar.Content />
<TouchableOpacity onPress={toggleMenu}>
<Icon name="settings" size={20} color="white" style={styles.menuStyle} testID="burger_button" />
</TouchableOpacity>
Expand All @@ -148,7 +158,9 @@ const styles = ({ theme }) => ({
borderRadius: '50%',
paddingVertical: 20,
paddingHorizontal: 7,
marginRight: 14,
},
feedback: {
marginRight: 5,
},
rewardsStyle: {
marginLeft: 10,
Expand Down
Expand Up @@ -203,6 +203,193 @@ exports[`AppNavigation matches snapshot 1`] = `
}
/>
</div>
<div
className="css-view-1dbjc4n"
data-focusable={true}
onKeyDown={[Function]}
onKeyUp={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"MozTransitionProperty": "opacity",
"MozUserSelect": "none",
"WebkitTransitionDuration": "0.15s",
"WebkitTransitionProperty": "opacity",
"WebkitUserSelect": "none",
"cursor": "pointer",
"msTouchAction": "manipulation",
"msUserSelect": "none",
"touchAction": "manipulation",
"transitionDuration": "0.15s",
"transitionProperty": "opacity",
"userSelect": "none",
}
}
tabIndex="0"
>
<div
className="css-text-901oao"
dir="auto"
style={
Object {
"color": "rgba(255,255,255,1.00)",
"fontFamily": "gooddollar",
"fontSize": "36px",
"fontStyle": "normal",
"fontWeight": "normal",
}
}
>
</div>
</div>
<div
className="css-view-1dbjc4n"
data-focusable={true}
onKeyDown={[Function]}
onKeyUp={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"WebkitBoxFlex": 1,
"WebkitFlexBasis": "0%",
"WebkitFlexGrow": 1,
"WebkitFlexShrink": 1,
"cursor": "pointer",
"flexBasis": "0%",
"flexGrow": 1,
"flexShrink": 1,
"marginLeft": "8px",
"msFlexNegative": 1,
"msFlexPositive": 1,
"msFlexPreferredSize": "0%",
"msTouchAction": "manipulation",
"paddingLeft": "12px",
"paddingRight": "12px",
"touchAction": "manipulation",
}
}
tabIndex="0"
>
<h1
className="css-reset-4rbku5 css-text-901oao css-textOneLine-bfa6kz"
dir="auto"
role="heading"
style={
Object {
"color": "rgba(255,255,255,1.00)",
"direction": "ltr",
"fontFamily": "Roboto-Medium, Roboto, \\"Helvetica Neue\\", Helvetica, Arial, sans-serif",
"fontSize": "20px",
"textAlign": "left",
}
}
/>
</div>
<div
className="css-view-1dbjc4n"
data-focusable={true}
onKeyDown={[Function]}
onKeyUp={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"WebkitBoxFlex": 1,
"WebkitFlexBasis": "0%",
"WebkitFlexGrow": 1,
"WebkitFlexShrink": 1,
"cursor": "pointer",
"flexBasis": "0%",
"flexGrow": 1,
"flexShrink": 1,
"marginLeft": "8px",
"msFlexNegative": 1,
"msFlexPositive": 1,
"msFlexPreferredSize": "0%",
"msTouchAction": "manipulation",
"paddingLeft": "12px",
"paddingRight": "12px",
"touchAction": "manipulation",
}
}
tabIndex="0"
>
<h1
className="css-reset-4rbku5 css-text-901oao css-textOneLine-bfa6kz"
dir="auto"
role="heading"
style={
Object {
"color": "rgba(255,255,255,1.00)",
"direction": "ltr",
"fontFamily": "Roboto-Medium, Roboto, \\"Helvetica Neue\\", Helvetica, Arial, sans-serif",
"fontSize": "20px",
"textAlign": "left",
}
}
/>
</div>
<div
className="css-view-1dbjc4n"
data-focusable={true}
onKeyDown={[Function]}
onKeyUp={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"MozTransitionProperty": "opacity",
"MozUserSelect": "none",
"WebkitTransitionDuration": "0.15s",
"WebkitTransitionProperty": "opacity",
"WebkitUserSelect": "none",
"cursor": "pointer",
"marginRight": "5px",
"msTouchAction": "manipulation",
"msUserSelect": "none",
"touchAction": "manipulation",
"transitionDuration": "0.15s",
"transitionProperty": "opacity",
"userSelect": "none",
}
}
tabIndex="0"
>
<div
className="css-text-901oao"
dir="auto"
style={
Object {
"color": "rgba(255,255,255,1.00)",
"fontFamily": "gooddollar",
"fontSize": "36px",
"fontStyle": "normal",
"fontWeight": "normal",
}
}
>
</div>
</div>
<div
className="css-view-1dbjc4n"
data-focusable={true}
Expand Down

0 comments on commit 08331a4

Please sign in to comment.