mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-24 13:53:23 +03:00
commit
91afae82cc
@ -31,7 +31,9 @@ const AccountsBottomSheetContainer = ({ navigation }) => {
|
|||||||
const _navigateToRoute = (routeName = null) => {
|
const _navigateToRoute = (routeName = null) => {
|
||||||
if (routeName) {
|
if (routeName) {
|
||||||
accountsBottomSheetViewRef.current?.closeAccountsBottomSheet();
|
accountsBottomSheetViewRef.current?.closeAccountsBottomSheet();
|
||||||
navigate({ routeName });
|
setTimeout(() => {
|
||||||
|
navigate({ routeName });
|
||||||
|
}, 500);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -124,10 +124,8 @@ export default EStyleSheet.create({
|
|||||||
},
|
},
|
||||||
textButton: {
|
textButton: {
|
||||||
color: '$primaryBlue',
|
color: '$primaryBlue',
|
||||||
},
|
fontSize: 16,
|
||||||
buttonContainer: {
|
paddingVertical: 16,
|
||||||
height: 50,
|
|
||||||
justifyContent: 'center',
|
|
||||||
paddingHorizontal: 16,
|
paddingHorizontal: 16,
|
||||||
},
|
},
|
||||||
separator: {
|
separator: {
|
||||||
@ -141,4 +139,9 @@ export default EStyleSheet.create({
|
|||||||
checkIcon: {
|
checkIcon: {
|
||||||
color: '$successColor',
|
color: '$successColor',
|
||||||
},
|
},
|
||||||
|
button: {
|
||||||
|
justifyContent: 'center',
|
||||||
|
backgroundColor: 'transparent',
|
||||||
|
height: 50,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
import React, { useCallback, useMemo, useRef, forwardRef, useImperativeHandle } from 'react';
|
import React, { useCallback, useMemo, useRef, forwardRef, useImperativeHandle } from 'react';
|
||||||
import { View, Text, TouchableOpacity } from 'react-native';
|
import { View, Text } from 'react-native';
|
||||||
import { useDispatch } from 'react-redux';
|
import { useDispatch } from 'react-redux';
|
||||||
import { useIntl } from 'react-intl';
|
import { useIntl } from 'react-intl';
|
||||||
import {
|
import {
|
||||||
BottomSheetModal,
|
BottomSheetModal,
|
||||||
|
TouchableOpacity,
|
||||||
|
TouchableWithoutFeedback,
|
||||||
BottomSheetModalProvider,
|
BottomSheetModalProvider,
|
||||||
BottomSheetFlatList,
|
BottomSheetFlatList,
|
||||||
} from '@gorhom/bottom-sheet';
|
} from '@gorhom/bottom-sheet';
|
||||||
@ -53,7 +55,7 @@ const AccountsBottomSheet = forwardRef(
|
|||||||
<Text style={styles.name}>{`@${item.username}`}</Text>
|
<Text style={styles.name}>{`@${item.username}`}</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
{currentAccount.name === item.name && (
|
{currentAccount.name === item.username && (
|
||||||
<Icon iconType="AntDesign" name="checkcircle" style={styles.checkIcon} size={24} />
|
<Icon iconType="AntDesign" name="checkcircle" style={styles.checkIcon} size={24} />
|
||||||
)}
|
)}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
@ -86,27 +88,33 @@ const AccountsBottomSheet = forwardRef(
|
|||||||
<BottomSheetFlatList
|
<BottomSheetFlatList
|
||||||
data={accounts}
|
data={accounts}
|
||||||
scrollEnabled
|
scrollEnabled
|
||||||
keyExtractor={(item) => item.name}
|
keyExtractor={(item, index) => `${item.name}${item.username}${index}`}
|
||||||
renderItem={({ item }) => _renderAccountTile(item)}
|
renderItem={({ item }) => _renderAccountTile(item)}
|
||||||
//contentContainerStyle={styles.contentContainer}
|
//contentContainerStyle={styles.contentContainer}
|
||||||
/>
|
/>
|
||||||
<Separator style={styles.separator} />
|
<Separator style={styles.separator} />
|
||||||
<View style={{ paddingBottom: insets.bottom }}>
|
<View style={{ paddingBottom: insets.bottom }}>
|
||||||
<View style={styles.buttonContainer}>
|
<TouchableWithoutFeedback
|
||||||
<TextButton
|
style={styles.button}
|
||||||
text={intl.formatMessage({ id: 'side_menu.create_a_new_account' })}
|
onPress={() => navigateToRoute(ROUTES.SCREENS.REGISTER)}
|
||||||
textStyle={styles.textButton}
|
>
|
||||||
onPress={() => navigateToRoute(ROUTES.SCREENS.REGISTER)}
|
<View>
|
||||||
/>
|
<Text style={styles.textButton}>
|
||||||
</View>
|
{intl.formatMessage({ id: 'side_menu.create_a_new_account' })}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
</TouchableWithoutFeedback>
|
||||||
<Separator style={styles.separator} />
|
<Separator style={styles.separator} />
|
||||||
<View style={styles.buttonContainer}>
|
<TouchableWithoutFeedback
|
||||||
<TextButton
|
style={styles.button}
|
||||||
text={intl.formatMessage({ id: 'side_menu.add_an_existing_account' })}
|
onPress={() => navigateToRoute(ROUTES.SCREENS.LOGIN)}
|
||||||
textStyle={styles.textButton}
|
>
|
||||||
onPress={() => navigateToRoute(ROUTES.SCREENS.LOGIN)}
|
<View>
|
||||||
/>
|
<Text style={styles.textButton}>
|
||||||
</View>
|
{intl.formatMessage({ id: 'side_menu.add_an_existing_account' })}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
</TouchableWithoutFeedback>
|
||||||
<Separator style={styles.separator} />
|
<Separator style={styles.separator} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import { TouchableWithoutFeedback, Text, View } from 'react-native';
|
import { Text, View, TouchableWithoutFeedback } from 'react-native';
|
||||||
|
|
||||||
import styles from './textButtonStyles';
|
import styles from './textButtonStyles';
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React, { Component, useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import get from 'lodash/get';
|
import get from 'lodash/get';
|
||||||
import { TouchableOpacity, Text, View, Dimensions } from 'react-native';
|
import { TouchableOpacity, Text, View, Dimensions } from 'react-native';
|
||||||
import { injectIntl } from 'react-intl';
|
import { injectIntl } from 'react-intl';
|
||||||
@ -150,7 +150,7 @@ const PostCardView = ({
|
|||||||
iconStyle={styles.commentIcon}
|
iconStyle={styles.commentIcon}
|
||||||
iconType="MaterialCommunityIcons"
|
iconType="MaterialCommunityIcons"
|
||||||
isClickable
|
isClickable
|
||||||
text={activeVot.length}
|
text={get(activeVot, 'length', 0)}
|
||||||
onPress={_handleOnVotersPress}
|
onPress={_handleOnVotersPress}
|
||||||
/>
|
/>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
@ -161,7 +161,7 @@ const PostCardView = ({
|
|||||||
iconStyle={styles.commentIcon}
|
iconStyle={styles.commentIcon}
|
||||||
iconType="MaterialIcons"
|
iconType="MaterialIcons"
|
||||||
isClickable
|
isClickable
|
||||||
text={reblogs.length}
|
text={get(reblogs, 'length', 0)}
|
||||||
onPress={_handleOnReblogsPress}
|
onPress={_handleOnReblogsPress}
|
||||||
/>
|
/>
|
||||||
<TextWithIcon
|
<TextWithIcon
|
||||||
|
@ -47,12 +47,14 @@ class ProgressiveImage extends React.Component {
|
|||||||
style={[style, { opacity: this.thumbnailAnimated }]}
|
style={[style, { opacity: this.thumbnailAnimated }]}
|
||||||
onLoad={this.handleThumbnailLoad}
|
onLoad={this.handleThumbnailLoad}
|
||||||
blurRadius={1}
|
blurRadius={1}
|
||||||
|
resizeMode={FastImage.resizeMode.cover}
|
||||||
/>
|
/>
|
||||||
<AnimatedFastImage
|
<AnimatedFastImage
|
||||||
{...props}
|
{...props}
|
||||||
source={source}
|
source={source}
|
||||||
style={[styles.imageOverlay, { opacity: this.imageAnimated }, style]}
|
style={[styles.imageOverlay, { opacity: this.imageAnimated }, style]}
|
||||||
onLoad={this.onImageLoad}
|
onLoad={this.onImageLoad}
|
||||||
|
resizeMode={FastImage.resizeMode.cover}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
@ -28,6 +28,7 @@ export default {
|
|||||||
'vi-VN': require('./vi-VN.json'),
|
'vi-VN': require('./vi-VN.json'),
|
||||||
'zh-CN': require('./zh-CN.json'),
|
'zh-CN': require('./zh-CN.json'),
|
||||||
'zh-TW': require('./zh-TW.json'),
|
'zh-TW': require('./zh-TW.json'),
|
||||||
|
'et-EE': require('./et-EE.json'),
|
||||||
};
|
};
|
||||||
|
|
||||||
export const locales = [
|
export const locales = [
|
||||||
@ -50,6 +51,7 @@ export const locales = [
|
|||||||
{ id: 'fi-FI', name: 'Finnish' },
|
{ id: 'fi-FI', name: 'Finnish' },
|
||||||
{ id: 'fil-PH', name: 'Filipino' },
|
{ id: 'fil-PH', name: 'Filipino' },
|
||||||
{ id: 'pt-PT', name: 'Porteguese' },
|
{ id: 'pt-PT', name: 'Porteguese' },
|
||||||
|
{ id: 'et-EE', name: 'Estonian' },
|
||||||
{ id: 'pl-PL', name: 'Polish' },
|
{ id: 'pl-PL', name: 'Polish' },
|
||||||
{ id: 'sr-CS', name: 'Serbian' },
|
{ id: 'sr-CS', name: 'Serbian' },
|
||||||
{ id: 'fa-IR', name: 'Persian' },
|
{ id: 'fa-IR', name: 'Persian' },
|
||||||
|
@ -12,6 +12,7 @@ export default [
|
|||||||
'Bahasa Melayu',
|
'Bahasa Melayu',
|
||||||
'Deutsch',
|
'Deutsch',
|
||||||
'Español',
|
'Español',
|
||||||
|
'Eesti keel',
|
||||||
'Français',
|
'Français',
|
||||||
'Italiano',
|
'Italiano',
|
||||||
'Srpski',
|
'Srpski',
|
||||||
@ -44,6 +45,7 @@ export const VALUE = [
|
|||||||
'ms-MY',
|
'ms-MY',
|
||||||
'de-DE',
|
'de-DE',
|
||||||
'es-ES',
|
'es-ES',
|
||||||
|
'et-EE',
|
||||||
'fr-FR',
|
'fr-FR',
|
||||||
'it-IT',
|
'it-IT',
|
||||||
'sr-CS',
|
'sr-CS',
|
||||||
|
@ -33,9 +33,9 @@ const PeopleResultsContainer = (props) => {
|
|||||||
|
|
||||||
const _handleOnPress = (item) => {
|
const _handleOnPress = (item) => {
|
||||||
navigation.navigate({
|
navigation.navigate({
|
||||||
routeName: item === username ? ROUTES.TABBAR.PROFILE : ROUTES.SCREENS.PROFILE,
|
routeName: item.name === username ? ROUTES.TABBAR.PROFILE : ROUTES.SCREENS.PROFILE,
|
||||||
params: {
|
params: {
|
||||||
username: item,
|
username: item.name,
|
||||||
},
|
},
|
||||||
key: item.text,
|
key: item.text,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user