summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NOTICE.txt42
-rw-r--r--api/import.go4
-rw-r--r--api/team.go47
-rw-r--r--config/config.json1
-rw-r--r--docker/dev/config_docker.json1
-rw-r--r--docker/local/config_docker.json1
-rw-r--r--mattermost.go4
-rw-r--r--model/client.go18
-rw-r--r--model/config.go1
-rw-r--r--model/user.go1
-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_feature_tab.jsx190
-rw-r--r--web/react/components/team_settings.jsx14
-rw-r--r--web/react/components/team_settings_modal.jsx13
-rw-r--r--web/react/components/user_settings/manage_incoming_hooks.jsx65
-rw-r--r--web/react/components/user_settings/user_settings_appearance.jsx2
-rw-r--r--web/react/components/view_image.jsx8
-rw-r--r--web/react/utils/client.jsx17
-rw-r--r--web/react/utils/constants.jsx28
-rw-r--r--web/react/utils/emoticons.jsx7
-rw-r--r--web/sass-files/sass/partials/_base.scss4
-rw-r--r--web/sass-files/sass/partials/_modal.scss16
-rw-r--r--web/sass-files/sass/partials/_settings.scss15
-rw-r--r--web/web.go13
25 files changed, 175 insertions, 429 deletions
diff --git a/NOTICE.txt b/NOTICE.txt
index f31472477..dafc6d257 100644
--- a/NOTICE.txt
+++ b/NOTICE.txt
@@ -724,6 +724,46 @@ Legal Terms
Our home page can be found at
http://www.freetype.org
+
+--- end of FTL.TXT ---
+
+---
+This product contains a modified portion of 'gemoji', a collection of emoji images and names by Apple Inc. and other contributors.
---- end of FTL.TXT ---
+* HOMEPAGE:
+ * https://github.com/github/gemoji/blob/master/LICENSE
+
+* LICENSE:
+
+octocat, squirrel, shipit
+Copyright (c) 2013 GitHub Inc. All rights reserved.
+
+bowtie, neckbeard, fu
+Copyright (c) 2013 37signals, LLC. All rights reserved.
+
+feelsgood, finnadie, goberserk, godmode, hurtrealbad, rage 1-4, suspect
+Copyright (c) 2013 id Software. All rights reserved.
+
+trollface
+Copyright (c) 2013 whynne@deviantart. All rights reserved.
+
+All other images
+Copyright (c) 2013 Apple Inc. All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this
+software and associated documentation files (the "Software"), to deal in the Software
+without restriction, including without limitation the rights to use, copy, modify,
+merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be included in all copies
+or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
+PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
+FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
diff --git a/api/import.go b/api/import.go
index e3f314d20..c465825b4 100644
--- a/api/import.go
+++ b/api/import.go
@@ -6,7 +6,6 @@ package api
import (
l4g "code.google.com/p/log4go"
"github.com/mattermost/platform/model"
- "github.com/mattermost/platform/utils"
)
//
@@ -24,9 +23,6 @@ func ImportPost(post *model.Post) {
func ImportUser(user *model.User) *model.User {
user.MakeNonNil()
- if len(user.Props["theme"]) == 0 {
- user.AddProp("theme", utils.Cfg.TeamSettings.DefaultThemeColor)
- }
if result := <-Srv.Store.User().Save(user); result.Err != nil {
l4g.Error("Error saving user. err=%v", result.Err)
diff --git a/api/team.go b/api/team.go
index d59b2b484..4794b66df 100644
--- a/api/team.go
+++ b/api/team.go
@@ -31,7 +31,6 @@ func InitTeam(r *mux.Router) {
sr.Handle("/email_teams", ApiAppHandler(emailTeams)).Methods("POST")
sr.Handle("/invite_members", ApiUserRequired(inviteMembers)).Methods("POST")
sr.Handle("/update_name", ApiUserRequired(updateTeamDisplayName)).Methods("POST")
- sr.Handle("/update_valet_feature", ApiUserRequired(updateValetFeature)).Methods("POST")
sr.Handle("/me", ApiUserRequired(getMyTeam)).Methods("GET")
// These should be moved to the global admain console
sr.Handle("/import_team", ApiUserRequired(importTeam)).Methods("POST")
@@ -581,52 +580,6 @@ func updateTeamDisplayName(c *Context, w http.ResponseWriter, r *http.Request) {
w.Write([]byte(model.MapToJson(props)))
}
-func updateValetFeature(c *Context, w http.ResponseWriter, r *http.Request) {
-
- props := model.MapFromJson(r.Body)
-
- allowValetStr := props["allow_valet"]
- if len(allowValetStr) == 0 {
- c.SetInvalidParam("updateValetFeature", "allow_valet")
- return
- }
-
- teamId := props["team_id"]
- if len(teamId) > 0 && len(teamId) != 26 {
- c.SetInvalidParam("updateValetFeature", "team_id")
- return
- } else if len(teamId) == 0 {
- teamId = c.Session.TeamId
- }
-
- tchan := Srv.Store.Team().Get(teamId)
-
- if !c.HasPermissionsToTeam(teamId, "updateValetFeature") {
- return
- }
-
- if !model.IsInRole(c.Session.Roles, model.ROLE_TEAM_ADMIN) {
- c.Err = model.NewAppError("updateValetFeature", "You do not have the appropriate permissions", "userId="+c.Session.UserId)
- c.Err.StatusCode = http.StatusForbidden
- return
- }
-
- var team *model.Team
- if tResult := <-tchan; tResult.Err != nil {
- c.Err = tResult.Err
- return
- } else {
- team = tResult.Data.(*model.Team)
- }
-
- if result := <-Srv.Store.Team().Update(team); result.Err != nil {
- c.Err = result.Err
- return
- }
-
- w.Write([]byte(model.MapToJson(props)))
-}
-
func getMyTeam(c *Context, w http.ResponseWriter, r *http.Request) {
if len(c.Session.TeamId) == 0 {
diff --git a/config/config.json b/config/config.json
index aa92ccf4e..60e197154 100644
--- a/config/config.json
+++ b/config/config.json
@@ -11,7 +11,6 @@
"TeamSettings": {
"SiteName": "Mattermost",
"MaxUsersPerTeam": 50,
- "DefaultThemeColor": "#2389D7",
"EnableTeamCreation": true,
"EnableUserCreation": true,
"RestrictCreationToDomains": ""
diff --git a/docker/dev/config_docker.json b/docker/dev/config_docker.json
index 16a4007fa..06fee9bd5 100644
--- a/docker/dev/config_docker.json
+++ b/docker/dev/config_docker.json
@@ -11,7 +11,6 @@
"TeamSettings": {
"SiteName": "Mattermost",
"MaxUsersPerTeam": 50,
- "DefaultThemeColor": "#2389D7",
"EnableTeamCreation": true,
"EnableUserCreation": true,
"RestrictCreationToDomains": ""
diff --git a/docker/local/config_docker.json b/docker/local/config_docker.json
index 16a4007fa..06fee9bd5 100644
--- a/docker/local/config_docker.json
+++ b/docker/local/config_docker.json
@@ -11,7 +11,6 @@
"TeamSettings": {
"SiteName": "Mattermost",
"MaxUsersPerTeam": 50,
- "DefaultThemeColor": "#2389D7",
"EnableTeamCreation": true,
"EnableUserCreation": true,
"RestrictCreationToDomains": ""
diff --git a/mattermost.go b/mattermost.go
index 4608bfff3..ff7b0f3f3 100644
--- a/mattermost.go
+++ b/mattermost.go
@@ -325,10 +325,10 @@ Usage:
-role="admin" The role used in other commands
valid values are
- "" - The empty role is basic user
+ "" - The empty role is basic user
permissions
"admin" - Represents a team admin and
- is used to help adminsiter one team.
+ is used to help administer one team.
"system_admin" - Represents a system
admin who has access to all teams
and configuration settings. This
diff --git a/model/client.go b/model/client.go
index ca17da6d2..26e00864d 100644
--- a/model/client.go
+++ b/model/client.go
@@ -218,15 +218,6 @@ func (c *Client) UpdateTeamDisplayName(data map[string]string) (*Result, *AppErr
}
}
-func (c *Client) UpdateValetFeature(data map[string]string) (*Result, *AppError) {
- if r, err := c.DoApiPost("/teams/update_valet_feature", MapToJson(data)); err != nil {
- return nil, err
- } else {
- return &Result{r.Header.Get(HEADER_REQUEST_ID),
- r.Header.Get(HEADER_ETAG_SERVER), MapFromJson(r.Body)}, nil
- }
-}
-
func (c *Client) CreateUser(user *User, hash string) (*Result, *AppError) {
if r, err := c.DoApiPost("/users/create", user.ToJson()); err != nil {
return nil, err
@@ -580,15 +571,6 @@ func (c *Client) CreatePost(post *Post) (*Result, *AppError) {
}
}
-func (c *Client) CreateValetPost(post *Post) (*Result, *AppError) {
- if r, err := c.DoApiPost("/channels/"+post.ChannelId+"/valet_create", post.ToJson()); err != nil {
- return nil, err
- } else {
- return &Result{r.Header.Get(HEADER_REQUEST_ID),
- r.Header.Get(HEADER_ETAG_SERVER), PostFromJson(r.Body)}, nil
- }
-}
-
func (c *Client) UpdatePost(post *Post) (*Result, *AppError) {
if r, err := c.DoApiPost("/channels/"+post.ChannelId+"/update", post.ToJson()); err != nil {
return nil, err
diff --git a/model/config.go b/model/config.go
index 69f2127b2..31c2b16dc 100644
--- a/model/config.go
+++ b/model/config.go
@@ -112,7 +112,6 @@ type PrivacySettings struct {
type TeamSettings struct {
SiteName string
MaxUsersPerTeam int
- DefaultThemeColor string
EnableTeamCreation bool
EnableUserCreation bool
RestrictCreationToDomains string
diff --git a/model/user.go b/model/user.go
index 3a2c9d56c..5cb774478 100644
--- a/model/user.go
+++ b/model/user.go
@@ -23,7 +23,6 @@ const (
USER_NOTIFY_ALL = "all"
USER_NOTIFY_MENTION = "mention"
USER_NOTIFY_NONE = "none"
- BOT_USERNAME = "valet"
)
type User struct {
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_feature_tab.jsx b/web/react/components/team_feature_tab.jsx
deleted file mode 100644
index 3251746b8..000000000
--- a/web/react/components/team_feature_tab.jsx
+++ /dev/null
@@ -1,190 +0,0 @@
-// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-var SettingItemMin = require('./setting_item_min.jsx');
-var SettingItemMax = require('./setting_item_max.jsx');
-
-var Client = require('../utils/client.jsx');
-var AsyncClient = require('../utils/async_client.jsx');
-
-export default class FeatureTab extends React.Component {
- constructor(props) {
- super(props);
-
- this.submitValetFeature = this.submitValetFeature.bind(this);
- this.handleValetRadio = this.handleValetRadio.bind(this);
- this.onUpdateSection = this.onUpdateSection.bind(this);
- this.setupInitialState = this.setupInitialState.bind(this);
-
- this.state = this.setupInitialState();
- }
- componentWillReceiveProps(newProps) {
- var team = newProps.team;
-
- var allowValet = 'false';
- if (team && team.allow_valet) {
- allowValet = 'true';
- }
-
- this.setState({allowValet: allowValet});
- }
- submitValetFeature() {
- var data = {};
- data.allow_valet = this.state.allowValet;
-
- Client.updateValetFeature(data,
- function success() {
- this.props.updateSection('');
- AsyncClient.getMyTeam();
- }.bind(this),
- function fail(err) {
- var state = this.setupInitialState();
- state.serverError = err;
- this.setState(state);
- }.bind(this)
- );
- }
- handleValetRadio(val) {
- this.setState({allowValet: val});
- React.findDOMNode(this.refs.wrapper).focus();
- }
- onUpdateSection(e) {
- e.preventDefault();
- if (this.props.activeSection === 'valet') {
- this.props.updateSection('');
- } else {
- this.props.updateSection('valet');
- }
- }
- setupInitialState() {
- var allowValet;
- var team = this.props.team;
-
- if (team && team.allow_valet) {
- allowValet = 'true';
- } else {
- allowValet = 'false';
- }
-
- return {allowValet: allowValet};
- }
- render() {
- var clientError = null;
- var serverError = null;
- if (this.state.clientError) {
- clientError = this.state.clientError;
- }
- if (this.state.serverError) {
- serverError = this.state.serverError;
- }
-
- var valetSection;
-
- if (this.props.activeSection === 'valet') {
- var valetActive = [false, false];
- if (this.state.allowValet === 'false') {
- valetActive[1] = true;
- } else {
- valetActive[0] = true;
- }
-
- let inputs = [];
-
- inputs.push(
- <div key='teamValetSetting'>
- <div className='radio'>
- <label>
- <input
- type='radio'
- checked={valetActive[0]}
- onChange={this.handleValetRadio.bind(this, 'true')}
- >
- On
- </input>
- </label>
- <br/>
- </div>
- <div className='radio'>
- <label>
- <input
- type='radio'
- checked={valetActive[1]}
- onChange={this.handleValetRadio.bind(this, 'false')}
- >
- Off
- </input>
- </label>
- <br/>
- </div>
- <div><br/>Valet is a preview feature for enabling a non-user account limited to basic member permissions that can be manipulated by 3rd parties.<br/><br/>IMPORTANT: The preview version of Valet should not be used without a secure connection and a trusted 3rd party, since user credentials are used to connect. OAuth2 will be used in the final release.</div>
- </div>
- );
-
- valetSection = (
- <SettingItemMax
- title='Valet (Preview - EXPERTS ONLY)'
- inputs={inputs}
- submit={this.submitValetFeature}
- server_error={serverError}
- client_error={clientError}
- updateSection={this.onUpdateSection}
- />
- );
- } else {
- var describe = '';
- if (this.state.allowValet === 'false') {
- describe = 'Off';
- } else {
- describe = 'On';
- }
-
- valetSection = (
- <SettingItemMin
- title='Valet (Preview - EXPERTS ONLY)'
- describe={describe}
- updateSection={this.onUpdateSection}
- />
- );
- }
-
- return (
- <div>
- <div className='modal-header'>
- <button
- type='button'
- className='close'
- data-dismiss='modal'
- aria-label='Close'
- >
- <span aria-hidden='true'>&times;</span>
- </button>
- <h4
- className='modal-title'
- ref='title'
- >
- <i className='modal-back'></i>Advanced Features
- </h4>
- </div>
- <div
- ref='wrapper'
- className='user-settings'
- >
- <h3 className='tab-header'>Advanced Features</h3>
- <div className='divider-dark first'/>
- {valetSection}
- <div className='divider-dark'/>
- </div>
- </div>
- );
- }
-}
-
-FeatureTab.defaultProps = {
- team: {},
- activeSection: ''
-};
-FeatureTab.propTypes = {
- updateSection: React.PropTypes.func.isRequired,
- team: React.PropTypes.object.isRequired,
- activeSection: React.PropTypes.string.isRequired
-};
diff --git a/web/react/components/team_settings.jsx b/web/react/components/team_settings.jsx
index 396521af9..e91aa20bc 100644
--- a/web/react/components/team_settings.jsx
+++ b/web/react/components/team_settings.jsx
@@ -4,7 +4,6 @@
var TeamStore = require('../stores/team_store.jsx');
var ImportTab = require('./team_import_tab.jsx');
var ExportTab = require('./team_export_tab.jsx');
-var FeatureTab = require('./team_feature_tab.jsx');
var GeneralTab = require('./team_general_tab.jsx');
var Utils = require('../utils/utils.jsx');
@@ -25,7 +24,7 @@ export default class TeamSettings extends React.Component {
onChange() {
var team = TeamStore.getCurrent();
if (!Utils.areStatesEqual(this.state.team, team)) {
- this.setState({team: team});
+ this.setState({team});
}
}
render() {
@@ -43,17 +42,6 @@ export default class TeamSettings extends React.Component {
</div>
);
break;
- case 'feature':
- result = (
- <div>
- <FeatureTab
- team={this.state.team}
- activeSection={this.props.activeSection}
- updateSection={this.props.updateSection}
- />
- </div>
- );
- break;
case 'import':
result = (
<div>
diff --git a/web/react/components/team_settings_modal.jsx b/web/react/components/team_settings_modal.jsx
index 0513c811f..a96aadccf 100644
--- a/web/react/components/team_settings_modal.jsx
+++ b/web/react/components/team_settings_modal.jsx
@@ -20,8 +20,8 @@ export default class TeamSettingsModal extends React.Component {
$('body').on('click', '.modal-back', function handleBackClick() {
$(this).closest('.modal-dialog').removeClass('display--content');
});
- $('body').on('click', '.modal-header .close', function handleCloseClick() {
- setTimeout(function removeContent() {
+ $('body').on('click', '.modal-header .close', () => {
+ setTimeout(() => {
$('.modal-dialog.display--content').removeClass('display--content');
}, 500);
});
@@ -33,11 +33,12 @@ export default class TeamSettingsModal extends React.Component {
this.setState({activeSection: section});
}
render() {
- let tabs = [];
+ 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'});
- tabs.push({name: 'feature', uiName: 'Advanced', icon: 'glyphicon glyphicon-wrench'});
+
+ // To enable export uncomment this line
+ //tabs.push({name: 'export', uiName: 'Export', icon: 'glyphicon glyphicon-download'});
return (
<div
@@ -63,7 +64,7 @@ export default class TeamSettingsModal extends React.Component {
className='modal-title'
ref='title'
>
- Team Settings
+ {'Team Settings'}
</h4>
</div>
<div className='modal-body'>
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/user_settings/user_settings_appearance.jsx b/web/react/components/user_settings/user_settings_appearance.jsx
index 7617f04d1..4372069e7 100644
--- a/web/react/components/user_settings/user_settings_appearance.jsx
+++ b/web/react/components/user_settings/user_settings_appearance.jsx
@@ -81,6 +81,8 @@ export default class UserSettingsAppearance extends React.Component {
$('#user_settings').off('hidden.bs.modal', this.handleClose);
this.props.updateTab('general');
+ $('.ps-container.modal-body').scrollTop(0);
+ $('.ps-container.modal-body').perfectScrollbar('update');
$('#user_settings').modal('hide');
},
(err) => {
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/client.jsx b/web/react/utils/client.jsx
index 63924bff2..4effa7307 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -1042,23 +1042,6 @@ export function getMyTeam(success, error) {
});
}
-export function updateValetFeature(data, success, error) {
- $.ajax({
- url: '/api/v1/teams/update_valet_feature',
- dataType: 'json',
- contentType: 'application/json',
- type: 'POST',
- data: JSON.stringify(data),
- success,
- error: function onError(xhr, status, err) {
- var e = handleError('updateValetFeature', xhr, status, err);
- error(e);
- }
- });
-
- track('api', 'api_teams_update_valet_feature');
-}
-
export function registerOAuthApp(app, success, error) {
$.ajax({
url: '/api/v1/oauth/register',
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx
index 90af9beda..8c9e1ee85 100644
--- a/web/react/utils/constants.jsx
+++ b/web/react/utils/constants.jsx
@@ -182,7 +182,7 @@ module.exports = {
},
{
id: 'sidebarText',
- uiName: 'Sidebar text color'
+ uiName: 'Sidebar Text'
},
{
id: 'sidebarHeaderBg',
@@ -190,51 +190,51 @@ module.exports = {
},
{
id: 'sidebarHeaderTextColor',
- uiName: 'Sidebar Header text color'
+ uiName: 'Sidebar Header Text'
},
{
id: 'sidebarUnreadText',
- uiName: 'Sidebar unread text color'
+ uiName: 'Sidebar Unread Text'
},
{
id: 'sidebarTextHoverBg',
- uiName: 'Sidebar text hover BG'
+ uiName: 'Sidebar Text Hover BG'
},
{
id: 'sidebarTextHoverColor',
- uiName: 'Sidebar text hover color'
+ uiName: 'Sidebar Text Hover Color'
},
{
id: 'sidebarTextActiveBg',
- uiName: 'Sidebar text active BG'
+ uiName: 'Sidebar Text Active BG'
},
{
id: 'sidebarTextActiveColor',
- uiName: 'Sidebar text active color'
+ uiName: 'Sidebar Text Active Color'
},
{
id: 'onlineIndicator',
- uiName: 'Online indicator'
+ uiName: 'Online Indicator'
},
{
id: 'mentionBj',
- uiName: 'Mention jewel BG'
+ uiName: 'Mention Jewel BG'
},
{
id: 'mentionColor',
- uiName: 'Mention jewel text color'
+ uiName: 'Mention Jewel Text'
},
{
id: 'centerChannelBg',
- uiName: 'Center channel BG'
+ uiName: 'Center Channel BG'
},
{
id: 'centerChannelColor',
- uiName: 'Center channel text color'
+ uiName: 'Center Channel Text'
},
{
id: 'linkColor',
- uiName: 'Link color'
+ uiName: 'Link Color'
},
{
id: 'buttonBg',
@@ -243,7 +243,7 @@ module.exports = {
{
id: 'buttonColor',
- uiName: 'Button Color'
+ uiName: 'Button Text'
}
]
};
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, // :|
diff --git a/web/sass-files/sass/partials/_base.scss b/web/sass-files/sass/partials/_base.scss
index 50946ed83..87d9b8200 100644
--- a/web/sass-files/sass/partials/_base.scss
+++ b/web/sass-files/sass/partials/_base.scss
@@ -44,6 +44,10 @@ body {
}
}
+.word-break--all {
+ word-break: break-all;
+}
+
a {
word-break: break-word;
color: $primary-color;
diff --git a/web/sass-files/sass/partials/_modal.scss b/web/sass-files/sass/partials/_modal.scss
index b0d5a0f7d..e4e8b20b6 100644
--- a/web/sass-files/sass/partials/_modal.scss
+++ b/web/sass-files/sass/partials/_modal.scss
@@ -11,6 +11,9 @@
}
a, a:focus, a:hover {
color: #2389D7;
+ &.text-danger {
+ color: #a94442;
+ }
}
.custom-textarea {
color: inherit;
@@ -20,11 +23,14 @@
box-shadow: none;
}
}
- .btn.btn-primary {
- background: #4285f4;
- &:hover, &:focus, &:active {
- background: $primary-color--hover;
- color: #fff;
+ .btn {
+ font-size: 13px;
+ &.btn-primary {
+ background: #4285f4;
+ &:hover, &:focus, &:active {
+ background: $primary-color--hover;
+ color: #fff;
+ }
}
}
.info__label {
diff --git a/web/sass-files/sass/partials/_settings.scss b/web/sass-files/sass/partials/_settings.scss
index 8dcd8f35c..3aab05d70 100644
--- a/web/sass-files/sass/partials/_settings.scss
+++ b/web/sass-files/sass/partials/_settings.scss
@@ -32,6 +32,7 @@
}
.settings-table {
display: table;
+ table-layout: fixed;
width: 100%;
> div {
display: table-cell;
@@ -125,6 +126,10 @@
}
}
+ .font--small {
+ font-size: 13px;
+ }
+
.section-describe {
color:grey;
}
@@ -155,8 +160,18 @@
.has-error {
color: #a94442;
}
+ .padding-top {
+ padding-top: 7px;
+ &.x2 {
+ padding-top: 14px;
+ }
+ }
.control-label {
color: #555;
+ font-weight: 600;
+ &.text-left {
+ text-align: left;
+ }
}
hr {
border-color: #ccc;
diff --git a/web/web.go b/web/web.go
index 3b36f3d56..1e435d47f 100644
--- a/web/web.go
+++ b/web/web.go
@@ -145,14 +145,8 @@ func root(c *api.Context, w http.ResponseWriter, r *http.Request) {
return
}
- if len(c.Session.UserId) == 0 {
- page := NewHtmlTemplatePage("signup_team", "Signup")
- page.Render(c, w)
- } else {
- page := NewHtmlTemplatePage("home", "Home")
- page.Props["TeamURL"] = c.GetTeamURL()
- page.Render(c, w)
- }
+ page := NewHtmlTemplatePage("signup_team", "Signup")
+ page.Render(c, w)
}
func signup(c *api.Context, w http.ResponseWriter, r *http.Request) {
@@ -175,8 +169,7 @@ func login(c *api.Context, w http.ResponseWriter, r *http.Request) {
var team *model.Team
if tResult := <-api.Srv.Store.Team().GetByName(teamName); tResult.Err != nil {
l4g.Error("Couldn't find team name=%v, teamURL=%v, err=%v", teamName, c.GetTeamURL(), tResult.Err.Message)
- // This should probably do somthing nicer
- http.Redirect(w, r, "http://"+r.Host, http.StatusTemporaryRedirect)
+ http.Redirect(w, r, api.GetProtocol(r)+"://"+r.Host, http.StatusTemporaryRedirect)
return
} else {
team = tResult.Data.(*model.Team)