From b5e91626575e6a6827a00028905a5cd6f9baa535 Mon Sep 17 00:00:00 2001 From: Matilde Park Date: Thu, 12 Dec 2019 01:02:00 -0500 Subject: [PATCH] add TODO markers for next-up features --- pkg/arvo/app/contacts/js/index.js | 391 +++++++++++++----- .../contacts/src/js/components/contacts.js | 2 + .../src/js/components/lib/add-contact.js | 1 + .../contacts/src/js/components/root.js | 1 + 4 files changed, 287 insertions(+), 108 deletions(-) diff --git a/pkg/arvo/app/contacts/js/index.js b/pkg/arvo/app/contacts/js/index.js index 4a5e80ab5..c1173c921 100644 --- a/pkg/arvo/app/contacts/js/index.js +++ b/pkg/arvo/app/contacts/js/index.js @@ -62831,7 +62831,7 @@ lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes\ class NewScreen extends react_1 { constructor(props) { super(props); - + this.state = { groupName: '', invites: '', @@ -62839,30 +62839,30 @@ lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes\ groupNameError: false, inviteError: false }; - + this.groupNameChange = this.groupNameChange.bind(this); this.invChange = this.invChange.bind(this); // this.colorChange = this.colorChange.bind(this); } - + groupNameChange(event) { this.setState({ groupName: event.target.value }); } - + invChange(event) { this.setState({ invites: event.target.value }); } - + // colorChange(event) { // this.setState({ // color: event.target.value // }); // } - + onClickCreate() { const { props, state } = this; if (!state.groupName) { @@ -62873,21 +62873,21 @@ lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes\ return; } let group = `/~${window.ship}` + `/${state.groupName}`; - + let aud = []; let isValid = true; - + if (state.invites.length > 2) { aud = state.invites.split(',') .map((mem) => `~${deSig(mem.trim())}`); - + aud.forEach((mem) => { if (!src.isValidPatp(mem)) { isValid = false; } }); } - + if (!isValid) { this.setState({ inviteError: true, @@ -62895,7 +62895,7 @@ lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes\ }); return; } - + if (this.textarea) { this.textarea.value = ''; } @@ -62914,97 +62914,97 @@ lyrtesmudnytbyrsenwegfyrmurtelreptegpecnelnevfes\ }); }); } - + render() { - + let groupNameErrElem = (react.createElement('span', {__self: this, __source: {fileName: _jsxFileName$7, lineNumber: 96}} )); if (this.state.groupNameError) { groupNameErrElem = ( react.createElement('span', { className: "f9 inter red2 ml3 mt1 db" , __self: this, __source: {fileName: _jsxFileName$7, lineNumber: 99}}, "Group must have a valid name." ) - ); - } + ); + } + + let invErrElem = (react.createElement('span', {__self: this, __source: {fileName: _jsxFileName$7, lineNumber: 105}} )); + if (this.state.inviteError) { + invErrElem = ( + react.createElement('span', { className: "f9 inter red2 ml3 mb5 db" , __self: this, __source: {fileName: _jsxFileName$7, lineNumber: 108}}, "Invites must be validly formatted ship names." - let invErrElem = (react.createElement('span', {__self: this, __source: {fileName: _jsxFileName$7, lineNumber: 105}} )); - if (this.state.inviteError) { - invErrElem = ( - react.createElement('span', { className: "f9 inter red2 ml3 mb5 db" , __self: this, __source: {fileName: _jsxFileName$7, lineNumber: 108}}, "Invites must be validly formatted ship names." - - ) - ); - } - - return ( - react.createElement('div', { className: "h-100 w-100 flex flex-column overflow-y-scroll" , __self: this, __source: {fileName: _jsxFileName$7, lineNumber: 115}} - , react.createElement('div', { className: "w-100 dn-m dn-l dn-xl inter pt1 pb6 pl3 pt3 f8" , __self: this, __source: {fileName: _jsxFileName$7, lineNumber: 116}} + ) + ); + } + + return ( + react.createElement('div', { className: "h-100 w-100 flex flex-column overflow-y-scroll" , __self: this, __source: {fileName: _jsxFileName$7, lineNumber: 115}} + , react.createElement('div', { className: "w-100 dn-m dn-l dn-xl inter pt1 pb6 pl3 pt3 f8" , __self: this, __source: {fileName: _jsxFileName$7, lineNumber: 116}} , react.createElement(Link, { to: "/~contacts/", __self: this, __source: {fileName: _jsxFileName$7, lineNumber: 117}}, "⟵ All Groups") - ) - , react.createElement('div', { className: "w-100 w-50-l w-50-xl mb4 pr6 pr0-l pr0-xl" , __self: this, __source: {fileName: _jsxFileName$7, lineNumber: 119}} + ) + , react.createElement('div', { className: "w-100 w-50-l w-50-xl mb4 pr6 pr0-l pr0-xl" , __self: this, __source: {fileName: _jsxFileName$7, lineNumber: 119}} , react.createElement('h2', { className: "f8 pl3 pt4" , __self: this, __source: {fileName: _jsxFileName$7, lineNumber: 120}}, "Create New Group" ) , react.createElement('h2', { className: "f8 pl3 pt6" , __self: this, __source: {fileName: _jsxFileName$7, lineNumber: 121}}, "Group Name" ) , react.createElement('p', { className: "f9 pl3 gray2 lh-copy" , __self: this, __source: {fileName: _jsxFileName$7, lineNumber: 122}}, "Alphanumeric characters and hyphens only" ) , react.createElement('textarea', { - className: "f7 ba b--gray3 w-100 pa3 ml3 mt2" , - rows: 1, - placeholder: "example-group-name", - style: { - resize: "none", - height: 48, - paddingTop: 14 - }, - onChange: this.groupNameChange, __self: this, __source: {fileName: _jsxFileName$7, lineNumber: 123}}) + className: "f7 ba b--gray3 w-100 pa3 ml3 mt2" , + rows: 1, + placeholder: "example-group-name", + style: { + resize: "none", + height: 48, + paddingTop: 14 + }, + onChange: this.groupNameChange, __self: this, __source: {fileName: _jsxFileName$7, lineNumber: 123}}) , groupNameErrElem /*

Group Avatar

- Select a color to represent your group + Select a color to represent your group