From 2bcad655fca844d06390e6431073a46091988f39 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 27 Aug 2018 15:32:09 +0300 Subject: moar /settings updates --- vnext/src/components/Settings.js | 67 ++++++++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 23 deletions(-) (limited to 'vnext') diff --git a/vnext/src/components/Settings.js b/vnext/src/components/Settings.js index d3eced63..2a24e35c 100644 --- a/vnext/src/components/Settings.js +++ b/vnext/src/components/Settings.js @@ -29,7 +29,7 @@ export default class Settings extends React.Component { } passwordChanged = (event) => { this.setState({ - settings: { password : event.target.value } + settings: { password: event.target.value } }); } onSubmitPassword = (event) => { @@ -38,6 +38,29 @@ export default class Settings extends React.Component { } console.log('password update'); } + emailChanged = (event) => { + this.setState({ + me: { activeEmail: event.target.value } + }); + } + disableTelegram = () => { + console.log('telegram disable'); + } + disableFacebook = (event) => { + if (event.preventDefault) { + event.preventDefault(); + } + console.log('facebook disable'); + } + enableFacebook = (event) => { + if (event.preventDefault) { + event.preventDefault(); + } + console.log('facebook enable'); + } + disableTwitter = () => { + console.log('twitter disable'); + } render() { const { me } = this.state; return ( @@ -45,29 +68,28 @@ export default class Settings extends React.Component {

Settings

Changing your avatar -
-

Avatar:
- Recommendations: PNG, 96x96, <50Kb. Also, JPG and GIF supported.

-

- -

-
+
+

Avatar:
+ Recommendations: PNG, 96x96, <50Kb. Also, JPG and GIF supported.

+

+ +

+
Changing your password

Change password: -
+
(max. length - 16 symbols)

Telegram {me.telegramName ? ( -
+
Telegram: {me.telegramName} — - - +
) : ( @@ -122,7 +144,7 @@ export default class Settings extends React.Component { me.emails ? me.emails.map(email =>
{me.emails.length > 1 && @@ -133,15 +155,16 @@ export default class Settings extends React.Component { }

- {me.emails && + { + me.emails && {/** email_off **/}
You can receive notifications to email:
- Sent to {me.emails.map(email => - )} @@ -164,19 +187,17 @@ export default class Settings extends React.Component { {me.facebookStatus && me.facebookStatus.connected ? ( me.facebookStatus.crosspostEnabled ? - +
Facebook: Enabled — - - +
: -
+
Facebook: Disabled — - - +
) : ( @@ -197,7 +218,7 @@ export default class Settings extends React.Component {
Twitter: {me.twitterName} - +
: -- cgit v1.2.3