Skip to content

Commit

Permalink
help, icons, bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
garrylachman committed Jul 8, 2021
1 parent f6c9171 commit f0b2ef7
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 16 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ android {
applicationId "com.reactnativexmrig"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 14
versionName "1.0.14"
versionCode 15
versionName "1.0.15"
externalNativeBuild {
cmake {
arguments "-DUV_INCLUDE_DIR=app/src/cpp/include"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reactnativexmrig",
"version": "1.0.14",
"version": "1.0.15",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand Down
4 changes: 2 additions & 2 deletions src/components/miner/components/miner/xmrig-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ type PoolViewProps = ViewProps & {

export const XMRigView = (props: PoolViewProps):React.ReactElement<PoolViewProps> => {

const RenderHashrateChartVictory = () => (
const RenderHashrateChartVictory = React.useCallback(() => (
<View style={{left: -25, bottom: -20, width: props.fullWidth}}>
<Shimmer opacity={0.8} tilt={30} direction="left" pauseDuration={2500}>
<VictoryArea width={props.fullWidth} padding={0} height={70} data={props.hashrateHistory} style={{data: { fill: 'rgba(134, 65, 244)'}}} interpolation="natural" standalone={true} />
</Shimmer>
</View>
)
), [props.fullWidth, props.hashrateHistory]);


return (
Expand Down
35 changes: 27 additions & 8 deletions src/components/miner/miner-navigator.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import React, { Component } from 'react';
import { LazyLoader } from '../core/lazy-loader';

import { BottomTabBarProps, createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { BottomNavigation, BottomNavigationTab } from '@ui-kitten/components';
import { BottomNavigation, BottomNavigationTab, Icon, IconProps } from '@ui-kitten/components';
import { SettingsContext, ThemeModes } from '../../core/settings';

const { Navigator, Screen } = createBottomTabNavigator();
Expand All @@ -22,29 +22,48 @@ const LazyOtherScreen = () => (<LazyLoader><OtherScreen /></LazyLoader>)
const SimpleMinerScreen = React.lazy(() => import('./screens/simple-young/simple-miner.screen'));
const LazySimpleMinerScreen = () => (<LazyLoader><SimpleMinerScreen /></LazyLoader>)

const MinerIcon = (props:IconProps) => (
<Icon {...props} name='cube'/>
);

const PoolIcon = (props:IconProps) => (
<Icon {...props} name='activity'/>
);

const LogIcon = (props:IconProps) => (
<Icon {...props} name='list'/>
);

const OtherIcon = (props:IconProps) => (
<Icon {...props} name='info'/>
);

const BottomTabBar:React.FC<BottomTabBarProps & { tabs: string[] }> = ({ navigation, state, tabs }) => (
const BottomTabBar:React.FC<BottomTabBarProps & { tabs: {name: string, icon: any}[] }> = ({ navigation, state, tabs }) => (
<BottomNavigation
selectedIndex={state.index}
onSelect={index => navigation.navigate(state.routeNames[index])}>
{tabs.map((tabTitle:string, tabIndex:number) => (
<BottomNavigationTab title={tabTitle} key={`BottomTabBar-${tabIndex}`}/>
{tabs.map((tab:{name: string, icon: any}, tabIndex:number) => (
<BottomNavigationTab title={tab.name} icon={tab.icon} key={`BottomTabBar-${tabIndex}`}/>
))}
</BottomNavigation>
);

const AdvancedTabNavigator = () => (
<Navigator tabBar={props => <BottomTabBar {...props} tabs={['MINER', 'POOL', 'LOG', 'OTHER']} />}>
<Screen name='Miner' component={LazyMinerScreen}/>
<Navigator tabBar={props => <BottomTabBar {...props} tabs={[
{name: 'MINER', icon: MinerIcon},
{name: 'POOL', icon: PoolIcon},
{name: 'LOG', icon: LogIcon},
{name: 'OTHER', icon: OtherIcon}
]} />}>
<Screen name='Miner' component={LazyMinerScreen} />
<Screen name='Pool' component={LazyPoolScreen}/>
<Screen name='Log' component={LazyLogScreen}/>
<Screen name='Other' component={LazyOtherScreen}/>
</Navigator>
);

const SimpleYoungTabNavigator = () => (
<Navigator tabBar={props => <BottomTabBar {...props} tabs={['MINER']} />}>
<Navigator tabBar={props => <BottomTabBar {...props} tabs={[{name: 'MINER', icon: MinerIcon}]} />}>
<Screen name='Miner' component={LazySimpleMinerScreen}/>
</Navigator>
);
Expand Down
54 changes: 54 additions & 0 deletions src/components/settings/screens/help.screen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import React from 'react';
import { StyleSheet, Linking, View } from 'react-native';
import { Layout, Text } from '@ui-kitten/components';

const HelpScreen = () => {


return (
<Layout style={styles.layout} level='2'>
<View style={styles.cards}>
<Text category='h2'>Help</Text>
<Text category='h5' style={styles.title}>How to create a wallet?</Text>
<Text category="p1">
Before you start mining you must have a Monero wallet. You can create a wallet for free using one of the wallet website/applications.
</Text>
<Text category='h6' style={styles.title}>Create wallet using Application</Text>
<Text category="p1">
You can use one of these application from Google Play:
</Text>
<Text category="c1">* MyMonero: Send money privately</Text>
<Text category="c1">* Monero Wallet. Buy & Exchange XMR coins</Text>
<Text category="c1">* Cake Wallet</Text>
<Text category="c1">* Exodus: Crypto Bitcoin Wallet</Text>
<Text category="c1">* Edge - Bitcoin, Ethereum, Monero, Ripple Wallet</Text>
<Text category='h6' style={styles.title}>Create wallet using Website</Text>
<Text category="c1" style={styles.link} onPress={() => Linking.openURL('https://wallet.mymonero.com/')}>* https://wallet.mymonero.com/</Text>
<Text category="c1" style={styles.link} onPress={() => Linking.openURL('https://www.xmrwallet.com/')}>* https://www.xmrwallet.com/</Text>
<Text category="c1" style={styles.link} onPress={() => Linking.openURL('https://guarda.co/app/')}>* https://guarda.co/app/</Text>
<Text category="c1" style={styles.link} onPress={() => Linking.openURL('https://app.freewallet.org/')}>* https://app.freewallet.org/</Text>
<Text category="c1" style={styles.link} onPress={() => Linking.openURL('https://www.cryptonator.com/about/xmr')}>* https://www.cryptonator.com/about/xmr</Text>
</View>
</Layout>
)
}

const styles = StyleSheet.create({
layout: {
flex: 1,
padding: 15
},
title: {
paddingVertical: 5,
},
link: {
color: 'blue'
},
cards: {
flex: 1,
flexDirection: 'column',
justifyContent: 'flex-start',
}
});

export default HelpScreen;
21 changes: 18 additions & 3 deletions src/components/settings/settings-navigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,46 @@ import React from 'react';
import { LazyLoader } from '../core/lazy-loader';

import { BottomTabBarProps, createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { BottomNavigation, BottomNavigationTab } from '@ui-kitten/components';
import { BottomNavigation, BottomNavigationTab, Icon, IconProps } from '@ui-kitten/components';

const { Navigator, Screen } = createBottomTabNavigator();



const WalletScreen = React.lazy(() => import('./screens/wallet.screen'));
const AppearanceScreen = React.lazy(() => import('./screens/appearance.screen'));
const HelpScreen = React.lazy(() => import('./screens/help.screen'));

const LazyWalletScreen = () => (<LazyLoader><WalletScreen /></LazyLoader>)
const LazyAppearanceScreen = () => (<LazyLoader><AppearanceScreen /></LazyLoader>)
const LazyHelpScreen = () => (<LazyLoader><HelpScreen /></LazyLoader>)

const WalletIcon = (props:IconProps) => (
<Icon {...props} name='credit-card'/>
);

const AppearanceIcon = (props:IconProps) => (
<Icon {...props} name='brush'/>
);

const HelpIcon = (props:IconProps) => (
<Icon {...props} name='question-mark-circle'/>
);

const BottomTabBar:React.FC<BottomTabBarProps> = ({ navigation, state }) => (
<BottomNavigation
selectedIndex={state.index}
onSelect={index => navigation.navigate(state.routeNames[index])}>
<BottomNavigationTab title='WALLET'/>
<BottomNavigationTab title='APPERANCE'/>
<BottomNavigationTab title='WALLET' icon={WalletIcon}/>
<BottomNavigationTab title='HELP' icon={HelpIcon}/>
<BottomNavigationTab title='APPERANCE' icon={AppearanceIcon}/>
</BottomNavigation>
);

export const TabNavigator = () => (
<Navigator tabBar={props => <BottomTabBar {...props} />}>
<Screen name='Wallet' component={LazyWalletScreen}/>
<Screen name='Help' component={LazyHelpScreen}/>
<Screen name='Appearance' component={LazyAppearanceScreen}/>
</Navigator>
);
Expand Down

0 comments on commit f0b2ef7

Please sign in to comment.