Skip to content

Commit

Permalink
Menu: move Embedded node from Settings
Browse files Browse the repository at this point in the history
  • Loading branch information
kaloudis committed Jul 21, 2024
1 parent 8654037 commit b51eeab
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 77 deletions.
103 changes: 67 additions & 36 deletions views/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { inject, observer } from 'mobx-react';
import { StackNavigationProp } from '@react-navigation/stack';

import AddIcon from '../assets/images/SVG/Add.svg';
import BlockIcon from '../assets/images/SVG/Block.svg';
import Bolt12Icon from '../assets/images/SVG/AtSign.svg';
import ForwardIcon from '../assets/images/SVG/Caret Right-3.svg';
import ContactIcon from '../assets/images/SVG/PeersContact.svg';
Expand Down Expand Up @@ -243,42 +244,6 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
</View>
)}

{implementation === 'embedded-lnd' && seedPhrase && (
<View
style={{
backgroundColor: themeColor('secondary'),
width: '90%',
borderRadius: 10,
alignSelf: 'center',
marginVertical: 5
}}
>
<TouchableOpacity
style={styles.columnField}
onPress={() => navigation.navigate('Seed')}
>
<View style={styles.icon}>
<KeyIcon
fill={themeColor('text')}
width={27}
height={27}
/>
</View>
<Text
style={{
...styles.columnText,
color: themeColor('text')
}}
>
{localeString('views.Settings.Seed.title')}
</Text>
<View style={styles.ForwardArrow}>
<ForwardIcon stroke={forwardArrowColor} />
</View>
</TouchableOpacity>
</View>
)}

<View
style={{
backgroundColor: themeColor('secondary'),
Expand Down Expand Up @@ -315,6 +280,72 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
</TouchableOpacity>
</View>

{implementation === 'embedded-lnd' && seedPhrase && (
<View
style={{
backgroundColor: themeColor('secondary'),
width: '90%',
borderRadius: 10,
alignSelf: 'center',
marginVertical: 5
}}
>
<TouchableOpacity
style={styles.columnField}
onPress={() => navigation.navigate('Seed')}
>
<View style={styles.icon}>
<KeyIcon
fill={themeColor('text')}
width={27}
height={27}
/>
</View>
<Text
style={{
...styles.columnText,
color: themeColor('text')
}}
>
{localeString('views.Settings.Seed.title')}
</Text>
<View style={styles.ForwardArrow}>
<ForwardIcon stroke={forwardArrowColor} />
</View>
</TouchableOpacity>

<View style={styles.separationLine} />

<TouchableOpacity
style={styles.columnField}
onPress={() =>
navigation.navigate('EmbeddedNodeSettings')
}
>
<View style={styles.icon}>
<BlockIcon
color={themeColor('text')}
width={27}
height={27}
/>
</View>
<Text
style={{
...styles.columnText,
color: themeColor('text')
}}
>
{localeString(
'views.Settings.EmbeddedNode.title'
)}
</Text>
<View style={styles.ForwardArrow}>
<ForwardIcon stroke={forwardArrowColor} />
</View>
</TouchableOpacity>
</View>
)}

{selectedNode && BackendUtils.supportsNodeInfo() && (
<View
style={{
Expand Down
41 changes: 0 additions & 41 deletions views/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
import { inject, observer } from 'mobx-react';
import { StackNavigationProp } from '@react-navigation/stack';

import BlockIcon from '../../assets/images/SVG/Block.svg';
import ForwardIcon from '../../assets/images/SVG/Caret Right-3.svg';
import ChannelsIcon from '../../assets/images/SVG/Channels.svg';
import PrivacyIcon from '../../assets/images/SVG/Eye On.svg';
Expand Down Expand Up @@ -88,46 +87,6 @@ export default class Settings extends React.Component<SettingsProps, {}> {
}}
keyboardShouldPersistTaps="handled"
>
{implementation === 'embedded-lnd' && (
<View
style={{
backgroundColor: themeColor('secondary'),
width: '90%',
borderRadius: 10,
alignSelf: 'center',
marginVertical: 5
}}
>
<TouchableOpacity
style={styles.columnField}
onPress={() =>
navigation.navigate('EmbeddedNodeSettings')
}
>
<View style={styles.icon}>
<BlockIcon
color={themeColor('text')}
width={27}
height={27}
/>
</View>
<Text
style={{
...styles.columnText,
color: themeColor('text')
}}
>
{localeString(
'views.Settings.EmbeddedNode.title'
)}
</Text>
<View style={styles.ForwardArrow}>
<ForwardIcon stroke={forwardArrowColor} />
</View>
</TouchableOpacity>
</View>
)}

{BackendUtils.supportsLSPs() && selectedNode && (
<View
style={{
Expand Down

0 comments on commit b51eeab

Please sign in to comment.