summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
Diffstat (limited to 'web/react')
-rw-r--r--web/react/components/admin_console/service_settings.jsx70
-rw-r--r--web/react/components/admin_console/team_settings.jsx22
-rw-r--r--web/react/components/team_settings_modal.jsx4
-rw-r--r--web/react/components/user_settings/manage_incoming_hooks.jsx65
-rw-r--r--web/react/components/view_image.jsx8
-rw-r--r--web/react/utils/emoticons.jsx7
6 files changed, 78 insertions, 98 deletions
diff --git a/web/react/components/admin_console/service_settings.jsx b/web/react/components/admin_console/service_settings.jsx
index 1bb1f053b..4b09fefc2 100644
--- a/web/react/components/admin_console/service_settings.jsx
+++ b/web/react/components/admin_console/service_settings.jsx
@@ -35,7 +35,7 @@ export default class ServiceSettings extends React.Component {
config.ServiceSettings.SegmentDeveloperKey = React.findDOMNode(this.refs.SegmentDeveloperKey).value.trim();
config.ServiceSettings.GoogleDeveloperKey = React.findDOMNode(this.refs.GoogleDeveloperKey).value.trim();
- config.ServiceSettings.EnableOAuthServiceProvider = React.findDOMNode(this.refs.EnableOAuthServiceProvider).checked;
+ //config.ServiceSettings.EnableOAuthServiceProvider = React.findDOMNode(this.refs.EnableOAuthServiceProvider).checked;
config.ServiceSettings.EnableIncomingWebhooks = React.findDOMNode(this.refs.EnableIncomingWebhooks).checked;
config.ServiceSettings.EnableTesting = React.findDOMNode(this.refs.EnableTesting).checked;
@@ -173,42 +173,9 @@ export default class ServiceSettings extends React.Component {
<div className='form-group'>
<label
className='control-label col-sm-4'
- htmlFor='EnableOAuthServiceProvider'
- >
- {'Enable OAuth Service Provider: '}
- </label>
- <div className='col-sm-8'>
- <label className='radio-inline'>
- <input
- type='radio'
- name='EnableOAuthServiceProvider'
- value='true'
- ref='EnableOAuthServiceProvider'
- defaultChecked={this.props.config.ServiceSettings.EnableOAuthServiceProvider}
- onChange={this.handleChange}
- />
- {'true'}
- </label>
- <label className='radio-inline'>
- <input
- type='radio'
- name='EnableOAuthServiceProvider'
- value='false'
- defaultChecked={!this.props.config.ServiceSettings.EnableOAuthServiceProvider}
- onChange={this.handleChange}
- />
- {'false'}
- </label>
- <p className='help-text'>{'When enabled Mattermost will act as an Oauth2 Provider. Changing this will require a server restart before taking effect.'}</p>
- </div>
- </div>
-
- <div className='form-group'>
- <label
- className='control-label col-sm-4'
htmlFor='EnableIncomingWebhooks'
>
- {'EnableIncomingWebhooks: '}
+ {'Enable Incoming Webhooks: '}
</label>
<div className='col-sm-8'>
<label className='radio-inline'>
@@ -291,6 +258,39 @@ export default class ServiceSettings extends React.Component {
}
}
+// <div className='form-group'>
+// <label
+// className='control-label col-sm-4'
+// htmlFor='EnableOAuthServiceProvider'
+// >
+// {'Enable OAuth Service Provider: '}
+// </label>
+// <div className='col-sm-8'>
+// <label className='radio-inline'>
+// <input
+// type='radio'
+// name='EnableOAuthServiceProvider'
+// value='true'
+// ref='EnableOAuthServiceProvider'
+// defaultChecked={this.props.config.ServiceSettings.EnableOAuthServiceProvider}
+// onChange={this.handleChange}
+// />
+// {'true'}
+// </label>
+// <label className='radio-inline'>
+// <input
+// type='radio'
+// name='EnableOAuthServiceProvider'
+// value='false'
+// defaultChecked={!this.props.config.ServiceSettings.EnableOAuthServiceProvider}
+// onChange={this.handleChange}
+// />
+// {'false'}
+// </label>
+// <p className='help-text'>{'When enabled Mattermost will act as an Oauth2 Provider. Changing this will require a server restart before taking effect.'}</p>
+// </div>
+// </div>
+
ServiceSettings.propTypes = {
config: React.PropTypes.object
};
diff --git a/web/react/components/admin_console/team_settings.jsx b/web/react/components/admin_console/team_settings.jsx
index fefc0e936..3e0890f98 100644
--- a/web/react/components/admin_console/team_settings.jsx
+++ b/web/react/components/admin_console/team_settings.jsx
@@ -28,7 +28,6 @@ export default class TeamSettings extends React.Component {
var config = this.props.config;
config.TeamSettings.SiteName = React.findDOMNode(this.refs.SiteName).value.trim();
- config.TeamSettings.DefaultThemeColor = React.findDOMNode(this.refs.DefaultThemeColor).value.trim();
config.TeamSettings.RestrictCreationToDomains = React.findDOMNode(this.refs.RestrictCreationToDomains).value.trim();
config.TeamSettings.EnableTeamCreation = React.findDOMNode(this.refs.EnableTeamCreation).checked;
config.TeamSettings.EnableUserCreation = React.findDOMNode(this.refs.EnableUserCreation).checked;
@@ -125,27 +124,6 @@ export default class TeamSettings extends React.Component {
<div className='form-group'>
<label
className='control-label col-sm-4'
- htmlFor='DefaultThemeColor'
- >
- {'Default Theme Color:'}
- </label>
- <div className='col-sm-8'>
- <input
- type='text'
- className='form-control'
- id='DefaultThemeColor'
- ref='DefaultThemeColor'
- placeholder='Ex "#2389D7"'
- defaultValue={this.props.config.TeamSettings.DefaultThemeColor}
- onChange={this.handleChange}
- />
- <p className='help-text'>{'Default theme color for team sites.'}</p>
- </div>
- </div>
-
- <div className='form-group'>
- <label
- className='control-label col-sm-4'
htmlFor='EnableTeamCreation'
>
{'Enable Team Creation: '}
diff --git a/web/react/components/team_settings_modal.jsx b/web/react/components/team_settings_modal.jsx
index a5a2b711c..a96aadccf 100644
--- a/web/react/components/team_settings_modal.jsx
+++ b/web/react/components/team_settings_modal.jsx
@@ -36,7 +36,9 @@ export default class TeamSettingsModal extends React.Component {
const tabs = [];
tabs.push({name: 'general', uiName: 'General', icon: 'glyphicon glyphicon-cog'});
tabs.push({name: 'import', uiName: 'Import', icon: 'glyphicon glyphicon-upload'});
- tabs.push({name: 'export', uiName: 'Export', icon: 'glyphicon glyphicon-download'});
+
+ // To enable export uncomment this line
+ //tabs.push({name: 'export', uiName: 'Export', icon: 'glyphicon glyphicon-download'});
return (
<div
diff --git a/web/react/components/user_settings/manage_incoming_hooks.jsx b/web/react/components/user_settings/manage_incoming_hooks.jsx
index df089a403..12c041c7f 100644
--- a/web/react/components/user_settings/manage_incoming_hooks.jsx
+++ b/web/react/components/user_settings/manage_incoming_hooks.jsx
@@ -107,23 +107,23 @@ export default class ManageIncomingHooks extends React.Component {
this.state.hooks.forEach((hook) => {
const c = ChannelStore.get(hook.channel_id);
hooks.push(
- <div>
- <div className='divider-light'></div>
- <span>
- <strong>{'URL: '}</strong>{Utils.getWindowLocationOrigin() + '/hooks/' + hook.id}
- </span>
- <br/>
- <span>
+ <div className='font--small'>
+ <div className='padding-top x2 divider-light'></div>
+ <div className='padding-top x2'>
+ <strong>{'URL: '}</strong><span className='word-break--all'>{Utils.getWindowLocationOrigin() + '/hooks/' + hook.id}</span>
+ </div>
+ <div className='padding-top'>
<strong>{'Channel: '}</strong>{c.name}
- </span>
- <br/>
- <a
- className={'btn btn-sm btn-primary'}
- href='#'
- onClick={this.removeHook.bind(this, hook.id)}
- >
- {'Remove'}
- </a>
+ </div>
+ <div className='padding-top'>
+ <a
+ className={'text-danger'}
+ href='#'
+ onClick={this.removeHook.bind(this, hook.id)}
+ >
+ {'Remove'}
+ </a>
+ </div>
</div>
);
});
@@ -134,41 +134,38 @@ export default class ManageIncomingHooks extends React.Component {
} else if (hooks.length > 0) {
displayHooks = hooks;
} else {
- displayHooks = <label>{'None'}</label>;
+ displayHooks = <label>{' None'}</label>;
}
const existingHooks = (
- <div>
- <label className='control-label'>{'Existing incoming webhooks'}</label>
- <br/>
+ <div className='padding-top x2'>
+ <label className='control-label padding-top x2'>{'Existing incoming webhooks'}</label>
{displayHooks}
</div>
);
return (
- <div
- key='addIncomingHook'
- className='form-group'
- >
+ <div key='addIncomingHook'>
<label className='control-label'>{'Add a new incoming webhook'}</label>
- <br/>
- <div>
+ <div className='padding-top'>
<select
ref='channelName'
+ className='form-control'
value={this.state.channelId}
onChange={this.updateChannelId}
>
{options}
</select>
- <br/>
{serverError}
- <a
- className={'btn btn-sm btn-primary' + disableButton}
- href='#'
- onClick={this.addNewHook}
- >
- {'Add'}
- </a>
+ <div className='padding-top'>
+ <a
+ className={'btn btn-sm btn-primary' + disableButton}
+ href='#'
+ onClick={this.addNewHook}
+ >
+ {'Add'}
+ </a>
+ </div>
</div>
{existingHooks}
</div>
diff --git a/web/react/components/view_image.jsx b/web/react/components/view_image.jsx
index 8db63e196..e645878c1 100644
--- a/web/react/components/view_image.jsx
+++ b/web/react/components/view_image.jsx
@@ -40,7 +40,9 @@ export default class ViewImageModal extends React.Component {
};
}
handleNext(e) {
- e.stopPropagation();
+ if (e) {
+ e.stopPropagation();
+ }
var id = this.state.imgId + 1;
if (id > this.props.filenames.length - 1) {
id = 0;
@@ -49,7 +51,9 @@ export default class ViewImageModal extends React.Component {
this.loadImage(id);
}
handlePrev(e) {
- e.stopPropagation();
+ if (e) {
+ e.stopPropagation();
+ }
var id = this.state.imgId - 1;
if (id < 0) {
id = this.props.filenames.length - 1;
diff --git a/web/react/utils/emoticons.jsx b/web/react/utils/emoticons.jsx
index 7210201ff..a7c837199 100644
--- a/web/react/utils/emoticons.jsx
+++ b/web/react/utils/emoticons.jsx
@@ -5,15 +5,14 @@ const emoticonPatterns = {
smile: /:-?\)/g, // :)
open_mouth: /:o/gi, // :o
scream: /:-o/gi, // :-o
- smirk: /[:;]-?]/g, // :]
- grinning: /[:;]-?d/gi, // :D
+ smirk: /:-?]/g, // :]
+ grinning: /:-?d/gi, // :D
stuck_out_tongue_closed_eyes: /x-d/gi, // x-d
- stuck_out_tongue_winking_eye: /[:;]-?p/gi, // ;p
+ stuck_out_tongue_winking_eye: /:-?p/gi, // :p
rage: /:-?[\[@]/g, // :@
frowning: /:-?\(/g, // :(
sob: /:['’]-?\(|:&#x27;\(/g, // :`(
kissing_heart: /:-?\*/g, // :*
- wink: /;-?\)/g, // ;)
pensive: /:-?\//g, // :/
confounded: /:-?s/gi, // :s
flushed: /:-?\|/g, // :|