Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 62 additions & 60 deletions views/Channels/Channel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ import {
Image
} from 'react-native';

import {
Button as ElementButton,
Divider,
Icon,
ListItem
} from '@rneui/themed';
import { Button as ElementButton, Divider } from '@rneui/themed';
import { inject, observer } from 'mobx-react';
import { Route } from '@react-navigation/native';
import { StackNavigationProp } from '@react-navigation/stack';
Expand Down Expand Up @@ -891,43 +886,41 @@ export default class ChannelView extends React.Component<
/>
)}
{!!pending_htlcs && pending_htlcs.length > 0 && (
<ListItem
containerStyle={{
backgroundColor: 'transparent',
marginLeft: -13,
marginRight: -20
}}
<TouchableOpacity
onPress={() =>
navigation.navigate('PendingHTLCs', {
pending_htlcs
})
}
>
<ListItem.Content>
<ListItem.Title
style={{
color: themeColor('highlight'),
fontFamily: 'PPNeueMontreal-Book'
}}
>
<View style={{ flexDirection: 'row' }}>
<View style={styles.tappableRow}>
<Row justify="space-between">
<Row>
<HourglassIcon
fill={themeColor('highlight')}
width={17}
height={17}
style={{ marginRight: 5 }}
/>
</View>
{`${localeString(
'views.PendingHTLCs.title'
)} (${pending_htlcs.length})`}
</ListItem.Title>
</ListItem.Content>
<Icon
name="keyboard-arrow-right"
color={themeColor('secondaryText')}
/>
</ListItem>
<Text
style={{
...styles.tappableRowText,
color: themeColor('highlight')
}}
>
{`${localeString(
'views.PendingHTLCs.title'
)} (${pending_htlcs.length})`}
</Text>
</Row>
<CaretRight
fill={themeColor('secondaryText')}
width="20"
height="20"
/>
</Row>
</View>
</TouchableOpacity>
)}

<Divider orientation="horizontal" style={{ margin: 20 }} />
Expand Down Expand Up @@ -1096,35 +1089,38 @@ export default class ChannelView extends React.Component<
NodeInfoStore.nodeInfo?.version
) &&
channelId && (
<ListItem
containerStyle={{
backgroundColor: 'transparent',
marginLeft: -13,
marginRight: -20
}}
onPress={() =>
navigation.navigate('Routing', {
filterChanIdIn: channelId
})
}
>
<ListItem.Content>
<ListItem.Title
style={{
color: themeColor('text'),
fontFamily: 'PPNeueMontreal-Book'
}}
>
{localeString(
'views.Channel.routingHistory'
)}
</ListItem.Title>
</ListItem.Content>
<Icon
name="keyboard-arrow-right"
color={themeColor('secondaryText')}
<>
<Divider
orientation="horizontal"
style={{ margin: 20 }}
/>
</ListItem>
<TouchableOpacity
onPress={() =>
navigation.navigate('Routing', {
filterChanIdIn: channelId
})
}
>
<View style={styles.tappableRow}>
<Row justify="space-between">
<Text
style={styles.tappableRowText}
>
{localeString(
'views.Channel.routingHistory'
)}
</Text>
<CaretRight
fill={themeColor(
'secondaryText'
)}
width="20"
height="20"
/>
</Row>
</View>
</TouchableOpacity>
</>
)}
{BackendUtils.supportsBumpFee() && pendingOpen && (
<View style={styles.button}>
Expand Down Expand Up @@ -1344,7 +1340,7 @@ const styles = StyleSheet.create({
},
status: {
fontFamily: 'PPNeueMontreal-Book',
margin: 18,
marginVertical: 18,
flex: 1,
flexDirection: 'row',
textAlign: 'center'
Expand Down Expand Up @@ -1375,5 +1371,11 @@ const styles = StyleSheet.create({
height: 50,
borderRadius: 25,
marginRight: 14
},
tappableRow: {
paddingVertical: 10
},
tappableRowText: {
fontSize: 16
}
});
77 changes: 30 additions & 47 deletions views/POS/ProductDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import InventoryStore from '../../stores/InventoryStore';
import UnitsStore from '../../stores/UnitsStore';
import { inject, observer } from 'mobx-react';
import { v4 as uuidv4 } from 'uuid';
import { Divider, ListItem } from '@rneui/themed';
import { Divider } from '@rneui/themed';
import { Route } from '@react-navigation/native';
import { StackNavigationProp } from '@react-navigation/stack';

Expand Down Expand Up @@ -309,10 +309,9 @@ export default class ProductDetails extends React.Component<
{!isLoading && (
<View
style={{
padding:
paddingVertical:
Platform.OS === 'ios' ? 8 : 0,
paddingLeft: 15,
paddingRight: 15
paddingHorizontal: 15
}}
>
<View>
Expand Down Expand Up @@ -388,8 +387,6 @@ export default class ProductDetails extends React.Component<
color: themeColor(
'secondaryText'
),
fontFamily:
'PPNeueMontreal-Book',
marginBottom: 5
}}
infoModalText={localeString(
Expand Down Expand Up @@ -431,61 +428,41 @@ export default class ProductDetails extends React.Component<
}}
values={this.state.categories}
/>
<ListItem
containerStyle={{
borderBottomWidth: 0,
backgroundColor: 'transparent'
}}
>
<ListItem.Title
<View style={styles.switchRow}>
<Text
style={{
color: themeColor(
'secondaryText'
),
fontFamily:
'PPNeueMontreal-Book',
left: -10
fontSize: 17
}}
>
{localeString('general.active')}
</ListItem.Title>
<View
style={{
flex: 1,
flexDirection: 'row',
justifyContent: 'flex-end'
</Text>
<Switch
value={
product?.status ===
ProductStatus.Inactive
? false
: true
}
onValueChange={async (
value: boolean
) => {
this.setValue(
'status',
value
);
}}
>
<Switch
value={
product?.status ===
ProductStatus.Inactive
? false
: true
}
onValueChange={async (
value: boolean
) => {
this.setValue(
'status',
value
);
}}
/>
</View>
</ListItem>
/>
</View>
</View>
)}
<Divider
orientation="horizontal"
style={{ marginTop: 6 }}
/>
<View
style={{
paddingHorizontal: 20,
paddingVertical: 20
}}
>
<View style={{ padding: 20 }}>
<Button
title={localeString(
'views.Settings.POS.saveProduct'
Expand Down Expand Up @@ -538,5 +515,11 @@ const styles = StyleSheet.create({
width: '100%',
fontFamily: 'PPNeueMontreal-Book',
top: 5
},
switchRow: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
paddingVertical: 16
}
});
Loading