summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-rw-r--r--web/react/components/admin_console/gitlab_settings.jsx16
-rw-r--r--web/react/components/admin_console/user_item.jsx6
-rw-r--r--web/react/components/member_list_team_item.jsx6
-rw-r--r--web/react/components/post_info.jsx1
-rw-r--r--web/react/components/team_import_tab.jsx6
-rw-r--r--web/react/components/user_settings/user_settings_appearance.jsx2
-rw-r--r--web/react/utils/markdown.jsx38
-rw-r--r--web/react/utils/text_formatting.jsx9
-rw-r--r--web/react/utils/utils.jsx1
-rw-r--r--web/sass-files/sass/partials/_admin-console.scss3
-rw-r--r--web/sass-files/sass/partials/_content.scss1
-rw-r--r--web/sass-files/sass/partials/_post.scss27
-rw-r--r--web/sass-files/sass/partials/_responsive.scss9
13 files changed, 63 insertions, 62 deletions
diff --git a/web/react/components/admin_console/gitlab_settings.jsx b/web/react/components/admin_console/gitlab_settings.jsx
index 6b97287e4..5c22bf5cf 100644
--- a/web/react/components/admin_console/gitlab_settings.jsx
+++ b/web/react/components/admin_console/gitlab_settings.jsx
@@ -113,7 +113,15 @@ export default class GitLabSettings extends React.Component {
/>
{'false'}
</label>
- <p className='help-text'>{'When true, Mattermost allows team creation and account signup using GitLab OAuth. To configure, log in to your GitLab account and go to Applications -> Profile Settings. Enter Redirect URIs "<your-mattermost-url>/login/gitlab/complete" (example: http://localhost:8065/login/gitlab/complete) and "<your-mattermost-url>/signup/gitlab/complete". Then use "Secret" and "Id" fields to complete the options below.'}</p>
+ <p className='help-text'>
+ {'When true, Mattermost allows team creation and account signup using GitLab OAuth.'} <br/>
+ </p>
+ <ol className='help-text'>
+ <li>{'Log in to your GitLab account and go to Applications -> Profile Settings.'}</li>
+ <li>{'Enter Redirect URIs "<your-mattermost-url>/login/gitlab/complete" (example: http://localhost:8065/login/gitlab/complete) and "<your-mattermost-url>/signup/gitlab/complete". '}</li>
+ <li>{'Then use "Secret" and "Id" fields from GitLab to complete the options below.'}</li>
+ <li>{'Complete the Endpoint URLs below. '}</li>
+ </ol>
</div>
</div>
@@ -179,7 +187,7 @@ export default class GitLabSettings extends React.Component {
onChange={this.handleChange}
disabled={!this.state.Enable}
/>
- <p className='help-text'>{'Enter <your-gitlab-url>/oauth/authorize (example http://localhost:3000/oauth/authorize). Make sure you use HTTP or HTTPS in your URLs as appropriate.'}</p>
+ <p className='help-text'>{'Enter https://<your-gitlab-url>/oauth/authorize (example https://example.com:3000/oauth/authorize). Make sure you use HTTP or HTTPS in your URL depending on your server configuration.'}</p>
</div>
</div>
@@ -201,7 +209,7 @@ export default class GitLabSettings extends React.Component {
onChange={this.handleChange}
disabled={!this.state.Enable}
/>
- <p className='help-text'>{'Enter <your-gitlab-url>/oauth/token. Make sure you use HTTP or HTTPS in your URLs as appropriate.'}</p>
+ <p className='help-text'>{'Enter https://<your-gitlab-url>/oauth/token. Make sure you use HTTP or HTTPS in your URL depending on your server configuration.'}</p>
</div>
</div>
@@ -223,7 +231,7 @@ export default class GitLabSettings extends React.Component {
onChange={this.handleChange}
disabled={!this.state.Enable}
/>
- <p className='help-text'>{'Enter <your-gitlab-url>/api/v3/user. Make sure you use HTTP or HTTPS in your URLs as appropriate.'}</p>
+ <p className='help-text'>{'Enter https://<your-gitlab-url>/api/v3/user. Make sure you use HTTP or HTTPS in your URL depending on your server configuration.'}</p>
</div>
</div>
diff --git a/web/react/components/admin_console/user_item.jsx b/web/react/components/admin_console/user_item.jsx
index 665ccd719..395e22e6c 100644
--- a/web/react/components/admin_console/user_item.jsx
+++ b/web/react/components/admin_console/user_item.jsx
@@ -111,8 +111,10 @@ export default class UserItem extends React.Component {
const user = this.props.user;
let currentRoles = 'Member';
if (user.roles.length > 0) {
- if (user.roles.indexOf('system_admin') > -1) {
+ if (Utils.isSystemAdmin(user.roles)) {
currentRoles = 'System Admin';
+ } else if (Utils.isAdmin(user.roles)) {
+ currentRoles = 'Team Admin';
} else {
currentRoles = user.roles.charAt(0).toUpperCase() + user.roles.slice(1);
}
@@ -158,7 +160,7 @@ export default class UserItem extends React.Component {
href='#'
onClick={this.handleMakeAdmin}
>
- {'Make Admin'}
+ {'Make Team Admin'}
</a>
</li>
);
diff --git a/web/react/components/member_list_team_item.jsx b/web/react/components/member_list_team_item.jsx
index 9a104aa32..3af1d3800 100644
--- a/web/react/components/member_list_team_item.jsx
+++ b/web/react/components/member_list_team_item.jsx
@@ -82,8 +82,10 @@ export default class MemberListTeamItem extends React.Component {
const timestamp = UserStore.getCurrentUser().update_at;
if (user.roles.length > 0) {
- if (user.roles.indexOf('system_admin') > -1) {
+ if (Utils.isSystemAdmin(user.roles)) {
currentRoles = 'System Admin';
+ } else if (Utils.isAdmin(user.roles)) {
+ currentRoles = 'Team Admin';
} else {
currentRoles = user.roles.charAt(0).toUpperCase() + user.roles.slice(1);
}
@@ -112,7 +114,7 @@ export default class MemberListTeamItem extends React.Component {
href='#'
onClick={this.handleMakeAdmin}
>
- {'Make Admin'}
+ {'Make Team Admin'}
</a>
</li>
);
diff --git a/web/react/components/post_info.jsx b/web/react/components/post_info.jsx
index 87962641f..7addd825f 100644
--- a/web/react/components/post_info.jsx
+++ b/web/react/components/post_info.jsx
@@ -150,6 +150,7 @@ export default class PostInfo extends React.Component {
<ul className='post-header post-info'>
<li className='post-header-col'>
<OverlayTrigger
+ container={this}
placement='top'
overlay={tooltip}
>
diff --git a/web/react/components/team_import_tab.jsx b/web/react/components/team_import_tab.jsx
index 40f06c382..a80b1a472 100644
--- a/web/react/components/team_import_tab.jsx
+++ b/web/react/components/team_import_tab.jsx
@@ -34,14 +34,14 @@ export default class TeamImportTab extends React.Component {
render() {
var uploadHelpText = (
<div>
- <p>{'Slack does not allow you to export files, images, private groups or direct messages stored in Slack. Therefore, Slack import to Mattermost only supports importing of text messages in your Slack team\'\s public channels.'}</p>
- <p>{'The Slack import to Mattermost is in "Preview". Slack bot posts do not yet import and Slack @mentions are not currently supported.'}</p>
+ <p>{'To import a team from Slack go to Slack > Team Settings > Import/Export Data > Export > Start Export. Slack does not allow you to export files, images, private groups or direct messages stored in Slack. Therefore, Slack import to Mattermost only supports importing of text messages in your Slack team\'\s public channels.'}</p>
+ <p>{'The Slack import to Mattermost is in "Beta". Slack bot posts do not yet import and Slack @mentions are not currently supported.'}</p>
</div>
);
var uploadSection = (
<SettingUpload
- title='Import from Slack'
+ title='Import from Slack (Beta)'
submit={this.doImportSlack}
helpText={uploadHelpText}
fileTypesAccepted='.zip'
diff --git a/web/react/components/user_settings/user_settings_appearance.jsx b/web/react/components/user_settings/user_settings_appearance.jsx
index 6d64e83b6..a16440d55 100644
--- a/web/react/components/user_settings/user_settings_appearance.jsx
+++ b/web/react/components/user_settings/user_settings_appearance.jsx
@@ -178,7 +178,7 @@ export default class UserSettingsAppearance extends React.Component {
href='#'
onClick={this.submitTheme}
>
- {'Submit'}
+ {'Save'}
</a>
<a
className='btn btn-sm theme'
diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx
index 848b1ea75..12d6dd424 100644
--- a/web/react/utils/markdown.jsx
+++ b/web/react/utils/markdown.jsx
@@ -6,31 +6,7 @@ const Utils = require('./utils.jsx');
const marked = require('marked');
-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 {
+export class MattermostMarkdownRenderer extends marked.Renderer {
constructor(options, formattingOptions = {}) {
super(options);
@@ -92,15 +68,3 @@ 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 6778d341a..2b6e6e14e 100644
--- a/web/react/utils/text_formatting.jsx
+++ b/web/react/utils/text_formatting.jsx
@@ -8,6 +8,8 @@ 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:
@@ -20,8 +22,11 @@ export function formatText(text, options = {}) {
let output;
if (!('markdown' in options) || options.markdown) {
- // the markdown renderer will call doFormatText as necessary
- output = Markdown.format(text, options);
+ // the markdown renderer will call doFormatText as necessary so just call marked
+ output = marked(text, {
+ renderer: new Markdown.MattermostMarkdownRenderer(null, options),
+ sanitize: true
+ });
} else {
output = sanitizeHtml(text);
output = doFormatText(output, options);
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 6a5188974..91502352e 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -508,6 +508,7 @@ export function applyTheme(theme) {
changeCss('.post:hover, .modal .more-channel-table tbody>tr:hover td, .sidebar--right .sidebar--right__header, .settings-modal .settings-table .settings-content .section-min:hover', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1);
changeCss('.date-separator.hovered--before:after, .date-separator.hovered--after:before, .new-separator.hovered--after:before, .new-separator.hovered--before:after', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1);
changeCss('.command-name:hover, .mentions-name:hover, .mentions-focus, .dropdown-menu>li>a:focus, .dropdown-menu>li>a:hover', 'background:' + changeOpacity(theme.centerChannelColor, 0.15), 1);
+ changeCss('code', 'background:' + changeOpacity(theme.centerChannelColor, 0.1), 1);
changeCss('.post.current--user:hover .post-body ', 'background: none;', 1);
changeCss('.sidebar--right', 'color:' + theme.centerChannelColor, 2);
}
diff --git a/web/sass-files/sass/partials/_admin-console.scss b/web/sass-files/sass/partials/_admin-console.scss
index 09907da6d..4b4fc1664 100644
--- a/web/sass-files/sass/partials/_admin-console.scss
+++ b/web/sass-files/sass/partials/_admin-console.scss
@@ -117,6 +117,9 @@
.form-group {
margin-bottom: 25px;
}
+ ul, ol {
+ padding-left: 23px;
+ }
.help-text {
margin: 10px 0 0 15px;
color: #777;
diff --git a/web/sass-files/sass/partials/_content.scss b/web/sass-files/sass/partials/_content.scss
index c8c205047..64d253283 100644
--- a/web/sass-files/sass/partials/_content.scss
+++ b/web/sass-files/sass/partials/_content.scss
@@ -28,6 +28,7 @@
bottom: 0;
left: 0;
width: 100%;
+ z-index: 6;
}
.post-list {
.new-messages-hr {
diff --git a/web/sass-files/sass/partials/_post.scss b/web/sass-files/sass/partials/_post.scss
index 85bb2eb28..b457d0dd2 100644
--- a/web/sass-files/sass/partials/_post.scss
+++ b/web/sass-files/sass/partials/_post.scss
@@ -147,12 +147,12 @@ body.ios {
&::-webkit-scrollbar {
width: 0px !important;
}
- &.inactive {
- display: none;
- }
- &.active {
- display: inline;
- }
+ &.inactive {
+ display: none;
+ }
+ &.active {
+ display: inline;
+ }
}
.post-list__table {
display: table;
@@ -407,6 +407,8 @@ body.ios {
display: none;
}
.post-body {
+ position: relative;
+ z-index: 5;
max-width: 100%;
width: 600px;
float: left;
@@ -431,10 +433,13 @@ body.ios {
}
}
.post-header {
+ position: relative;
list-style-type: none;
margin: 0 0 1px;
padding-left: 0px;
&.post-header-post {
+ position: relative;
+ z-index: 5;
width: 200px;
text-align: right;
float: left;
@@ -519,9 +524,9 @@ body.ios {
}
.bot-indicator {
- background-color: lightgrey;
- border-radius:2px;
- padding-left:2px;
- padding-right:2px;
- font-family:"Courier New"
+ background-color: lightgrey;
+ border-radius:2px;
+ padding-left:2px;
+ padding-right:2px;
+ font-family:"Courier New"
}
diff --git a/web/sass-files/sass/partials/_responsive.scss b/web/sass-files/sass/partials/_responsive.scss
index 4e532c16e..447f47d87 100644
--- a/web/sass-files/sass/partials/_responsive.scss
+++ b/web/sass-files/sass/partials/_responsive.scss
@@ -73,6 +73,10 @@
display: inline;
.post-info {
display: inline;
+ .tooltip {
+ margin-top: -25px;
+ margin-left: 40px;
+ }
.post-profile-time {
margin: 0;
}
@@ -153,6 +157,10 @@
display: inline;
.post-info {
display: inline;
+ .tooltip {
+ margin-top: -25px;
+ margin-left: 40px;
+ }
.post-profile-time {
width: auto;
margin: 0;
@@ -327,6 +335,7 @@
}
.modal-title {
float: none;
+ max-width: 90%;
}
.btn {
&.btn-primary {