Upgrading ESLint and adding some more rules. Refactoring to meet these new rules
Этот коммит содержится в:
@@ -4,7 +4,9 @@
|
|||||||
"jsx": true,
|
"jsx": true,
|
||||||
"blockBindings": true,
|
"blockBindings": true,
|
||||||
"modules": true,
|
"modules": true,
|
||||||
"classes": true
|
"classes": true,
|
||||||
|
"arrowFunctions": true,
|
||||||
|
"defaultParams": true,
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"react"
|
"react"
|
||||||
@@ -34,16 +36,16 @@
|
|||||||
"no-inner-declarations": 0,
|
"no-inner-declarations": 0,
|
||||||
"no-invalid-regexp": 2,
|
"no-invalid-regexp": 2,
|
||||||
"no-irregular-whitespace": 2,
|
"no-irregular-whitespace": 2,
|
||||||
|
"no-unexpected-multiline": 2,
|
||||||
"no-unreachable": 2,
|
"no-unreachable": 2,
|
||||||
"valid-typeof": 2,
|
"valid-typeof": 2,
|
||||||
"no-unexpected-multiline": 2,
|
|
||||||
|
|
||||||
"block-scoped-var": 1,
|
"block-scoped-var": 1,
|
||||||
"complexity": [0, 8],
|
"complexity": [0, 8],
|
||||||
"consistent-return": 2,
|
"consistent-return": 2,
|
||||||
"curly": [2, "all"],
|
"curly": [2, "all"],
|
||||||
"dot-notation": 2,
|
|
||||||
"dot-location": [2, "object"],
|
"dot-location": [2, "object"],
|
||||||
|
"dot-notation": 2,
|
||||||
"eqeqeq": [2, "smart"],
|
"eqeqeq": [2, "smart"],
|
||||||
"guard-for-in": 1,
|
"guard-for-in": 1,
|
||||||
"no-alert": 1,
|
"no-alert": 1,
|
||||||
@@ -78,8 +80,9 @@
|
|||||||
"no-self-compare": 2,
|
"no-self-compare": 2,
|
||||||
"no-sequences": 2,
|
"no-sequences": 2,
|
||||||
"no-throw-literal": 2,
|
"no-throw-literal": 2,
|
||||||
"no-unused-expressions": 2,
|
|
||||||
"no-undef-init": 2,
|
"no-undef-init": 2,
|
||||||
|
"no-unused-expressions": 2,
|
||||||
|
"no-useless-concat": 0,
|
||||||
"no-void": 2,
|
"no-void": 2,
|
||||||
"no-warning-comments": 0,
|
"no-warning-comments": 0,
|
||||||
"no-with": 2,
|
"no-with": 2,
|
||||||
@@ -135,12 +138,31 @@
|
|||||||
"space-unary-ops": [2, { "words": true, "nonwords": false }],
|
"space-unary-ops": [2, { "words": true, "nonwords": false }],
|
||||||
"wrap-regex": 2,
|
"wrap-regex": 2,
|
||||||
|
|
||||||
|
// ES6 stuff
|
||||||
|
"arrow-parens": [2, "always"],
|
||||||
|
"arrow-spacing": [2, { "before": true, "after": true }],
|
||||||
|
"constructor-super": 2,
|
||||||
|
"generator-star-spacing": [2, {"before": false, "after": true}],
|
||||||
|
"no-class-assign": 2,
|
||||||
|
"no-const-assign": 2,
|
||||||
|
"no-dupe-class-members": 2,
|
||||||
|
"no-this-before-super": 2,
|
||||||
|
"no-var": 0,
|
||||||
|
"object-shorthand": [0, "always"],
|
||||||
|
"prefer-arrow-callback": 0,
|
||||||
|
"prefer-const": 0,
|
||||||
|
"prefer-spread": 2,
|
||||||
|
"prefer-reflect": 0,
|
||||||
|
"prefer-template": 0,
|
||||||
|
"require-yield": 0,
|
||||||
|
|
||||||
// React Specific
|
// React Specific
|
||||||
"react/display-name": [2, { "acceptTranspilerName": true }],
|
"react/display-name": [2, { "acceptTranspilerName": true }],
|
||||||
"react/jsx-boolean-value": [2, "always"],
|
"react/jsx-boolean-value": [2, "always"],
|
||||||
|
"react/jsx-closing-bracket-location": [2, { "location": "tag-aligned" }],
|
||||||
"react/jsx-curly-spacing": [2, "never"],
|
"react/jsx-curly-spacing": [2, "never"],
|
||||||
|
"react/jsx-indent-props": [2, 4],
|
||||||
"react/jsx-max-props-per-line": [2, { "maximum": 1 }],
|
"react/jsx-max-props-per-line": [2, { "maximum": 1 }],
|
||||||
// SOON "react/jsx-indent-props": [2, 4],
|
|
||||||
"react/jsx-no-duplicate-props": [2, { "ignoreCase": false }],
|
"react/jsx-no-duplicate-props": [2, { "ignoreCase": false }],
|
||||||
"react/jsx-no-literals": 0,
|
"react/jsx-no-literals": 0,
|
||||||
"react/jsx-no-undef": 2,
|
"react/jsx-no-undef": 2,
|
||||||
@@ -151,10 +173,11 @@
|
|||||||
"react/no-did-mount-set-state": 2,
|
"react/no-did-mount-set-state": 2,
|
||||||
"react/no-did-update-set-state": 2,
|
"react/no-did-update-set-state": 2,
|
||||||
"react/no-multi-comp": 2,
|
"react/no-multi-comp": 2,
|
||||||
|
"react/no-set-state": 0,
|
||||||
"react/no-unknown-property": 2,
|
"react/no-unknown-property": 2,
|
||||||
"react/prop-types": 2,
|
"react/prop-types": 2,
|
||||||
"react/sort-comp": 0,
|
|
||||||
"react/self-closing-comp": 2,
|
"react/self-closing-comp": 2,
|
||||||
|
"react/sort-comp": 0,
|
||||||
"react/wrap-multilines": 2
|
"react/wrap-multilines": 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,27 +34,27 @@ export default class CommandList extends React.Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className='modal fade'
|
className='modal fade'
|
||||||
ref='modal'
|
ref='modal'
|
||||||
id='channel_info'
|
id='channel_info'
|
||||||
tabIndex='-1'
|
tabIndex='-1'
|
||||||
role='dialog'
|
role='dialog'
|
||||||
aria-hidden='true'
|
aria-hidden='true'
|
||||||
>
|
>
|
||||||
<div className='modal-dialog'>
|
<div className='modal-dialog'>
|
||||||
<div className='modal-content'>
|
<div className='modal-content'>
|
||||||
<div className='modal-header'>
|
<div className='modal-header'>
|
||||||
<button
|
<button
|
||||||
type='button'
|
type='button'
|
||||||
className='close'
|
className='close'
|
||||||
data-dismiss='modal'
|
data-dismiss='modal'
|
||||||
aria-label='Close'
|
aria-label='Close'
|
||||||
>
|
>
|
||||||
<span aria-hidden='true'>×</span>
|
<span aria-hidden='true'>×</span>
|
||||||
</button>
|
</button>
|
||||||
<h4
|
<h4
|
||||||
className='modal-title'
|
className='modal-title'
|
||||||
id='myModalLabel'
|
id='myModalLabel'
|
||||||
>
|
>
|
||||||
<span className='name'>{channel.display_name}</span>
|
<span className='name'>{channel.display_name}</span>
|
||||||
</h4>
|
</h4>
|
||||||
@@ -75,9 +75,9 @@ export default class CommandList extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
<div className='modal-footer'>
|
<div className='modal-footer'>
|
||||||
<button
|
<button
|
||||||
type='button'
|
type='button'
|
||||||
className='btn btn-default'
|
className='btn btn-default'
|
||||||
data-dismiss='modal'
|
data-dismiss='modal'
|
||||||
>Close</button>
|
>Close</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -146,8 +146,8 @@ export default class ChannelInviteModal extends React.Component {
|
|||||||
aria-hidden='true'
|
aria-hidden='true'
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className='modal-dialog'
|
className='modal-dialog'
|
||||||
role='document'
|
role='document'
|
||||||
>
|
>
|
||||||
<div className='modal-content'>
|
<div className='modal-content'>
|
||||||
<div className='modal-header'>
|
<div className='modal-header'>
|
||||||
|
|||||||
@@ -296,7 +296,8 @@ export default class CreatePost extends React.Component {
|
|||||||
<FilePreview
|
<FilePreview
|
||||||
files={this.state.previews}
|
files={this.state.previews}
|
||||||
onRemove={this.removePreview}
|
onRemove={this.removePreview}
|
||||||
uploadsInProgress={this.state.uploadsInProgress} />
|
uploadsInProgress={this.state.uploadsInProgress}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -321,7 +322,8 @@ export default class CreatePost extends React.Component {
|
|||||||
createMessage='Write a message...'
|
createMessage='Write a message...'
|
||||||
channelId={this.state.channelId}
|
channelId={this.state.channelId}
|
||||||
id='post_textbox'
|
id='post_textbox'
|
||||||
ref='textbox' />
|
ref='textbox'
|
||||||
|
/>
|
||||||
<FileUpload
|
<FileUpload
|
||||||
ref='fileUpload'
|
ref='fileUpload'
|
||||||
getFileCount={this.getFileCount}
|
getFileCount={this.getFileCount}
|
||||||
@@ -329,7 +331,8 @@ export default class CreatePost extends React.Component {
|
|||||||
onFileUpload={this.handleFileUploadComplete}
|
onFileUpload={this.handleFileUploadComplete}
|
||||||
onUploadError={this.handleUploadError}
|
onUploadError={this.handleUploadError}
|
||||||
postType='post'
|
postType='post'
|
||||||
channelId='' />
|
channelId=''
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className={postFooterClassName}>
|
<div className={postFooterClassName}>
|
||||||
{postError}
|
{postError}
|
||||||
|
|||||||
@@ -88,7 +88,8 @@ export default class EditPostModal extends React.Component {
|
|||||||
id='edit_post'
|
id='edit_post'
|
||||||
role='dialog'
|
role='dialog'
|
||||||
tabIndex='-1'
|
tabIndex='-1'
|
||||||
aria-hidden='true' >
|
aria-hidden='true'
|
||||||
|
>
|
||||||
<div className='modal-dialog modal-push-down'>
|
<div className='modal-dialog modal-push-down'>
|
||||||
<div className='modal-content'>
|
<div className='modal-content'>
|
||||||
<div className='modal-header'>
|
<div className='modal-header'>
|
||||||
@@ -97,7 +98,8 @@ export default class EditPostModal extends React.Component {
|
|||||||
className='close'
|
className='close'
|
||||||
data-dismiss='modal'
|
data-dismiss='modal'
|
||||||
aria-label='Close'
|
aria-label='Close'
|
||||||
onClick={this.handleEditClose}>
|
onClick={this.handleEditClose}
|
||||||
|
>
|
||||||
<span aria-hidden='true'>×</span>
|
<span aria-hidden='true'>×</span>
|
||||||
</button>
|
</button>
|
||||||
<h4 className='modal-title'>Edit {this.state.title}</h4>
|
<h4 className='modal-title'>Edit {this.state.title}</h4>
|
||||||
@@ -110,20 +112,22 @@ export default class EditPostModal extends React.Component {
|
|||||||
createMessage='Edit the post...'
|
createMessage='Edit the post...'
|
||||||
id='edit_textbox'
|
id='edit_textbox'
|
||||||
ref='editbox'
|
ref='editbox'
|
||||||
/>
|
/>
|
||||||
{error}
|
{error}
|
||||||
</div>
|
</div>
|
||||||
<div className='modal-footer'>
|
<div className='modal-footer'>
|
||||||
<button
|
<button
|
||||||
type='button'
|
type='button'
|
||||||
className='btn btn-default'
|
className='btn btn-default'
|
||||||
data-dismiss='modal' >
|
data-dismiss='modal'
|
||||||
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type='button'
|
type='button'
|
||||||
className='btn btn-primary'
|
className='btn btn-primary'
|
||||||
onClick={this.handleEdit}>
|
onClick={this.handleEdit}
|
||||||
|
>
|
||||||
Save
|
Save
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,12 +24,14 @@ export default class EmailVerify extends React.Component {
|
|||||||
} else {
|
} else {
|
||||||
title = config.SiteName + ' Email Not Verified';
|
title = config.SiteName + ' Email Not Verified';
|
||||||
body = <p>Please verify your email address. Check your inbox for an email.</p>;
|
body = <p>Please verify your email address. Check your inbox for an email.</p>;
|
||||||
resend = (<button
|
resend = (
|
||||||
onClick={this.handleResend}
|
<button
|
||||||
className='btn btn-primary'
|
onClick={this.handleResend}
|
||||||
>
|
className='btn btn-primary'
|
||||||
Resend Email
|
>
|
||||||
</button>);
|
Resend Email
|
||||||
|
</button>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -69,7 +69,8 @@ export default class ErrorBar extends React.Component {
|
|||||||
<a
|
<a
|
||||||
href='#'
|
href='#'
|
||||||
className='error-bar__close'
|
className='error-bar__close'
|
||||||
onClick={this.handleClose}>
|
onClick={this.handleClose}
|
||||||
|
>
|
||||||
×
|
×
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -101,10 +101,13 @@ export default class FileAttachment extends React.Component {
|
|||||||
|
|
||||||
var thumbnail;
|
var thumbnail;
|
||||||
if (type === 'image') {
|
if (type === 'image') {
|
||||||
thumbnail = (<div
|
thumbnail = (
|
||||||
ref={filename}
|
<div
|
||||||
className='post__load'
|
ref={filename}
|
||||||
style={{backgroundImage: 'url(/static/images/load.gif)'}} />);
|
className='post__load'
|
||||||
|
style={{backgroundImage: 'url(/static/images/load.gif)'}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
thumbnail = <div className={'file-icon ' + utils.getIconClassName(type)}/>;
|
thumbnail = <div className={'file-icon ' + utils.getIconClassName(type)}/>;
|
||||||
}
|
}
|
||||||
@@ -135,20 +138,23 @@ export default class FileAttachment extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className='post-image__column'
|
className='post-image__column'
|
||||||
key={filename}>
|
key={filename}
|
||||||
|
>
|
||||||
<a className='post-image__thumbnail'
|
<a className='post-image__thumbnail'
|
||||||
href='#'
|
href='#'
|
||||||
onClick={this.props.handleImageClick}
|
onClick={this.props.handleImageClick}
|
||||||
data-img-id={this.props.index}
|
data-img-id={this.props.index}
|
||||||
data-toggle='modal'
|
data-toggle='modal'
|
||||||
data-target={'#' + this.props.modalId} >
|
data-target={'#' + this.props.modalId}
|
||||||
|
>
|
||||||
{thumbnail}
|
{thumbnail}
|
||||||
</a>
|
</a>
|
||||||
<div className='post-image__details'>
|
<div className='post-image__details'>
|
||||||
<div
|
<div
|
||||||
data-toggle='tooltip'
|
data-toggle='tooltip'
|
||||||
title={filenameString}
|
title={filenameString}
|
||||||
className='post-image__name' >
|
className='post-image__name'
|
||||||
|
>
|
||||||
{trimmedFilename}
|
{trimmedFilename}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ export default class FileAttachmentList extends React.Component {
|
|||||||
filename={filenames[i]}
|
filename={filenames[i]}
|
||||||
index={i}
|
index={i}
|
||||||
modalId={modalId}
|
modalId={modalId}
|
||||||
handleImageClick={this.handleImageClick} />
|
handleImageClick={this.handleImageClick}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,7 +43,8 @@ export default class FileAttachmentList extends React.Component {
|
|||||||
userId={this.props.userId}
|
userId={this.props.userId}
|
||||||
modalId={modalId}
|
modalId={modalId}
|
||||||
startId={this.state.startImgId}
|
startId={this.state.startImgId}
|
||||||
filenames={filenames} />
|
filenames={filenames}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,10 @@ export default class FindTeam extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
className='btn btn-md btn-primary'
|
className='btn btn-md btn-primary'
|
||||||
type='submit'>Send</button>
|
type='submit'
|
||||||
|
>
|
||||||
|
Send
|
||||||
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -23,14 +23,16 @@ export default class MemberList extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<div className='member-list-holder'>
|
<div className='member-list-holder'>
|
||||||
{members.map(function mymembers(member) {
|
{members.map(function mymembers(member) {
|
||||||
return (<MemberListItem
|
return (
|
||||||
key={member.id}
|
<MemberListItem
|
||||||
member={member}
|
key={member.id}
|
||||||
isAdmin={this.props.isAdmin}
|
member={member}
|
||||||
handleInvite={this.props.handleInvite}
|
isAdmin={this.props.isAdmin}
|
||||||
handleRemove={this.props.handleRemove}
|
handleInvite={this.props.handleInvite}
|
||||||
handleMakeAdmin={this.props.handleMakeAdmin}
|
handleRemove={this.props.handleRemove}
|
||||||
/>);
|
handleMakeAdmin={this.props.handleMakeAdmin}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}, this)}
|
}, this)}
|
||||||
{message}
|
{message}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -36,8 +36,10 @@ export default class MemberListItem extends React.Component {
|
|||||||
invite = (
|
invite = (
|
||||||
<a
|
<a
|
||||||
onClick={this.handleInvite}
|
onClick={this.handleInvite}
|
||||||
className='btn btn-sm btn-primary member-invite'>
|
className='btn btn-sm btn-primary member-invite'
|
||||||
<i className='glyphicon glyphicon-envelope'/> Add
|
>
|
||||||
|
<i className='glyphicon glyphicon-envelope'/>
|
||||||
|
{' Add'}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
} else if (isAdmin && !isMemberAdmin && (member.id !== UserStore.getCurrentId())) {
|
} else if (isAdmin && !isMemberAdmin && (member.id !== UserStore.getCurrentId())) {
|
||||||
@@ -50,7 +52,9 @@ export default class MemberListItem extends React.Component {
|
|||||||
<a
|
<a
|
||||||
href=''
|
href=''
|
||||||
role='menuitem'
|
role='menuitem'
|
||||||
onClick={self.handleMakeAdmin}>Make Admin
|
onClick={self.handleMakeAdmin}
|
||||||
|
>
|
||||||
|
Make Admin
|
||||||
</a>
|
</a>
|
||||||
</li>);
|
</li>);
|
||||||
}
|
}
|
||||||
@@ -62,7 +66,9 @@ export default class MemberListItem extends React.Component {
|
|||||||
<a
|
<a
|
||||||
href=''
|
href=''
|
||||||
role='menuitem'
|
role='menuitem'
|
||||||
onClick={self.handleRemove}>Remove Member
|
onClick={self.handleRemove}
|
||||||
|
>
|
||||||
|
Remove Member
|
||||||
</a>
|
</a>
|
||||||
</li>);
|
</li>);
|
||||||
}
|
}
|
||||||
@@ -75,14 +81,16 @@ export default class MemberListItem extends React.Component {
|
|||||||
type='button'
|
type='button'
|
||||||
id='channel_header_dropdown'
|
id='channel_header_dropdown'
|
||||||
data-toggle='dropdown'
|
data-toggle='dropdown'
|
||||||
aria-expanded='true' >
|
aria-expanded='true'
|
||||||
|
>
|
||||||
<span className='text-capitalize'>{member.roles || 'Member'} </span>
|
<span className='text-capitalize'>{member.roles || 'Member'} </span>
|
||||||
<span className='caret'></span>
|
<span className='caret'></span>
|
||||||
</a>
|
</a>
|
||||||
<ul
|
<ul
|
||||||
className='dropdown-menu member-menu'
|
className='dropdown-menu member-menu'
|
||||||
role='menu'
|
role='menu'
|
||||||
aria-labelledby='channel_header_dropdown'>
|
aria-labelledby='channel_header_dropdown'
|
||||||
|
>
|
||||||
{makeAdminOption}
|
{makeAdminOption}
|
||||||
{handleRemoveOption}
|
{handleRemoveOption}
|
||||||
</ul>
|
</ul>
|
||||||
@@ -98,7 +106,8 @@ export default class MemberListItem extends React.Component {
|
|||||||
className='post-profile-img pull-left'
|
className='post-profile-img pull-left'
|
||||||
src={'/api/v1/users/' + member.id + '/image?time=' + timestamp}
|
src={'/api/v1/users/' + member.id + '/image?time=' + timestamp}
|
||||||
height='36'
|
height='36'
|
||||||
width='36' />
|
width='36'
|
||||||
|
/>
|
||||||
<span className='member-name'>{member.username}</span>
|
<span className='member-name'>{member.username}</span>
|
||||||
<span className='member-email'>{member.email}</span>
|
<span className='member-email'>{member.email}</span>
|
||||||
{invite}
|
{invite}
|
||||||
|
|||||||
@@ -19,11 +19,14 @@ export default class Mention extends React.Component {
|
|||||||
if (this.props.id === 'allmention' || this.props.id === 'channelmention') {
|
if (this.props.id === 'allmention' || this.props.id === 'channelmention') {
|
||||||
icon = <span><i className='mention-img fa fa-users fa-2x'></i></span>;
|
icon = <span><i className='mention-img fa fa-users fa-2x'></i></span>;
|
||||||
} else if (this.props.id != null) {
|
} else if (this.props.id != null) {
|
||||||
icon = (<span><img
|
icon = (
|
||||||
className='mention-img'
|
<span>
|
||||||
src={'/api/v1/users/' + this.props.id + '/image?time=' + timestamp}
|
<img
|
||||||
/>
|
className='mention-img'
|
||||||
</span>);
|
src={'/api/v1/users/' + this.props.id + '/image?time=' + timestamp}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
icon = <span><i className='mention-img fa fa-users fa-2x'></i></span>;
|
icon = <span><i className='mention-img fa fa-users fa-2x'></i></span>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -216,7 +216,8 @@ export default class MentionList extends React.Component {
|
|||||||
listId={index}
|
listId={index}
|
||||||
isFocused={isFocused}
|
isFocused={isFocused}
|
||||||
handleMouseEnter={this.handleMouseEnter.bind(this, index)}
|
handleMouseEnter={this.handleMouseEnter.bind(this, index)}
|
||||||
handleClick={this.handleClick} />
|
handleClick={this.handleClick}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
@@ -240,11 +241,13 @@ export default class MentionList extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className='mentions--top'
|
className='mentions--top'
|
||||||
style={style}>
|
style={style}
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
ref='mentionlist'
|
ref='mentionlist'
|
||||||
className='mentions-box'
|
className='mentions-box'
|
||||||
id='mentionsbox'>
|
id='mentionsbox'
|
||||||
|
>
|
||||||
{mentions}
|
{mentions}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -86,15 +86,21 @@ export default class MoreChannels extends React.Component {
|
|||||||
{channels.map(function cMap(channel, index) {
|
{channels.map(function cMap(channel, index) {
|
||||||
var joinButton;
|
var joinButton;
|
||||||
if (self.state.joiningChannel === index) {
|
if (self.state.joiningChannel === index) {
|
||||||
joinButton = (<img
|
joinButton = (
|
||||||
className='join-channel-loading-gif'
|
<img
|
||||||
src='/static/images/load.gif'
|
className='join-channel-loading-gif'
|
||||||
/>);
|
src='/static/images/load.gif'
|
||||||
|
/>
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
joinButton = (<button
|
joinButton = (
|
||||||
onClick={self.handleJoin.bind(self, channel, index)}
|
<button
|
||||||
className='btn btn-primary'>Join
|
onClick={self.handleJoin.bind(self, channel, index)}
|
||||||
</button>);
|
className='btn btn-primary'
|
||||||
|
>
|
||||||
|
Join
|
||||||
|
</button>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -152,7 +158,9 @@ export default class MoreChannels extends React.Component {
|
|||||||
data-channeltype={this.state.channelType}
|
data-channeltype={this.state.channelType}
|
||||||
type='button'
|
type='button'
|
||||||
className='btn btn-primary channel-create-btn'
|
className='btn btn-primary channel-create-btn'
|
||||||
onClick={this.handleNewChannel}>Create New Channel
|
onClick={this.handleNewChannel}
|
||||||
|
>
|
||||||
|
Create New Channel
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className='modal-body'>
|
<div className='modal-body'>
|
||||||
|
|||||||
@@ -61,15 +61,17 @@ export default class NavbarDropdown extends React.Component {
|
|||||||
if (currentUser != null) {
|
if (currentUser != null) {
|
||||||
isAdmin = currentUser.roles.indexOf('admin') > -1;
|
isAdmin = currentUser.roles.indexOf('admin') > -1;
|
||||||
|
|
||||||
inviteLink = (<li>
|
inviteLink = (
|
||||||
<a
|
<li>
|
||||||
href='#'
|
<a
|
||||||
data-toggle='modal'
|
href='#'
|
||||||
data-target='#invite_member'
|
data-toggle='modal'
|
||||||
>
|
data-target='#invite_member'
|
||||||
Invite New Member
|
>
|
||||||
</a>
|
Invite New Member
|
||||||
</li>);
|
</a>
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
|
||||||
if (this.props.teamType === 'O') {
|
if (this.props.teamType === 'O') {
|
||||||
teamLink = (
|
teamLink = (
|
||||||
@@ -89,15 +91,17 @@ export default class NavbarDropdown extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isAdmin) {
|
if (isAdmin) {
|
||||||
manageLink = (<li>
|
manageLink = (
|
||||||
<a
|
<li>
|
||||||
href='#'
|
<a
|
||||||
data-toggle='modal'
|
href='#'
|
||||||
data-target='#team_members'
|
data-toggle='modal'
|
||||||
>
|
data-target='#team_members'
|
||||||
Manage Team
|
>
|
||||||
</a>
|
Manage Team
|
||||||
</li>);
|
</a>
|
||||||
|
</li>
|
||||||
|
);
|
||||||
teamSettings = (<li>
|
teamSettings = (<li>
|
||||||
<a
|
<a
|
||||||
href='#'
|
href='#'
|
||||||
@@ -111,11 +115,13 @@ export default class NavbarDropdown extends React.Component {
|
|||||||
|
|
||||||
var teams = [];
|
var teams = [];
|
||||||
|
|
||||||
teams.push(<li
|
teams.push(
|
||||||
className='divider'
|
<li
|
||||||
key='div'
|
className='divider'
|
||||||
>
|
key='div'
|
||||||
</li>);
|
>
|
||||||
|
</li>
|
||||||
|
);
|
||||||
if (this.state.teams.length > 1 && this.state.currentTeam) {
|
if (this.state.teams.length > 1 && this.state.currentTeam) {
|
||||||
var curTeamName = this.state.currentTeam.name;
|
var curTeamName = this.state.currentTeam.name;
|
||||||
this.state.teams.forEach(function listTeams(teamName) {
|
this.state.teams.forEach(function listTeams(teamName) {
|
||||||
|
|||||||
@@ -134,14 +134,16 @@ export default class NewChannelModal extends React.Component {
|
|||||||
ref='modal'
|
ref='modal'
|
||||||
tabIndex='-1'
|
tabIndex='-1'
|
||||||
role='dialog'
|
role='dialog'
|
||||||
aria-hidden='true'>
|
aria-hidden='true'
|
||||||
|
>
|
||||||
<div className='modal-dialog'>
|
<div className='modal-dialog'>
|
||||||
<div className='modal-content'>
|
<div className='modal-content'>
|
||||||
<div className='modal-header'>
|
<div className='modal-header'>
|
||||||
<button
|
<button
|
||||||
type='button'
|
type='button'
|
||||||
className='close'
|
className='close'
|
||||||
data-dismiss='modal'>
|
data-dismiss='modal'
|
||||||
|
>
|
||||||
<span aria-hidden='true'>×</span>
|
<span aria-hidden='true'>×</span>
|
||||||
<span className='sr-only'>Cancel</span>
|
<span className='sr-only'>Cancel</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -157,7 +159,8 @@ export default class NewChannelModal extends React.Component {
|
|||||||
ref='display_name'
|
ref='display_name'
|
||||||
className='form-control'
|
className='form-control'
|
||||||
placeholder='Enter display name'
|
placeholder='Enter display name'
|
||||||
maxLength='22' />
|
maxLength='22'
|
||||||
|
/>
|
||||||
{displayNameError}
|
{displayNameError}
|
||||||
</div>
|
</div>
|
||||||
<div className={nameClass}>
|
<div className={nameClass}>
|
||||||
@@ -167,7 +170,8 @@ export default class NewChannelModal extends React.Component {
|
|||||||
className='form-control'
|
className='form-control'
|
||||||
ref='channel_name'
|
ref='channel_name'
|
||||||
placeholder="lowercase alphanumeric's only"
|
placeholder="lowercase alphanumeric's only"
|
||||||
maxLength='22' />
|
maxLength='22'
|
||||||
|
/>
|
||||||
{nameError}
|
{nameError}
|
||||||
</div>
|
</div>
|
||||||
<div className='form-group'>
|
<div className='form-group'>
|
||||||
@@ -177,7 +181,8 @@ export default class NewChannelModal extends React.Component {
|
|||||||
ref='channel_desc'
|
ref='channel_desc'
|
||||||
rows='3'
|
rows='3'
|
||||||
placeholder='Description'
|
placeholder='Description'
|
||||||
maxLength='1024' />
|
maxLength='1024'
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
{serverError}
|
{serverError}
|
||||||
</div>
|
</div>
|
||||||
@@ -185,13 +190,15 @@ export default class NewChannelModal extends React.Component {
|
|||||||
<button
|
<button
|
||||||
type='button'
|
type='button'
|
||||||
className='btn btn-default'
|
className='btn btn-default'
|
||||||
data-dismiss='modal' >
|
data-dismiss='modal'
|
||||||
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={this.handleSubmit}
|
onClick={this.handleSubmit}
|
||||||
type='submit'
|
type='submit'
|
||||||
className='btn btn-primary' >
|
className='btn btn-primary'
|
||||||
|
>
|
||||||
Create New {channelTerm}
|
Create New {channelTerm}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -143,7 +143,8 @@ export default class Post extends React.Component {
|
|||||||
className='post-profile-img'
|
className='post-profile-img'
|
||||||
src={'/api/v1/users/' + post.user_id + '/image?time=' + timestamp}
|
src={'/api/v1/users/' + post.user_id + '/image?time=' + timestamp}
|
||||||
height='36'
|
height='36'
|
||||||
width='36' />
|
width='36'
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -152,7 +153,8 @@ export default class Post extends React.Component {
|
|||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
id={post.id}
|
id={post.id}
|
||||||
className={'post ' + sameUserClass + ' ' + rootUser + ' ' + postType + ' ' + currentUserCss} >
|
className={'post ' + sameUserClass + ' ' + rootUser + ' ' + postType + ' ' + currentUserCss}
|
||||||
|
>
|
||||||
{profilePic}
|
{profilePic}
|
||||||
<div className='post__content'>
|
<div className='post__content'>
|
||||||
<PostHeader
|
<PostHeader
|
||||||
@@ -161,21 +163,24 @@ export default class Post extends React.Component {
|
|||||||
sameRoot={this.props.sameRoot}
|
sameRoot={this.props.sameRoot}
|
||||||
commentCount={commentCount}
|
commentCount={commentCount}
|
||||||
handleCommentClick={this.handleCommentClick}
|
handleCommentClick={this.handleCommentClick}
|
||||||
isLastComment={this.props.isLastComment} />
|
isLastComment={this.props.isLastComment}
|
||||||
|
/>
|
||||||
<PostBody
|
<PostBody
|
||||||
post={post}
|
post={post}
|
||||||
sameRoot={this.props.sameRoot}
|
sameRoot={this.props.sameRoot}
|
||||||
parentPost={parentPost}
|
parentPost={parentPost}
|
||||||
posts={posts}
|
posts={posts}
|
||||||
handleCommentClick={this.handleCommentClick}
|
handleCommentClick={this.handleCommentClick}
|
||||||
retryPost={this.retryPost} />
|
retryPost={this.retryPost}
|
||||||
|
/>
|
||||||
<PostInfo
|
<PostInfo
|
||||||
ref='info'
|
ref='info'
|
||||||
post={post}
|
post={post}
|
||||||
sameRoot={this.props.sameRoot}
|
sameRoot={this.props.sameRoot}
|
||||||
commentCount={commentCount}
|
commentCount={commentCount}
|
||||||
handleCommentClick={this.handleCommentClick}
|
handleCommentClick={this.handleCommentClick}
|
||||||
allowReply='true' />
|
allowReply='true'
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -559,7 +559,7 @@ export default class PostList extends React.Component {
|
|||||||
>
|
>
|
||||||
<hr
|
<hr
|
||||||
className='separator__hr'
|
className='separator__hr'
|
||||||
/>
|
/>
|
||||||
<div className='separator__text'>New Messages</div>
|
<div className='separator__text'>New Messages</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -161,7 +161,8 @@ export default class RhsComment extends React.Component {
|
|||||||
filenames={post.filenames}
|
filenames={post.filenames}
|
||||||
modalId={'rhs_comment_view_image_modal_' + post.id}
|
modalId={'rhs_comment_view_image_modal_' + post.id}
|
||||||
channelId={post.channel_id}
|
channelId={post.channel_id}
|
||||||
userId={post.user_id} />
|
userId={post.user_id}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,8 @@ export default class RhsRootPost extends React.Component {
|
|||||||
filenames={post.filenames}
|
filenames={post.filenames}
|
||||||
modalId={'rhs_view_image_modal_' + post.id}
|
modalId={'rhs_view_image_modal_' + post.id}
|
||||||
channelId={post.channel_id}
|
channelId={post.channel_id}
|
||||||
userId={post.user_id} />
|
userId={post.user_id}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -173,8 +173,7 @@ export default class RhsThread extends React.Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='post-right__container'>
|
<div className='post-right__container'>
|
||||||
<FileUploadOverlay
|
<FileUploadOverlay overlayType='right' />
|
||||||
overlayType='right' />
|
|
||||||
<div className='search-bar__container sidebar--right__search-header'>{searchForm}</div>
|
<div className='search-bar__container sidebar--right__search-header'>{searchForm}</div>
|
||||||
<div className='sidebar-right__body'>
|
<div className='sidebar-right__body'>
|
||||||
<RhsHeaderPost
|
<RhsHeaderPost
|
||||||
|
|||||||
@@ -116,19 +116,22 @@ export default class SearchBar extends React.Component {
|
|||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
className='sidebar__collapse'
|
className='sidebar__collapse'
|
||||||
onClick={this.handleClose} >
|
onClick={this.handleClose}
|
||||||
|
>
|
||||||
<span className='fa fa-angle-left'></span>
|
<span className='fa fa-angle-left'></span>
|
||||||
</div>
|
</div>
|
||||||
<span
|
<span
|
||||||
className='search__clear'
|
className='search__clear'
|
||||||
onClick={this.clearFocus}>
|
onClick={this.clearFocus}
|
||||||
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</span>
|
</span>
|
||||||
<form
|
<form
|
||||||
role='form'
|
role='form'
|
||||||
className='search__form relative-div'
|
className='search__form relative-div'
|
||||||
onSubmit={this.handleSubmit}>
|
onSubmit={this.handleSubmit}
|
||||||
<span className='glyphicon glyphicon-search sidebar__search-icon'></span>
|
>
|
||||||
|
<span className='glyphicon glyphicon-search sidebar__search-icon' />
|
||||||
<input
|
<input
|
||||||
type='text'
|
type='text'
|
||||||
ref='search'
|
ref='search'
|
||||||
@@ -136,7 +139,8 @@ export default class SearchBar extends React.Component {
|
|||||||
placeholder='Search'
|
placeholder='Search'
|
||||||
value={this.state.searchTerm}
|
value={this.state.searchTerm}
|
||||||
onFocus={this.handleUserFocus}
|
onFocus={this.handleUserFocus}
|
||||||
onChange={this.handleUserInput} />
|
onChange={this.handleUserInput}
|
||||||
|
/>
|
||||||
{isSearching}
|
{isSearching}
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -20,11 +20,15 @@ export default class SettingItemMax extends React.Component {
|
|||||||
|
|
||||||
var submit = '';
|
var submit = '';
|
||||||
if (this.props.submit) {
|
if (this.props.submit) {
|
||||||
submit = (<a
|
submit = (
|
||||||
className='btn btn-sm btn-primary'
|
<a
|
||||||
href='#'
|
className='btn btn-sm btn-primary'
|
||||||
onClick={this.props.submit}>
|
href='#'
|
||||||
Submit</a>);
|
onClick={this.props.submit}
|
||||||
|
>
|
||||||
|
Submit
|
||||||
|
</a>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
var inputs = this.props.inputs;
|
var inputs = this.props.inputs;
|
||||||
@@ -46,7 +50,8 @@ export default class SettingItemMax extends React.Component {
|
|||||||
<a
|
<a
|
||||||
className='btn btn-sm theme'
|
className='btn btn-sm theme'
|
||||||
href='#'
|
href='#'
|
||||||
onClick={this.props.updateSection} >
|
onClick={this.props.updateSection}
|
||||||
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -98,12 +98,13 @@ export default class SettingPicture extends React.Component {
|
|||||||
<li className='setting-list-item'>
|
<li className='setting-list-item'>
|
||||||
{serverError}
|
{serverError}
|
||||||
{clientError}
|
{clientError}
|
||||||
<span className='btn btn-sm btn-primary btn-file sel-btn'
|
<span className='btn btn-sm btn-primary btn-file sel-btn'>
|
||||||
>Select<input
|
Select
|
||||||
ref='input'
|
<input
|
||||||
accept='.jpg,.png,.bmp'
|
ref='input'
|
||||||
type='file'
|
accept='.jpg,.png,.bmp'
|
||||||
onChange={this.props.pictureChange}
|
type='file'
|
||||||
|
onChange={this.props.pictureChange}
|
||||||
/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
{confirmButton}
|
{confirmButton}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
// See License.txt for license information.
|
// See License.txt for license information.
|
||||||
|
|
||||||
export default class SettingsUpload extends React.Component {
|
export default class SettingsUpload extends React.Component {
|
||||||
|
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
@@ -70,14 +69,19 @@ export default class SettingsUpload extends React.Component {
|
|||||||
<li className='col-xs-offset-3 col-xs-8'>
|
<li className='col-xs-offset-3 col-xs-8'>
|
||||||
<ul className='setting-list'>
|
<ul className='setting-list'>
|
||||||
<li className='setting-list-item'>
|
<li className='setting-list-item'>
|
||||||
<span className='btn btn-sm btn-primary btn-file sel-btn'>Select file<input
|
<span className='btn btn-sm btn-primary btn-file sel-btn'>
|
||||||
ref='uploadinput'
|
Select file
|
||||||
accept={this.props.fileTypesAccepted}
|
<input
|
||||||
type='file'
|
ref='uploadinput'
|
||||||
onChange={this.onFileSelect}/></span>
|
accept={this.props.fileTypesAccepted}
|
||||||
|
type='file'
|
||||||
|
onChange={this.onFileSelect}
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
<a
|
<a
|
||||||
className={'btn btn-sm btn-primary'}
|
className={'btn btn-sm btn-primary'}
|
||||||
onClick={this.doSubmit}>
|
onClick={this.doSubmit}
|
||||||
|
>
|
||||||
Import
|
Import
|
||||||
</a>
|
</a>
|
||||||
<div className='file-status file-name hide'></div>
|
<div className='file-status file-name hide'></div>
|
||||||
|
|||||||
@@ -29,10 +29,12 @@ export default class SidebarHeader extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (me.last_picture_update) {
|
if (me.last_picture_update) {
|
||||||
profilePicture = (<img
|
profilePicture = (
|
||||||
className='user__picture'
|
<img
|
||||||
src={'/api/v1/users/' + me.id + '/image?time=' + me.update_at}
|
className='user__picture'
|
||||||
/>);
|
src={'/api/v1/users/' + me.id + '/image?time=' + me.update_at}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -71,10 +71,12 @@ export default class SidebarRight extends React.Component {
|
|||||||
if (this.state.search_visible) {
|
if (this.state.search_visible) {
|
||||||
content = <SearchResults isMentionSearch={this.state.is_mention_search} />;
|
content = <SearchResults isMentionSearch={this.state.is_mention_search} />;
|
||||||
} else if (this.state.post_right_visible) {
|
} else if (this.state.post_right_visible) {
|
||||||
content = (<RhsThread
|
content = (
|
||||||
fromSearch={this.state.from_search}
|
<RhsThread
|
||||||
isMentionSearch={this.state.is_mention_search}
|
fromSearch={this.state.from_search}
|
||||||
/>);
|
isMentionSearch={this.state.is_mention_search}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ export default class SidebarRightMenu extends React.Component {
|
|||||||
href='#'
|
href='#'
|
||||||
data-toggle='modal'
|
data-toggle='modal'
|
||||||
data-target='#team_members'
|
data-target='#team_members'
|
||||||
><i className='glyphicon glyphicon-wrench'></i>Manage Team</a>
|
>
|
||||||
|
<i className='glyphicon glyphicon-wrench'></i>Manage Team</a>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,52 +44,66 @@ export default class SignupTeamComplete extends React.Component {
|
|||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
if (this.state.wizard === 'welcome') {
|
if (this.state.wizard === 'welcome') {
|
||||||
return (<WelcomePage
|
return (
|
||||||
state={this.state}
|
<WelcomePage
|
||||||
updateParent={this.updateParent}
|
state={this.state}
|
||||||
/>);
|
updateParent={this.updateParent}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.wizard === 'team_display_name') {
|
if (this.state.wizard === 'team_display_name') {
|
||||||
return (<TeamDisplayNamePage
|
return (
|
||||||
state={this.state}
|
<TeamDisplayNamePage
|
||||||
updateParent={this.updateParent}
|
state={this.state}
|
||||||
/>);
|
updateParent={this.updateParent}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.wizard === 'team_url') {
|
if (this.state.wizard === 'team_url') {
|
||||||
return (<TeamURLPage
|
return (
|
||||||
state={this.state}
|
<TeamURLPage
|
||||||
updateParent={this.updateParent}
|
state={this.state}
|
||||||
/>);
|
updateParent={this.updateParent}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.wizard === 'allowed_domains') {
|
if (this.state.wizard === 'allowed_domains') {
|
||||||
return (<AllowedDomainsPage
|
return (
|
||||||
state={this.state}
|
<AllowedDomainsPage
|
||||||
updateParent={this.updateParent}
|
state={this.state}
|
||||||
/>);
|
updateParent={this.updateParent}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.wizard === 'send_invites') {
|
if (this.state.wizard === 'send_invites') {
|
||||||
return (<SendInivtesPage
|
return (
|
||||||
state={this.state}
|
<SendInivtesPage
|
||||||
updateParent={this.updateParent}
|
state={this.state}
|
||||||
/>);
|
updateParent={this.updateParent}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.wizard === 'username') {
|
if (this.state.wizard === 'username') {
|
||||||
return (<UsernamePage
|
return (
|
||||||
state={this.state}
|
<UsernamePage
|
||||||
updateParent={this.updateParent}
|
state={this.state}
|
||||||
/>);
|
updateParent={this.updateParent}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.state.wizard === 'password') {
|
if (this.state.wizard === 'password') {
|
||||||
return (<PasswordPage
|
return (
|
||||||
state={this.state}
|
<PasswordPage
|
||||||
updateParent={this.updateParent}
|
state={this.state}
|
||||||
/>);
|
updateParent={this.updateParent}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (<div>You've already completed the signup process for this invitation or this invitation has expired.</div>);
|
return (<div>You've already completed the signup process for this invitation or this invitation has expired.</div>);
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ export default class TeamImportTab extends React.Component {
|
|||||||
title='Import from Slack'
|
title='Import from Slack'
|
||||||
submit={this.doImportSlack}
|
submit={this.doImportSlack}
|
||||||
helpText={uploadHelpText}
|
helpText={uploadHelpText}
|
||||||
fileTypesAccepted='.zip'/>
|
fileTypesAccepted='.zip'
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
var messageSection;
|
var messageSection;
|
||||||
@@ -62,14 +63,30 @@ export default class TeamImportTab extends React.Component {
|
|||||||
break;
|
break;
|
||||||
case 'done':
|
case 'done':
|
||||||
messageSection = (
|
messageSection = (
|
||||||
<p className='confirm-import alert alert-success'><i className='fa fa-check'></i> Import successful: <a href={this.state.link}
|
<p className='confirm-import alert alert-success'>
|
||||||
download='MattermostImportSummary.txt'>View Summary</a></p>
|
<i className='fa fa-check' />
|
||||||
);
|
{' Import successful: '}
|
||||||
|
<a
|
||||||
|
href={this.state.link}
|
||||||
|
download='MattermostImportSummary.txt'
|
||||||
|
>
|
||||||
|
{'View Summary'}
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
case 'fail':
|
case 'fail':
|
||||||
messageSection = (
|
messageSection = (
|
||||||
<p className='confirm-import alert alert-warning'><i className='fa fa-warning'></i> Import failure: <a href={this.state.link}
|
<p className='confirm-import alert alert-warning'>
|
||||||
download='MattermostImportSummary.txt'>View Summary</a></p>
|
<i className='fa fa-warning' />
|
||||||
|
{' Import failure: '}
|
||||||
|
<a
|
||||||
|
href={this.state.link}
|
||||||
|
download='MattermostImportSummary.txt'
|
||||||
|
>
|
||||||
|
{'View Summary'}
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ export default class ChooseAuthPage extends React.Component {
|
|||||||
this.props.updatePage('service', Constants.GITLAB_SERVICE);
|
this.props.updatePage('service', Constants.GITLAB_SERVICE);
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<span className='icon' />
|
<span className='icon' />
|
||||||
<span>Create new {strings.Team} with GitLab Account</span>
|
<span>Create new {strings.Team} with GitLab Account</span>
|
||||||
</a>
|
</a>
|
||||||
@@ -40,7 +40,7 @@ export default class ChooseAuthPage extends React.Component {
|
|||||||
this.props.updatePage('email', '');
|
this.props.updatePage('email', '');
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<span className='fa fa-envelope' />
|
<span className='fa fa-envelope' />
|
||||||
<span>Create new {strings.Team} with email address</span>
|
<span>Create new {strings.Team} with email address</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -52,8 +52,8 @@ export default class TeamSignupDisplayNamePage extends React.Component {
|
|||||||
<form>
|
<form>
|
||||||
<img
|
<img
|
||||||
className='signup-team-logo'
|
className='signup-team-logo'
|
||||||
src='/static/images/logo.png' />
|
src='/static/images/logo.png'
|
||||||
|
/>
|
||||||
<h2>{utils.toTitleCase(strings.Team) + ' Name'}</h2>
|
<h2>{utils.toTitleCase(strings.Team) + ' Name'}</h2>
|
||||||
<div className={nameDivClass}>
|
<div className={nameDivClass}>
|
||||||
<div className='row'>
|
<div className='row'>
|
||||||
@@ -66,22 +66,27 @@ export default class TeamSignupDisplayNamePage extends React.Component {
|
|||||||
maxLength='128'
|
maxLength='128'
|
||||||
defaultValue={this.props.state.team.display_name}
|
defaultValue={this.props.state.team.display_name}
|
||||||
autoFocus={true}
|
autoFocus={true}
|
||||||
onFocus={this.handleFocus} />
|
onFocus={this.handleFocus}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{nameError}
|
{nameError}
|
||||||
</div>
|
</div>
|
||||||
<div>{'Name your ' + strings.Team + ' in any language. Your ' + strings.Team + ' name shows in menus and headings.'}</div>
|
<div>
|
||||||
|
{'Name your ' + strings.Team + ' in any language. Your ' + strings.Team + ' name shows in menus and headings.'}
|
||||||
|
</div>
|
||||||
<button
|
<button
|
||||||
type='submit'
|
type='submit'
|
||||||
className='btn btn-primary margin--extra'
|
className='btn btn-primary margin--extra'
|
||||||
onClick={this.submitNext} >
|
onClick={this.submitNext}
|
||||||
|
>
|
||||||
Next<i className='glyphicon glyphicon-chevron-right'></i>
|
Next<i className='glyphicon glyphicon-chevron-right'></i>
|
||||||
</button>
|
</button>
|
||||||
<div className='margin--extra'>
|
<div className='margin--extra'>
|
||||||
<a
|
<a
|
||||||
href='#'
|
href='#'
|
||||||
onClick={this.submitBack}>
|
onClick={this.submitBack}
|
||||||
|
>
|
||||||
Back to previous step
|
Back to previous step
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -307,7 +307,8 @@ export default class ViewImageModal extends React.Component {
|
|||||||
ref='previewArrowLeft'
|
ref='previewArrowLeft'
|
||||||
className='modal-prev-bar'
|
className='modal-prev-bar'
|
||||||
href='#'
|
href='#'
|
||||||
onClick={this.handlePrev}>
|
onClick={this.handlePrev}
|
||||||
|
>
|
||||||
<i className='image-control image-prev'/>
|
<i className='image-control image-prev'/>
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
@@ -317,7 +318,8 @@ export default class ViewImageModal extends React.Component {
|
|||||||
ref='previewArrowRight'
|
ref='previewArrowRight'
|
||||||
className='modal-next-bar'
|
className='modal-next-bar'
|
||||||
href='#'
|
href='#'
|
||||||
onClick={this.handleNext}>
|
onClick={this.handleNext}
|
||||||
|
>
|
||||||
<i className='image-control image-next'/>
|
<i className='image-control image-next'/>
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
@@ -351,7 +353,7 @@ export default class ViewImageModal extends React.Component {
|
|||||||
ref='imageFooter'
|
ref='imageFooter'
|
||||||
className='modal-button-bar'
|
className='modal-button-bar'
|
||||||
>
|
>
|
||||||
<span className='pull-left text'>{'File ' + (this.state.imgId + 1) + ' of ' + this.props.filenames.length}</span>
|
<span className='pull-left text'>{'File ' + (this.state.imgId + 1) + ' of ' + this.props.filenames.length}</span>
|
||||||
<div className='image-links'>
|
<div className='image-links'>
|
||||||
{publicLink}
|
{publicLink}
|
||||||
<a
|
<a
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
"babelify": "^6.1.3",
|
"babelify": "^6.1.3",
|
||||||
"uglify-js": "^2.4.24",
|
"uglify-js": "^2.4.24",
|
||||||
"watchify": "^3.3.1",
|
"watchify": "^3.3.1",
|
||||||
"eslint": "^1.1.0",
|
"eslint": "^1.3.1",
|
||||||
"eslint-plugin-react": "^3.2.3"
|
"eslint-plugin-react": "^3.3.1"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "watchify --extension=jsx -o ../static/js/bundle.js -v -d ./**/*.jsx",
|
"start": "watchify --extension=jsx -o ../static/js/bundle.js -v -d ./**/*.jsx",
|
||||||
|
|||||||
@@ -73,7 +73,8 @@ function setupChannelPage(teamName, teamType, teamId, channelName, channelId) {
|
|||||||
React.render(
|
React.render(
|
||||||
<Sidebar
|
<Sidebar
|
||||||
teamDisplayName={teamName}
|
teamDisplayName={teamName}
|
||||||
teamType={teamType} />,
|
teamType={teamType}
|
||||||
|
/>,
|
||||||
document.getElementById('sidebar-left')
|
document.getElementById('sidebar-left')
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -190,7 +191,8 @@ function setupChannelPage(teamName, teamType, teamId, channelName, channelId) {
|
|||||||
React.render(
|
React.render(
|
||||||
<SidebarRightMenu
|
<SidebarRightMenu
|
||||||
teamDisplayName={teamName}
|
teamDisplayName={teamName}
|
||||||
teamType={teamType} />,
|
teamType={teamType}
|
||||||
|
/>,
|
||||||
document.getElementById('sidebar-menu')
|
document.getElementById('sidebar-menu')
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -226,7 +228,8 @@ function setupChannelPage(teamName, teamType, teamId, channelName, channelId) {
|
|||||||
|
|
||||||
React.render(
|
React.render(
|
||||||
<FileUploadOverlay
|
<FileUploadOverlay
|
||||||
overlayType='center' />,
|
overlayType='center'
|
||||||
|
/>,
|
||||||
document.getElementById('file_upload_overlay')
|
document.getElementById('file_upload_overlay')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ function setupLoginPage(teamDisplayName, teamName, authServices) {
|
|||||||
<Login
|
<Login
|
||||||
teamDisplayName={teamDisplayName}
|
teamDisplayName={teamDisplayName}
|
||||||
teamName={teamName}
|
teamName={teamName}
|
||||||
authServices={authServices} />,
|
authServices={authServices}
|
||||||
|
/>,
|
||||||
document.getElementById('login')
|
document.getElementById('login')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ function setupSignupTeamCompletePage(email, data, hash) {
|
|||||||
<SignupTeamComplete
|
<SignupTeamComplete
|
||||||
email={email}
|
email={email}
|
||||||
hash={hash}
|
hash={hash}
|
||||||
data={data}/>,
|
data={data}
|
||||||
|
/>,
|
||||||
document.getElementById('signup-team-complete')
|
document.getElementById('signup-team-complete')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,8 @@ function setupSignupUserCompletePage(email, name, uiName, id, data, hash, authSe
|
|||||||
email={email}
|
email={email}
|
||||||
hash={hash}
|
hash={hash}
|
||||||
data={data}
|
data={data}
|
||||||
authServices={authServices} />,
|
authServices={authServices}
|
||||||
|
/>,
|
||||||
document.getElementById('signup-user-complete')
|
document.getElementById('signup-user-complete')
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ global.window.setupVerifyPage = function setupVerifyPage(isVerified, teamURL, us
|
|||||||
<EmailVerify
|
<EmailVerify
|
||||||
isVerified={isVerified}
|
isVerified={isVerified}
|
||||||
teamURL={teamURL}
|
teamURL={teamURL}
|
||||||
userEmail={userEmail} />,
|
userEmail={userEmail}
|
||||||
|
/>,
|
||||||
document.getElementById('verify')
|
document.getElementById('verify')
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user