mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 11:15:35 +03:00
Merged with master
This commit is contained in:
commit
36e54fb2bd
@ -58,6 +58,23 @@ export default class MarkdownEditorView extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
const { text } = this.state;
|
||||
const { isFormValid, handleIsFormValid } = this.props;
|
||||
|
||||
if (prevState.text !== text && !isFormValid) {
|
||||
const nextText = text.replace(prevState.text, '');
|
||||
|
||||
if (nextText && nextText.length > 0) {
|
||||
this._changeText(text);
|
||||
|
||||
if (handleIsFormValid) {
|
||||
handleIsFormValid(text);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Component functions
|
||||
_changeText = (input) => {
|
||||
const {
|
||||
@ -147,7 +164,7 @@ export default class MarkdownEditorView extends Component {
|
||||
iconType="FontAwesome"
|
||||
name="image"
|
||||
/>
|
||||
{/* <View style={styles.clearButtonWrapper}>
|
||||
<View style={styles.clearButtonWrapper}>
|
||||
<IconButton
|
||||
onPress={() => this.ClearActionSheet.show()}
|
||||
size={20}
|
||||
@ -155,7 +172,7 @@ export default class MarkdownEditorView extends Component {
|
||||
iconType="FontAwesome"
|
||||
name="trash"
|
||||
/>
|
||||
</View> */}
|
||||
</View>
|
||||
{/* TODO: After alpha */}
|
||||
{/* <DropdownButton
|
||||
style={styles.dropdownStyle}
|
||||
|
@ -38,6 +38,5 @@ export default EStyleSheet.create({
|
||||
},
|
||||
safeArea: {
|
||||
backgroundColor: '$primaryBackgroundColor',
|
||||
flex: 1,
|
||||
},
|
||||
});
|
||||
|
@ -93,17 +93,12 @@ class PostsView extends Component {
|
||||
let newPosts = [];
|
||||
|
||||
this.setState({ isLoading: true });
|
||||
if ((!filter && tag) || filter === 'feed' || filter === 'blog' || getFor === 'blog') {
|
||||
if (tag || filter === 'feed' || filter === 'blog' || getFor === 'blog') {
|
||||
options = {
|
||||
tag,
|
||||
limit: 3,
|
||||
};
|
||||
} else if (filter == 'reblogs') {
|
||||
options = {
|
||||
tag,
|
||||
limit: 3,
|
||||
};
|
||||
} else if (tag) {
|
||||
} else if (filter === 'reblogs') {
|
||||
options = {
|
||||
tag,
|
||||
limit: 3,
|
||||
|
@ -2,6 +2,7 @@ import EStyleSheet from 'react-native-extended-stylesheet';
|
||||
|
||||
export default EStyleSheet.create({
|
||||
inputWrapper: {
|
||||
marginTop: 20,
|
||||
backgroundColor: '$primaryLightBackground',
|
||||
flexDirection: 'row',
|
||||
height: 44,
|
||||
@ -10,9 +11,6 @@ export default EStyleSheet.create({
|
||||
justifyContent: 'center',
|
||||
marginHorizontal: 16,
|
||||
},
|
||||
safeArea: {
|
||||
marginTop: 20,
|
||||
},
|
||||
icon: {
|
||||
alignSelf: 'center',
|
||||
color: '$iconColor',
|
||||
|
@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { View, SafeAreaView } from 'react-native';
|
||||
import { SafeAreaView } from 'react-native';
|
||||
|
||||
// Components
|
||||
import { Icon } from '../../icon';
|
||||
@ -11,13 +11,19 @@ import styles from './searchInputStyles';
|
||||
|
||||
/* Props
|
||||
* ------------------------------------------------
|
||||
* @prop { type } name - Description....
|
||||
* @prop { func } onChangeText - The function will trigger when input on change
|
||||
* @prop { func } handleOnModalClose - Handle on click method for close button
|
||||
* @prop { string } placeholder - Placeholder for input
|
||||
* @prop { bool } editable - Editable value for input. Default value is true.
|
||||
*/
|
||||
const SearchInputView = ({
|
||||
onChangeText, handleOnModalClose, placeholder, editable = true, autoFocus = true,
|
||||
onChangeText,
|
||||
handleOnModalClose,
|
||||
placeholder,
|
||||
editable = true,
|
||||
autoFocus = true,
|
||||
}) => (
|
||||
<SafeAreaView style={styles.safeArea}>
|
||||
<View style={styles.inputWrapper}>
|
||||
<SafeAreaView style={styles.inputWrapper}>
|
||||
<Icon style={styles.icon} iconType="FontAwesome" name="search" size={15} />
|
||||
<TextInput
|
||||
style={styles.input}
|
||||
@ -35,7 +41,6 @@ const SearchInputView = ({
|
||||
name="ios-close-circle-outline"
|
||||
onPress={() => handleOnModalClose()}
|
||||
/>
|
||||
</View>
|
||||
</SafeAreaView>
|
||||
);
|
||||
|
||||
|
@ -53,6 +53,12 @@ export default EStyleSheet.create({
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
},
|
||||
searchItemImageWrapper: {
|
||||
flex: 1,
|
||||
},
|
||||
searchItemTextWrapper: {
|
||||
flex: 7,
|
||||
},
|
||||
searchItemImage: {
|
||||
width: 40,
|
||||
height: 40,
|
||||
|
@ -59,7 +59,7 @@ class SearchModalView extends PureComponent {
|
||||
renderItem={({ item }) => (
|
||||
<TouchableHighlight onPress={() => handleOnPressListItem(searchResults.type, item)}>
|
||||
<View style={styles.searhItems}>
|
||||
<View style={{ flex: 1 }}>
|
||||
<View style={styles.searchItemImageWrapper}>
|
||||
{item.image && (
|
||||
<FastImage
|
||||
source={{
|
||||
@ -69,7 +69,7 @@ class SearchModalView extends PureComponent {
|
||||
/>
|
||||
)}
|
||||
</View>
|
||||
<View style={{ flex: 7 }}>
|
||||
<View style={styles.searchItemTextWrapper}>
|
||||
{item.text && <Text style={styles.searchItemText}>{item.text}</Text>}
|
||||
</View>
|
||||
</View>
|
||||
|
@ -201,9 +201,9 @@
|
||||
"no_existing_post": "پستی موجود نیست"
|
||||
},
|
||||
"comment_filter": {
|
||||
"trending": "trending",
|
||||
"reputation": "reputation",
|
||||
"votes": "votes",
|
||||
"age": "age"
|
||||
"trending": "پرطرفدار",
|
||||
"reputation": "شهرت",
|
||||
"votes": "رأی ها",
|
||||
"age": "سن"
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@
|
||||
"cancel": "batal",
|
||||
"login": "MASUK",
|
||||
"steemconnect_description": "Jika Anda tidak ingin menyimpan sandi Anda dienkripsi dan disimpan pada perangkat Anda, Anda dapat menggunakan Steemconnect.",
|
||||
"steemconnect_fee_description": "Steemconnect may charge some fees from your reward transactions"
|
||||
"steemconnect_fee_description": "Steemconnect dapat membebankan beberapa biaya dari transaksi hadiah Anda"
|
||||
},
|
||||
"home": {
|
||||
"feed": "Umpan",
|
||||
@ -201,9 +201,9 @@
|
||||
"no_existing_post": "Tidak ada post yang ada"
|
||||
},
|
||||
"comment_filter": {
|
||||
"trending": "trending",
|
||||
"reputation": "reputation",
|
||||
"votes": "votes",
|
||||
"age": "age"
|
||||
"trending": "Trending",
|
||||
"reputation": "reputasi",
|
||||
"votes": "berikan suara",
|
||||
"age": "usia"
|
||||
}
|
||||
}
|
||||
|
@ -6,6 +6,9 @@ export default {
|
||||
'it-IT': require('./it-IT.json'),
|
||||
'ru-RU': require('./ru-RU.json'),
|
||||
'tr-TR': require('./tr-TR.json'),
|
||||
'ko-KR': require('./ko-KR.json'),
|
||||
'lt-LT': require('./lt-LT.json'),
|
||||
'pt-PT': require('./pt-PT.json'),
|
||||
};
|
||||
|
||||
export const locales = [
|
||||
@ -16,4 +19,7 @@ export const locales = [
|
||||
{ id: 'iT-IT', name: 'Italian' },
|
||||
{ id: 'ru-RU', name: 'Русский' },
|
||||
{ id: 'tr-TR', name: 'Türkçe' },
|
||||
{ id: 'ko-KR', name: 'Korean' },
|
||||
{ id: 'lt-LT', name: 'Lithuanian' },
|
||||
{ id: 'pt-PT', name: 'Porteguese' },
|
||||
];
|
||||
|
@ -79,7 +79,7 @@
|
||||
"cancel": "geç",
|
||||
"login": "GİRİŞ",
|
||||
"steemconnect_description": "Eğer kullanıçı bilgilerini şifreli olarak tutulmasını istemiyorsanız Steemconnect ilede giriş yapabilirsiniz.",
|
||||
"steemconnect_fee_description": "Steemconnect may charge some fees from your reward transactions"
|
||||
"steemconnect_fee_description": "Not: Steemconnect ödül işlemlerinde bazı ücretler alabilir"
|
||||
},
|
||||
"home": {
|
||||
"feed": "Akış",
|
||||
@ -115,8 +115,8 @@
|
||||
"reply_placeholder": "Yukarıdaki yazi hakkinda nasil bir cevap yazmak istersin?",
|
||||
"publish": "Yayınla",
|
||||
"reply": "Cevapla",
|
||||
"open_galery": "Open Galery",
|
||||
"capture_photo": "Capture a photo"
|
||||
"open_galery": "Gariyi Aç",
|
||||
"capture_photo": "Bir fotoğraf yakala"
|
||||
},
|
||||
"pincode": {
|
||||
"enter_text": "Açmak için pin kodunu giriniz",
|
||||
@ -137,8 +137,8 @@
|
||||
"warning": "Uyarı",
|
||||
"invalid_pincode": "Geçersiz pin gözden geçirip yeniden deneyin.",
|
||||
"remove_alert": "Kaldırmak istediğine emin misin ?",
|
||||
"clear_alert": "Are you sure you want to clear?",
|
||||
"clear": "Clear",
|
||||
"clear_alert": "Silmek istediğinizden emin misiniz?",
|
||||
"clear": "Temizle",
|
||||
"cancel": "Vazgeç",
|
||||
"delete": "Temizle",
|
||||
"copied": "Kopyalandı",
|
||||
@ -166,7 +166,7 @@
|
||||
"empty_list": "Burada hiçbir şey yok",
|
||||
"deleted": "Yer işareti kaldırıldı",
|
||||
"search": "Yer imlerinde ara",
|
||||
"added": "Added to bookmarks",
|
||||
"added": "Yer imlerine eklendi",
|
||||
"add": "Yerimlerine ekle"
|
||||
},
|
||||
"favorites": {
|
||||
@ -198,12 +198,12 @@
|
||||
},
|
||||
"deep_link": {
|
||||
"no_existing_user": "Kullanici Bulunamadi",
|
||||
"no_existing_post": "Boyle bir icerik yok"
|
||||
"no_existing_post": "Kullanici Bulunamadi"
|
||||
},
|
||||
"comment_filter": {
|
||||
"trending": "trending",
|
||||
"reputation": "reputation",
|
||||
"votes": "votes",
|
||||
"age": "age"
|
||||
"trending": "öne çıkanlar",
|
||||
"reputation": "itibar",
|
||||
"votes": "oylar",
|
||||
"age": "yaş"
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,23 @@
|
||||
export default ['Deutsche', 'English', 'Hungarian', 'Indonesian', 'Russian', 'Turkish'];
|
||||
export default [
|
||||
'Deutsche',
|
||||
'English',
|
||||
'Hungarian',
|
||||
'Indonesian',
|
||||
'Korean',
|
||||
'Lithuanian',
|
||||
'Porteguese',
|
||||
'Russian',
|
||||
'Turkish',
|
||||
];
|
||||
|
||||
export const VALUE = ['de-DE', 'en-US', 'hu-HU', 'id-ID', 'ru-RU', 'tr-TR'];
|
||||
export const VALUE = [
|
||||
'de-DE',
|
||||
'en-US',
|
||||
'hu-HU',
|
||||
'id-ID',
|
||||
'ko-KR',
|
||||
'lt-LT',
|
||||
'pt-PT',
|
||||
'ru-RU',
|
||||
'tr-TR',
|
||||
];
|
||||
|
@ -10,7 +10,7 @@ import { NavigationActions } from 'react-navigation';
|
||||
import { bindActionCreators } from 'redux';
|
||||
import Push from 'appcenter-push';
|
||||
|
||||
// Constants
|
||||
// Languages
|
||||
import en from 'react-intl/locale-data/en';
|
||||
import id from 'react-intl/locale-data/id';
|
||||
import ru from 'react-intl/locale-data/ru';
|
||||
@ -18,7 +18,11 @@ import de from 'react-intl/locale-data/de';
|
||||
import it from 'react-intl/locale-data/it';
|
||||
import hu from 'react-intl/locale-data/hu';
|
||||
import tr from 'react-intl/locale-data/tr';
|
||||
import ko from 'react-intl/locale-data/ko';
|
||||
import lt from 'react-intl/locale-data/lt';
|
||||
import pt from 'react-intl/locale-data/pt';
|
||||
|
||||
// Constants
|
||||
import AUTH_TYPE from '../../../constants/authType';
|
||||
|
||||
// Services
|
||||
@ -67,7 +71,7 @@ import {
|
||||
import ApplicationScreen from '../screen/applicationScreen';
|
||||
import { Launch } from '../..';
|
||||
|
||||
addLocaleData([...en, ...ru, ...de, ...id, ...it, ...hu, ...tr]);
|
||||
addLocaleData([...en, ...ru, ...de, ...id, ...it, ...hu, ...tr, ...ko, ...pt, ...lt]);
|
||||
|
||||
class ApplicationContainer extends Component {
|
||||
constructor() {
|
||||
|
@ -50,7 +50,7 @@ class BookmarksScreen extends Component {
|
||||
index={index}
|
||||
isClickable
|
||||
text={text}
|
||||
username={item.author}
|
||||
username={isFavorites ? item.account : item.author}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ class EditorScreen extends Component {
|
||||
|
||||
// Component Life Cycles
|
||||
componentWillReceiveProps = (nextProps) => {
|
||||
const { draftPost } = this.props;
|
||||
const { draftPost, isUploading } = this.props;
|
||||
|
||||
if (nextProps.draftPost && draftPost !== nextProps.draftPost) {
|
||||
this.setState({
|
||||
@ -48,6 +48,10 @@ class EditorScreen extends Component {
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
if (isUploading !== nextProps) {
|
||||
this._handleFormUpdate();
|
||||
}
|
||||
};
|
||||
|
||||
// Component Functions
|
||||
@ -107,7 +111,7 @@ class EditorScreen extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
_handleIsFormValid = () => {
|
||||
_handleIsFormValid = (bodyText) => {
|
||||
const { fields } = this.state;
|
||||
const { isReply } = this.props;
|
||||
let _isFormValid;
|
||||
@ -118,9 +122,8 @@ class EditorScreen extends Component {
|
||||
_isFormValid = fields
|
||||
&& fields.title
|
||||
&& fields.title.length > 0
|
||||
&& fields.body
|
||||
&& fields.body.length > 0
|
||||
&& fields.tags.length > 0;
|
||||
&& ((fields.body && fields.body.length > 0 && fields.tags.length > 0)
|
||||
|| (bodyText && bodyText.length > 0));
|
||||
}
|
||||
|
||||
this.setState({ isFormValid: _isFormValid });
|
||||
@ -215,6 +218,9 @@ class EditorScreen extends Component {
|
||||
componentID="body"
|
||||
draftBody={fields && fields.body}
|
||||
handleOnTextChange={this._setWordsCount}
|
||||
handleFormUpdate={this._handleFormUpdate}
|
||||
handleIsFormValid={this._handleIsFormValid}
|
||||
isFormValid={isFormValid}
|
||||
handleOpenImagePicker={handleOnImagePicker}
|
||||
intl={intl}
|
||||
uploadedImage={uploadedImage}
|
||||
|
@ -56,7 +56,7 @@ class ProfileContainer extends Component {
|
||||
return;
|
||||
}
|
||||
|
||||
if (selectedUser && selectedUser.username) {
|
||||
if (selectedUser && selectedUser.username && selectedUser.username !== currentAccount.name) {
|
||||
this._loadProfile(selectedUser.username);
|
||||
|
||||
if (selectedUser.username) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import React, { PureComponent, Fragment } from 'react';
|
||||
import React, { PureComponent } from 'react';
|
||||
import { View } from 'react-native';
|
||||
import ScrollableTabView from '@esteemapp/react-native-scrollable-tab-view';
|
||||
import { injectIntl } from 'react-intl';
|
||||
@ -22,14 +22,12 @@ class SearchResultScreen extends PureComponent {
|
||||
const { intl, tag, navigationGoBack } = this.props;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<View style={styles.container}>
|
||||
<SearchInput
|
||||
onChangeText={text => console.log('text :', text)}
|
||||
onChangeText={() => {}}
|
||||
handleOnModalClose={navigationGoBack}
|
||||
placeholder={`#${tag}`}
|
||||
editable={false}
|
||||
autoFocus={false}
|
||||
/>
|
||||
<ScrollableTabView
|
||||
style={globalStyles.tabView}
|
||||
@ -65,7 +63,6 @@ class SearchResultScreen extends PureComponent {
|
||||
</Fragment> */}
|
||||
</ScrollableTabView>
|
||||
</View>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user