You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-10 22:11:50 +02:00
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react';
|
||||
import { PureComponent, ReactElement } from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { View, Text, StyleSheet, TouchableOpacity, Image, ViewStyle, Platform } from 'react-native';
|
||||
import { View, Text, StyleSheet, TouchableOpacity, ViewStyle, Platform } from 'react-native';
|
||||
const Icon = require('react-native-vector-icons/Ionicons').default;
|
||||
import BackButtonService from '../../services/BackButtonService';
|
||||
import NavService from '@joplin/lib/services/NavService';
|
||||
@@ -129,7 +129,10 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
|
||||
flex: 0,
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
padding: 10,
|
||||
justifyContent: 'center',
|
||||
minWidth: 40,
|
||||
minHeight: 40,
|
||||
|
||||
borderWidth: 1,
|
||||
borderColor: theme.colorBright2,
|
||||
borderRadius: 4,
|
||||
@@ -147,8 +150,9 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
|
||||
height: 18,
|
||||
},
|
||||
saveButtonIcon: {
|
||||
width: 18,
|
||||
height: 18,
|
||||
...theme.icon,
|
||||
fontSize: 25,
|
||||
color: theme.colorBright2,
|
||||
},
|
||||
contextMenuTrigger: {
|
||||
fontSize: 30,
|
||||
@@ -297,18 +301,18 @@ class ScreenHeaderComponent extends PureComponent<ScreenHeaderProps, ScreenHeade
|
||||
) {
|
||||
if (!show) return null;
|
||||
|
||||
const icon = disabled ? <Icon name="checkmark" style={styles.savedButtonIcon} /> : <Image style={styles.saveButtonIcon} source={require('./SaveIcon.png')} />;
|
||||
|
||||
return (
|
||||
<TouchableOpacity
|
||||
<IconButton
|
||||
onPress={onPress}
|
||||
disabled={disabled}
|
||||
style={{ padding: 0 }}
|
||||
|
||||
accessibilityLabel={_('Save changes')}
|
||||
accessibilityRole="button">
|
||||
<View style={disabled ? styles.saveButtonDisabled : styles.saveButton}>{icon}</View>
|
||||
</TouchableOpacity>
|
||||
themeId={themeId}
|
||||
description={_('Save changes')}
|
||||
disabled={disabled}
|
||||
contentWrapperStyle={disabled ? styles.saveButtonDisabled : styles.saveButton}
|
||||
iconStyle={disabled ? styles.savedButtonIcon : styles.saveButtonIcon}
|
||||
|
||||
iconName={disabled ? 'ionicon checkmark' : 'material content-save'}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user