Mobile: Fix icon after react-native-vector-icon upgrade

pull/9026/head
Laurent Cozic 2023-10-07 17:25:03 +01:00
parent 26362146bc
commit 0e0c1d8395
9 changed files with 25 additions and 25 deletions

View File

@ -49,7 +49,7 @@ const ActionButton = (props: ActionButtonProps) => {
};
}), [props.buttons]);
const closedIcon = useIcon(props.mainButton?.icon ?? 'md-add');
const closedIcon = useIcon(props.mainButton?.icon ?? 'add');
const openIcon = useIcon('close');
return (

View File

@ -158,11 +158,11 @@ class CameraView extends Component {
}
public render() {
const photoIcon = this.state.snapping ? 'md-checkmark' : 'md-camera';
const photoIcon = this.state.snapping ? 'checkmark' : 'camera';
const displayRatios = this.supportsRatios() && this.state.ratios.length > 1;
const reverseCameraButton = this.renderButton(this.reverse_onPress, 'md-camera-reverse', { flex: 1, flexDirection: 'row', justifyContent: 'flex-start', marginLeft: 20 });
const reverseCameraButton = this.renderButton(this.reverse_onPress, 'camera-reverse', { flex: 1, flexDirection: 'row', justifyContent: 'flex-start', marginLeft: 20 });
const ratioButton = !displayRatios ? <View style={{ flex: 1 }}/> : this.renderButton(this.ratio_onPress, <Text style={{ fontWeight: 'bold', fontSize: 20 }}>{Setting.value('camera.ratio')}</Text>, { flex: 1, flexDirection: 'row', justifyContent: 'flex-end', marginRight: 20 });
let cameraRatio = '4:3';
@ -202,7 +202,7 @@ class CameraView extends Component {
<TouchableOpacity onPress={this.back_onPress}>
<View style={{ marginLeft: 5, marginTop: 5, borderColor: '#00000040', borderWidth: 1, borderStyle: 'solid', borderRadius: 90, width: 50, height: 50, display: 'flex', backgroundColor: '#ffffff77', justifyContent: 'center', alignItems: 'center' }}>
<Icon
name={'md-arrow-back'}
name={'arrow-back'}
style={{
fontSize: 40,
color: 'black',

View File

@ -308,7 +308,7 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
accessibilityHint={_('Show/hide the sidebar')}
accessibilityRole="button">
<View style={styles.sideMenuButton}>
<Icon name="md-menu" style={styles.topIcon} />
<Icon name="menu" style={styles.topIcon} />
</View>
</TouchableOpacity>
);
@ -324,7 +324,7 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
accessibilityRole="button">
<View style={disabled ? styles.backButtonDisabled : styles.backButton}>
<Icon
name="md-arrow-back"
name="arrow-back"
style={styles.topIcon}
/>
</View>
@ -337,7 +337,7 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
) {
if (!show) return null;
const icon = disabled ? <Icon name="md-checkmark" style={styles.savedButtonIcon} /> : <Image style={styles.saveButtonIcon} source={require('./SaveIcon.png')} />;
const icon = disabled ? <Icon name="checkmark" style={styles.savedButtonIcon} /> : <Image style={styles.saveButtonIcon} source={require('./SaveIcon.png')} />;
return (
<TouchableOpacity
@ -407,7 +407,7 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
description={_('Select all')}
contentStyle={styles.iconButton}
>
<Icon name="md-checkmark-circle-outline" style={styles.topIcon} />
<Icon name="checkmark-circle-outline" style={styles.topIcon} />
</CustomButton>
);
}
@ -421,7 +421,7 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
themeId={themeId}
contentStyle={styles.iconButton}
>
<Icon name="md-search" style={styles.topIcon} />
<Icon name="search" style={styles.topIcon} />
</CustomButton>
);
}
@ -439,7 +439,7 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
}
contentStyle={disabled ? styles.iconButtonDisabled : styles.iconButton}
>
<Icon name="md-trash" style={styles.topIcon} />
<Icon name="trash" style={styles.topIcon} />
</CustomButton>
);
}
@ -457,7 +457,7 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
}
contentStyle={disabled ? styles.iconButtonDisabled : styles.iconButton}
>
<Icon name="md-copy" style={styles.topIcon} />
<Icon name="copy" style={styles.topIcon} />
</CustomButton>
);
}
@ -602,7 +602,7 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
<Menu onSelect={value => this.menu_select(value)} style={this.styles().contextMenu}>
<MenuTrigger style={contextMenuStyle}>
<View accessibilityLabel={_('Actions')}>
<Icon name="md-ellipsis-vertical" style={this.styles().contextMenuTrigger} />
<Icon name="ellipsis-vertical" style={this.styles().contextMenuTrigger} />
</View>
</MenuTrigger>
<MenuOptions>

View File

@ -40,7 +40,7 @@ class Checkbox extends Component {
}
render() {
const iconName = this.state.checked ? 'md-checkbox-outline' : 'md-square-outline';
const iconName = this.state.checked ? 'checkbox-outline' : 'square-outline';
const style = this.props.style ? { ...this.props.style } : {};
style.justifyContent = 'center';

View File

@ -1406,7 +1406,7 @@ class NoteScreenComponent extends BaseScreenComponent {
const editButton = {
label: _('Edit'),
icon: 'md-create',
icon: 'create',
onPress: () => {
this.setState({ mode: 'edit' });

View File

@ -58,7 +58,7 @@ class NoteTagsDialogComponent extends React.Component {
this.renderTag = data => {
const tag = data.item;
const iconName = noteHasTag(tag.id) ? 'md-checkbox-outline' : 'md-square-outline';
const iconName = noteHasTag(tag.id) ? 'checkbox-outline' : 'square-outline';
return (
<TouchableOpacity key={tag.id} onPress={() => this.tag_press(tag.id)} style={this.styles().tag}>
<View style={this.styles().tagIconText}>

View File

@ -236,7 +236,7 @@ class NotesScreenComponent extends BaseScreenComponent<any> {
void this.newNoteNavigate(buttonFolderId, isTodo);
},
color: '#9b59b6',
icon: 'md-checkbox-outline',
icon: 'checkbox-outline',
});
buttons.push({
@ -246,7 +246,7 @@ class NotesScreenComponent extends BaseScreenComponent<any> {
void this.newNoteNavigate(buttonFolderId, isTodo);
},
color: '#9b59b6',
icon: 'md-document',
icon: 'document',
});
return <ActionButton buttons={buttons}/>;
}

View File

@ -190,7 +190,7 @@ class SearchScreenComponent extends BaseScreenComponent {
onPress={() => this.clearButton_press()}
accessibilityLabel={_('Clear')}
>
<Icon name="md-close-circle" style={this.styles().clearIcon} />
<Icon name="close-circle" style={this.styles().clearIcon} />
</TouchableHighlight>
</View>

View File

@ -421,15 +421,15 @@ const SideMenuContentComponent = (props: Props) => {
items.push(makeDivider('divider_1'));
items.push(renderSidebarButton('newFolder_button', _('New Notebook'), 'md-folder-open', newFolderButton_press));
items.push(renderSidebarButton('newFolder_button', _('New Notebook'), 'folder-open', newFolderButton_press));
items.push(renderSidebarButton('tag_button', _('Tags'), 'md-pricetag', tagButton_press));
items.push(renderSidebarButton('tag_button', _('Tags'), 'pricetag', tagButton_press));
if (props.profileConfig && props.profileConfig.profiles.length > 1) {
items.push(renderSidebarButton('switchProfile_button', _('Switch profile'), 'md-people-circle-outline', switchProfileButton_press));
items.push(renderSidebarButton('switchProfile_button', _('Switch profile'), 'people-circle-outline', switchProfileButton_press));
}
items.push(renderSidebarButton('config_button', _('Configuration'), 'md-settings', configButton_press));
items.push(renderSidebarButton('config_button', _('Configuration'), 'settings', configButton_press));
items.push(makeDivider('divider_2'));
@ -451,7 +451,7 @@ const SideMenuContentComponent = (props: Props) => {
if (resourceFetcherText) fullReport.push(resourceFetcherText);
if (decryptionReportText) fullReport.push(decryptionReportText);
items.push(renderSidebarButton('synchronize_button', !props.syncStarted ? _('Synchronise') : _('Cancel'), 'md-sync', synchronize_press));
items.push(renderSidebarButton('synchronize_button', !props.syncStarted ? _('Synchronise') : _('Cancel'), 'sync', synchronize_press));
if (fullReport.length) {
items.push(
@ -480,11 +480,11 @@ const SideMenuContentComponent = (props: Props) => {
// using padding. So instead creating blank elements for padding bottom and top.
items.push(<View style={{ height: theme.marginTop }} key="bottom_top_hack" />);
items.push(renderSidebarButton('all_notes', _('All notes'), 'md-document', allNotesButton_press, props.notesParentType === 'SmartFilter'));
items.push(renderSidebarButton('all_notes', _('All notes'), 'document', allNotesButton_press, props.notesParentType === 'SmartFilter'));
items.push(makeDivider('divider_all'));
items.push(renderSidebarButton('folder_header', _('Notebooks'), 'md-folder'));
items.push(renderSidebarButton('folder_header', _('Notebooks'), 'folder'));
if (props.folders.length) {
const result = shared.renderFolders(props, renderFolderItem, false);