diff options
23 files changed, 68 insertions, 18 deletions
diff --git a/doc/README.md b/doc/README.md index fcda4fd08..7ee2bb46c 100644 --- a/doc/README.md +++ b/doc/README.md @@ -33,7 +33,7 @@ Set up Mattermost in your data center _Note: End user help documentation is a new feature being completed for the v1.2 release. The materials below are work in progress._ - User Interface - - [Manage Team](help/Manage-Team.md) + - [Manage Members](help/Manage-Members.md) - Team Settings - [Slack Import](help/Slack-Import.md) diff --git a/doc/help/Manage-Team.md b/doc/help/Manage-Members.md index b45ea4283..04243f9fb 100644 --- a/doc/help/Manage-Team.md +++ b/doc/help/Manage-Members.md @@ -1,10 +1,10 @@ -# Manage Team +# Manage Members -The Manage Team menu is used to change the user roles assigned to members belonging to a team. +The Manage Members menu is used to change the user roles assigned to members belonging to a team. ## User Roles -The following user roles are assigned from the **Manage Team** menu option in the team site main menu. +The following user roles are assigned from the **Manage Members** menu option in the team site main menu. ### System Admin @@ -23,7 +23,7 @@ The Team Administrator is typically a non-technical end user and has the followi - Access to the "Team Settings" menu from the team site main menu - Ability to change the team name and import data from Slack export files -- Access to the "Manage Team" menu and change user roles to the levels of Team Administrator, Member and Inactive +- Access to the "Manage Members" menu and change user roles to the levels of Team Administrator, Member and Inactive ### Member diff --git a/doc/help/README.md b/doc/help/README.md index d07424c70..9271d64dd 100644 --- a/doc/help/README.md +++ b/doc/help/README.md @@ -8,5 +8,5 @@ _Note: Help documentation is a work-in-progress. Community contributions highly You can access the **Team Site Main Menu** by clicking on the three vertical dots at the top of the left sidebar in a team site. Here we describe the various options available from the menu: -- [Manage Teams](Manage-Team.md) +- [Manage Members](Manage-Members.md) diff --git a/docker/1.1/Dockerfile b/docker/1.1/Dockerfile index 600d33308..855dd4375 100644 --- a/docker/1.1/Dockerfile +++ b/docker/1.1/Dockerfile @@ -34,7 +34,7 @@ VOLUME /var/lib/mysql WORKDIR /mattermost # Copy over files -ADD https://github.com/mattermost/platform/releases/download/v1.1.0-rc1/mattermost.tar.gz / +ADD https://github.com/mattermost/platform/releases/download/v1.1.0-rc2/mattermost.tar.gz / RUN tar -zxvf /mattermost.tar.gz --strip-components=1 && rm /mattermost.tar.gz ADD config_docker.json / ADD docker-entry.sh / diff --git a/web/react/components/email_verify.jsx b/web/react/components/email_verify.jsx index 2b413b848..9be7f97f8 100644 --- a/web/react/components/email_verify.jsx +++ b/web/react/components/email_verify.jsx @@ -22,7 +22,7 @@ export default class EmailVerify extends React.Component { title = global.window.config.SiteName + ' Email Verified'; body = <p>Your email has been verified! Click <a href={this.props.teamURL + '?email=' + this.props.userEmail}>here</a> to log in.</p>; } else { - title = global.window.config.SiteName + ' Email Not Verified'; + title = global.window.config.SiteName + ': You are almost done'; body = <p>Please verify your email address. Check your inbox for an email.</p>; resend = ( <button diff --git a/web/react/components/find_team.jsx b/web/react/components/find_team.jsx index 59c4e08e3..9e3e3a683 100644 --- a/web/react/components/find_team.jsx +++ b/web/react/components/find_team.jsx @@ -70,6 +70,7 @@ export default class FindTeam extends React.Component { className='form-control' placeholder='you@domain.com' maxLength='128' + spellCheck='false' /> {emailError} </div> diff --git a/web/react/components/invite_member_modal.jsx b/web/react/components/invite_member_modal.jsx index 2ca39d1b1..c2f2c15ac 100644 --- a/web/react/components/invite_member_modal.jsx +++ b/web/react/components/invite_member_modal.jsx @@ -211,6 +211,7 @@ export default class InviteMemberModal extends React.Component { placeholder='First name' maxLength='64' disabled={!this.state.emailEnabled} + spellCheck='false' /> {firstNameError} </div> @@ -224,6 +225,7 @@ export default class InviteMemberModal extends React.Component { placeholder='Last name' maxLength='64' disabled={!this.state.emailEnabled} + spellCheck='false' /> {lastNameError} </div> @@ -242,6 +244,7 @@ export default class InviteMemberModal extends React.Component { placeholder='email@domain.com' maxLength='64' disabled={!this.state.emailEnabled} + spellCheck='false' /> {emailError} </div> diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx index 997abce68..f81822e1e 100644 --- a/web/react/components/login.jsx +++ b/web/react/components/login.jsx @@ -136,6 +136,7 @@ export default class Login extends React.Component { defaultValue={priorEmail} ref='email' placeholder='Email' + spellCheck='false' /> </div> <div className={'form-group' + errorClass}> @@ -146,6 +147,7 @@ export default class Login extends React.Component { name='password' ref='password' placeholder='Password' + spellCheck='false' /> </div> <div className='form-group'> diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx index b6defc393..49d517419 100644 --- a/web/react/components/navbar_dropdown.jsx +++ b/web/react/components/navbar_dropdown.jsx @@ -111,7 +111,7 @@ export default class NavbarDropdown extends React.Component { data-toggle='modal' data-target='#team_members' > - {'Manage Team'} + {'Manage Members'} </a> </li> ); diff --git a/web/react/components/password_reset_form.jsx b/web/react/components/password_reset_form.jsx index 0ef187114..6112adbaf 100644 --- a/web/react/components/password_reset_form.jsx +++ b/web/react/components/password_reset_form.jsx @@ -69,6 +69,7 @@ export default class PasswordResetForm extends React.Component { name='password' ref='password' placeholder='Password' + spellCheck='false' /> </div> {error} diff --git a/web/react/components/password_reset_send_link.jsx b/web/react/components/password_reset_send_link.jsx index 78fbcaa2f..f547499b0 100644 --- a/web/react/components/password_reset_send_link.jsx +++ b/web/react/components/password_reset_send_link.jsx @@ -73,6 +73,7 @@ export default class PasswordResetSendLink extends React.Component { name='email' ref='email' placeholder='Email' + spellCheck='false' /> </div> {error} diff --git a/web/react/components/sidebar_right_menu.jsx b/web/react/components/sidebar_right_menu.jsx index ea2bcf9a4..ac101d631 100644 --- a/web/react/components/sidebar_right_menu.jsx +++ b/web/react/components/sidebar_right_menu.jsx @@ -75,7 +75,7 @@ export default class SidebarRightMenu extends React.Component { data-toggle='modal' data-target='#team_members' > - <i className='glyphicon glyphicon-wrench'></i>Manage Team</a> + <i className='glyphicon glyphicon-wrench'></i>Manage Members</a> </li> ); } diff --git a/web/react/components/signup_user_complete.jsx b/web/react/components/signup_user_complete.jsx index 8a3af707f..4f48f3dee 100644 --- a/web/react/components/signup_user_complete.jsx +++ b/web/react/components/signup_user_complete.jsx @@ -169,6 +169,7 @@ export default class SignupUserComplete extends React.Component { placeholder='' maxLength='128' autoFocus={true} + spellCheck='false' /> {emailError} </div> @@ -204,6 +205,7 @@ export default class SignupUserComplete extends React.Component { className='form-control' placeholder='' maxLength='128' + spellCheck='false' /> {nameError} <p className='form__hint'>Username must begin with a letter, and contain between 3 to 15 lowercase characters made up of numbers, letters, and the symbols '.', '-' and '_'</p> @@ -218,6 +220,7 @@ export default class SignupUserComplete extends React.Component { className='form-control' placeholder='' maxLength='128' + spellCheck='false' /> {passwordError} </div> diff --git a/web/react/components/team_signup_display_name_page.jsx b/web/react/components/team_signup_display_name_page.jsx index 65da4bc96..c91ed0811 100644 --- a/web/react/components/team_signup_display_name_page.jsx +++ b/web/react/components/team_signup_display_name_page.jsx @@ -66,6 +66,7 @@ export default class TeamSignupDisplayNamePage extends React.Component { defaultValue={this.props.state.team.display_name} autoFocus={true} onFocus={this.handleFocus} + spellCheck='false' /> </div> </div> diff --git a/web/react/components/team_signup_email_item.jsx b/web/react/components/team_signup_email_item.jsx index 219f14eef..7253e80e9 100644 --- a/web/react/components/team_signup_email_item.jsx +++ b/web/react/components/team_signup_email_item.jsx @@ -51,6 +51,7 @@ export default class TeamSignupEmailItem extends React.Component { placeholder='Email Address' defaultValue={this.props.email} maxLength='128' + spellCheck='false' /> {emailError} </div> diff --git a/web/react/components/team_signup_password_page.jsx b/web/react/components/team_signup_password_page.jsx index dce8105ca..01f961332 100644 --- a/web/react/components/team_signup_password_page.jsx +++ b/web/react/components/team_signup_password_page.jsx @@ -109,6 +109,7 @@ export default class TeamSignupPasswordPage extends React.Component { className='form-control' placeholder='' maxLength='128' + spellCheck='false' /> <div className='color--light form__hint'>Passwords must contain 5 to 50 characters. Your password will be strongest if it contains a mix of symbols, numbers, and upper and lowercase characters.</div> </div> diff --git a/web/react/components/team_signup_url_page.jsx b/web/react/components/team_signup_url_page.jsx index 398a52f7d..3fb0aaa27 100644 --- a/web/react/components/team_signup_url_page.jsx +++ b/web/react/components/team_signup_url_page.jsx @@ -111,6 +111,7 @@ export default class TeamSignupUrlPage extends React.Component { defaultValue={this.props.state.team.name} autoFocus={true} onFocus={this.handleFocus} + spellCheck='false' /> </div> </div> diff --git a/web/react/components/team_signup_username_page.jsx b/web/react/components/team_signup_username_page.jsx index 53a389c4c..85e611481 100644 --- a/web/react/components/team_signup_username_page.jsx +++ b/web/react/components/team_signup_username_page.jsx @@ -68,6 +68,7 @@ export default class TeamSignupUsernamePage extends React.Component { placeholder='' defaultValue={this.props.state.user.username} maxLength='128' + spellCheck='false' /> <div className='color--light form__hint'>Usernames must begin with a letter and contain 3 to 15 characters made up of lowercase letters, numbers, and the symbols '.', '-' and '_'</div> </div> diff --git a/web/react/components/team_signup_welcome_page.jsx b/web/react/components/team_signup_welcome_page.jsx index 78a41eed5..2d7ef081f 100644 --- a/web/react/components/team_signup_welcome_page.jsx +++ b/web/react/components/team_signup_welcome_page.jsx @@ -145,6 +145,7 @@ export default class TeamSignupWelcomePage extends React.Component { className='form-control' placeholder='Email Address' maxLength='128' + spellCheck='false' /> </div> </div> diff --git a/web/react/components/team_signup_with_email.jsx b/web/react/components/team_signup_with_email.jsx index 9376a4564..ba32a9f97 100644 --- a/web/react/components/team_signup_with_email.jsx +++ b/web/react/components/team_signup_with_email.jsx @@ -63,6 +63,7 @@ export default class EmailSignUpPage extends React.Component { className='form-control' placeholder='Email Address' maxLength='128' + spellCheck='false' /> </div> <div className='form-group'> diff --git a/web/react/components/team_signup_with_sso.jsx b/web/react/components/team_signup_with_sso.jsx index 011bfebff..6ccf762c1 100644 --- a/web/react/components/team_signup_with_sso.jsx +++ b/web/react/components/team_signup_with_sso.jsx @@ -104,6 +104,7 @@ export default class SSOSignUpPage extends React.Component { placeholder='Enter name of new team' maxLength='128' onChange={this.nameChange} + spellCheck='false' /> {nameError} </div> diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx index 12d6dd424..848b1ea75 100644 --- a/web/react/utils/markdown.jsx +++ b/web/react/utils/markdown.jsx @@ -6,7 +6,31 @@ const Utils = require('./utils.jsx'); const marked = require('marked'); -export class MattermostMarkdownRenderer extends marked.Renderer { +class MattermostInlineLexer extends marked.InlineLexer { + constructor(links, options) { + super(links, options); + + // modified version of the regex that doesn't break up words in snake_case + // the original is /^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/ + this.rules.text = /^[\s\S]+?(?=__|\b_|[\\<!\[*`]| {2,}\n|$)/; + } +} + +class MattermostParser extends marked.Parser { + parse(src) { + this.inline = new MattermostInlineLexer(src.links, this.options, this.renderer); + this.tokens = src.reverse(); + + var out = ''; + while (this.next()) { + out += this.tok(); + } + + return out; + } +} + +class MattermostMarkdownRenderer extends marked.Renderer { constructor(options, formattingOptions = {}) { super(options); @@ -68,3 +92,15 @@ export class MattermostMarkdownRenderer extends marked.Renderer { return TextFormatting.doFormatText(text, this.formattingOptions); } } + +export function format(text, options) { + const markdownOptions = { + renderer: new MattermostMarkdownRenderer(null, options), + sanitize: true + }; + + const tokens = marked.lexer(text, markdownOptions); + + return new MattermostParser(markdownOptions).parse(tokens); +} + diff --git a/web/react/utils/text_formatting.jsx b/web/react/utils/text_formatting.jsx index 2b6e6e14e..6778d341a 100644 --- a/web/react/utils/text_formatting.jsx +++ b/web/react/utils/text_formatting.jsx @@ -8,8 +8,6 @@ const Markdown = require('./markdown.jsx'); const UserStore = require('../stores/user_store.jsx'); const Utils = require('./utils.jsx'); -const marked = require('marked'); - // Performs formatting of user posts including highlighting mentions and search terms and converting urls, hashtags, and // @mentions to links by taking a user's message and returning a string of formatted html. Also takes a number of options // as part of the second parameter: @@ -22,11 +20,8 @@ export function formatText(text, options = {}) { let output; if (!('markdown' in options) || options.markdown) { - // the markdown renderer will call doFormatText as necessary so just call marked - output = marked(text, { - renderer: new Markdown.MattermostMarkdownRenderer(null, options), - sanitize: true - }); + // the markdown renderer will call doFormatText as necessary + output = Markdown.format(text, options); } else { output = sanitizeHtml(text); output = doFormatText(output, options); |