diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..ac179a9b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +tinode.js diff --git a/css/base.css b/css/base.css index 275f6f8a..7ab5950d 100644 --- a/css/base.css +++ b/css/base.css @@ -558,7 +558,8 @@ ul.permission-editor > li { .contact-box .contact-comment { text-overflow: ellipsis; - overflow: hidden + overflow: hidden; + font-weight: lighter; } /* The down arrow head - trigger for context menu in contacts list */ diff --git a/index.html b/index.html index e6e35c3b..caf87972 100644 --- a/index.html +++ b/index.html @@ -116,6 +116,15 @@ return card; } + // construct email params + function email(emailAddress) { + var tags = []; + if(emailAddress) { + tags.push("email:" + emailAddress); + } + return tags + } + /* BEGIN Popup/dropdown menu */ var ContextMenu = React.createClass({ componentWillUnmount: function() { @@ -650,6 +659,7 @@ login: '', password: '', password2: '', + email: '', fn: '', // full/formatted name imageDataUrl: null, errorCleared: false @@ -664,6 +674,9 @@ handlePassword2Change: function(e) { this.setState({password2: e.target.value}); }, + handleEmailChange: function(e) { + this.setState({email: e.target.value}) + }, handleFnChange: function(e) { this.setState({fn: e.target.value}); }, @@ -679,7 +692,9 @@ this.props.onCreateAccount( this.state.login.trim(), this.state.password.trim(), - vcard(this.state.fn, this.state.imageDataUrl)); + vcard(this.state.fn, this.state.imageDataUrl), + null, + email(this.state.email)); } }, render: function() { @@ -700,9 +715,13 @@ +
+ +
+ value={this.state.fn} onChange={this.handleFnChange} required/>
@@ -2502,12 +2521,13 @@ this.setState({sidePanelSelected: 'register'}); }, // Actual registration of a new account. - handleNewAccountRequest: function(login_, password_, public_, private_) { + handleNewAccountRequest: function(login_, password_, public_, private_, tags_) { var instance = this; + tags_ = tags_ || []; // init tags_ value just in case undefined Tinode.connect(this.state.serverAddress) .then(function() { return Tinode.createAccountBasic(login_, password_, - {login: true, public: public_, private: private_}); + {defacs: {auth: "JRWPS", anon: "N"}, public: public_, private: private_, tags: tags_}); }) .then(function() { instance.handleLoginSuccessful(instance);