Skip to content
This repository has been archived by the owner on Feb 28, 2024. It is now read-only.

Commit

Permalink
msg's placeholders
Browse files Browse the repository at this point in the history
RightLeft style
  • Loading branch information
ayazzali committed Apr 10, 2018
1 parent 0fb8f19 commit 77a95dd
Showing 1 changed file with 19 additions and 15 deletions.
34 changes: 19 additions & 15 deletions src/dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class Dialog extends React.Component {
let messages = json.response.items.map(val => {
if (val && val.body && val.body.startsWith(AESRFS)) {
let pureMsg = val.body.substr(AESRFS.length, val.body.length - 1)
pureMsg=pureMsg.split(' ').join("+")
pureMsg = pureMsg.split(' ').join("+")
//pureMsg=decodeURI(pureMsg);
l("decrypting: " + pureMsg)

Expand Down Expand Up @@ -111,12 +111,11 @@ export class Dialog extends React.Component {
render() {
//l(this.state.messages);
const list = this.state.messages.map((val, id) => (
<Button
key={id}
title={val && val.body ? val.body : '0'} //
onPress={() => { } //this.props.navigation.navigate('_Messages', {user_id:val.user_id})
}
/>
<View key={id}>
<TouchableHighlight>
<Text style={val.from_id == this.props.navigation.getParam("user_id", '') ? styles.Left : styles.Right}>{val && val.body ? val.body : '0'} </Text>
</TouchableHighlight>
</View>
));
return (
<View style={styles.Main}>
Expand All @@ -126,6 +125,7 @@ export class Dialog extends React.Component {
<View>
<View>
<TextInput
placeholder={"Ваш \"пароль\". Передайте его собеседнику!"}// т.к. в интернете всё можно перехватить"}
value={this.state.aesKey}
onChangeText={value => {
l("changing aesKey")
Expand All @@ -136,12 +136,12 @@ export class Dialog extends React.Component {
<Row>
<Col size={80}>
<View>
<TextInput onChangeText={value => this.setState({ msg: value })} />
<TextInput onChangeText={value => this.setState({ msg: value })} placeholder={"Ваше сообщение ..."} />
</View>
</Col>
<Col size={20} >
<Col size={20}>
<View>
<TouchableOpacity
<Button
onPress={() => {
l('encripting');
// Encrypt Encrypt Encrypt Encrypt Encrypt Encrypt Encrypt
Expand All @@ -156,11 +156,9 @@ export class Dialog extends React.Component {
'&access_token=[access_token]&message=' +
encripted// todo encodeURI doesnt work for + CHECK!
)
}}>
<Text style={styles.Buttonsend}>
Send
</Text>
</TouchableOpacity>
}}
style={styles.Buttonsend}
title={"Send"} />
</View>
</Col>
</Row>
Expand All @@ -171,6 +169,12 @@ export class Dialog extends React.Component {
}

const styles = StyleSheet.create({
Right: {
textAlign: 'right', alignSelf: 'stretch'
},
Left: {
textAlign: 'left', alignSelf: 'stretch'
},
FlexStyle: {
flex: 1,
alignSelf: 'stretch'
Expand Down

0 comments on commit 77a95dd

Please sign in to comment.