Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed size of ArrowLeft icon, using our own Add icon for Nodes and Contacts (like channels) #1829

Merged
merged 1 commit into from
Nov 12, 2023
Merged
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
3 changes: 3 additions & 0 deletions assets/images/SVG/Arrow_left.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions assets/images/SVG/Back.svg

This file was deleted.

17 changes: 5 additions & 12 deletions assets/images/SVG/Olympus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 9 additions & 4 deletions components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import React from 'react';
import {
StyleProp,
TextStyle,
TouchableOpacity,
ViewStyle
ViewStyle,
TouchableOpacity
} from 'react-native';
import { Header, Icon, TextProps } from 'react-native-elements';
import { IconObject } from 'react-native-elements/dist/icons/Icon';

import { localeString } from '../utils/LocaleUtils';
import { themeColor } from '../utils/ThemeUtils';

import Back from '../assets/images/SVG/Back.svg';
import ArrowLeft from '../assets/images/SVG/Arrow_left.svg';

interface HeaderIcon extends IconObject {
icon?: string;
Expand Down Expand Up @@ -44,7 +44,12 @@ function ZeusHeader(props: HeaderProps) {
}}
accessibilityLabel={localeString('general.goBack')}
>
<Back stroke={themeColor('text')} />
<ArrowLeft
fill={themeColor('text')}
width="30"
height="30"
style={{ alignSelf: 'center' }}
/>
</TouchableOpacity>
);

Expand Down
36 changes: 13 additions & 23 deletions views/Settings/Contacts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
ScrollView
} from 'react-native';
import { SearchBar, Divider } from 'react-native-elements';
import AddIcon from '../../assets/images/SVG/Add.svg';
import Add from '../../assets/images/SVG/Add.svg';
import EncryptedStorage from 'react-native-encrypted-storage';

import { themeColor } from '../../utils/ThemeUtils';
Expand Down Expand Up @@ -227,25 +227,17 @@ export default class Contacts extends React.Component<
);
});

const Add = ({ navigation }: { navigation: any }) => (
<TouchableOpacity onPress={() => navigation.navigate('AddContact')}>
<View
style={{
width: 35,
height: 35,
borderRadius: 25,
backgroundColor: themeColor('chain'),
justifyContent: 'center',
alignItems: 'center'
}}
>
<AddIcon
fill={themeColor('background')}
width={20}
height={20}
style={{ alignSelf: 'center' }}
/>
</View>
const AddButton = () => (
<TouchableOpacity
onPress={() => navigation.navigate('AddContact')}
accessibilityLabel={localeString('general.add')}
>
<Add
fill={themeColor('text')}
width="30"
height="30"
style={{ alignSelf: 'center' }}
/>
</TouchableOpacity>
);

Expand All @@ -268,9 +260,7 @@ export default class Contacts extends React.Component<
containerStyle={{
borderBottomWidth: 0
}}
rightComponent={
!SendScreen && <Add navigation={navigation} />
}
rightComponent={!SendScreen && <AddButton />}
navigation={navigation}
/>
{contacts.length > 0 && (
Expand Down
19 changes: 12 additions & 7 deletions views/Settings/Nodes.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { FlatList, View, Text } from 'react-native';
import { FlatList, View, Text, TouchableOpacity } from 'react-native';
import { Icon, ListItem } from 'react-native-elements';
import { inject, observer } from 'mobx-react';

Expand All @@ -16,6 +16,8 @@ import { localeString } from '../../utils/LocaleUtils';
import { themeColor } from '../../utils/ThemeUtils';
import ChannelsStore from '../../stores/ChannelsStore';

import Add from '../../assets/images/SVG/Add.svg';

interface NodesProps {
nodes: any[];
navigation: any;
Expand Down Expand Up @@ -112,20 +114,23 @@ export default class Nodes extends React.Component<NodesProps, NodesState> {
});

const AddButton = () => (
<Icon
name="add"
<TouchableOpacity
onPress={() =>
navigation.navigate('NodeConfiguration', {
newEntry: true,
index:
(nodes && nodes.length && Number(nodes.length)) || 0
})
}
color={themeColor('text')}
underlayColor="transparent"
size={30}
accessibilityLabel={localeString('general.add')}
/>
>
<Add
fill={themeColor('text')}
width="30"
height="30"
style={{ alignSelf: 'center' }}
/>
</TouchableOpacity>
);

return (
Expand Down
2 changes: 1 addition & 1 deletion views/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default class Settings extends React.Component<
onPress={() => UrlUtils.goToUrl('https://olympusln.com')}
accessibilityLabel={localeString('views.Settings.olympus')}
>
<Olympus width="35" height="35" fill={themeColor('text')} />
<Olympus width="37" height="30" fill={themeColor('text')} />
</TouchableOpacity>
);

Expand Down