summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/file.go18
-rw-r--r--api/templates/verify_body.html2
-rw-r--r--api/templates/welcome_body.html4
-rw-r--r--doc/help/README.md2
-rw-r--r--doc/help/Team-Settings.md2
-rw-r--r--doc/install/Configuration-Settings.md2
-rw-r--r--model/config.go44
-rw-r--r--model/oauth.go2
-rw-r--r--web/react/components/admin_console/email_settings.jsx2
-rw-r--r--web/react/components/admin_console/team_settings.jsx2
-rw-r--r--web/react/components/setting_item_min.jsx2
-rw-r--r--web/react/components/team_general_tab.jsx2
-rw-r--r--web/react/components/tutorial/tutorial_tip.jsx32
-rw-r--r--web/react/components/user_settings/user_settings_appearance.jsx9
-rw-r--r--web/react/utils/client.jsx3
-rw-r--r--web/sass-files/sass/partials/_modal.scss6
-rw-r--r--web/sass-files/sass/partials/_post.scss7
-rw-r--r--web/sass-files/sass/partials/_responsive.scss24
-rw-r--r--web/sass-files/sass/partials/_tutorial.scss8
-rw-r--r--web/templates/head.html2
20 files changed, 119 insertions, 56 deletions
diff --git a/api/file.go b/api/file.go
index d31abfb1d..67ebc14b7 100644
--- a/api/file.go
+++ b/api/file.go
@@ -522,7 +522,7 @@ func writeFile(f []byte, path string) *model.AppError {
auth.AccessKey = utils.Cfg.FileSettings.AmazonS3AccessKeyId
auth.SecretKey = utils.Cfg.FileSettings.AmazonS3SecretAccessKey
- s := s3.New(auth, aws.Regions[utils.Cfg.FileSettings.AmazonS3Region])
+ s := s3.New(auth, awsRegion())
bucket := s.Bucket(utils.Cfg.FileSettings.AmazonS3Bucket)
ext := filepath.Ext(path)
@@ -562,7 +562,7 @@ func readFile(path string) ([]byte, *model.AppError) {
auth.AccessKey = utils.Cfg.FileSettings.AmazonS3AccessKeyId
auth.SecretKey = utils.Cfg.FileSettings.AmazonS3SecretAccessKey
- s := s3.New(auth, aws.Regions[utils.Cfg.FileSettings.AmazonS3Region])
+ s := s3.New(auth, awsRegion())
bucket := s.Bucket(utils.Cfg.FileSettings.AmazonS3Bucket)
// try to get the file from S3 with some basic retry logic
@@ -613,3 +613,17 @@ func openFileWriteStream(path string) (io.Writer, *model.AppError) {
func closeFileWriteStream(file io.Writer) {
file.(*os.File).Close()
}
+
+func awsRegion() aws.Region {
+ if region, ok := aws.Regions[utils.Cfg.FileSettings.AmazonS3Region]; ok {
+ return region
+ }
+
+ return aws.Region{
+ Name: utils.Cfg.FileSettings.AmazonS3Region,
+ S3Endpoint: utils.Cfg.FileSettings.AmazonS3Endpoint,
+ S3BucketEndpoint: utils.Cfg.FileSettings.AmazonS3BucketEndpoint,
+ S3LocationConstraint: *utils.Cfg.FileSettings.AmazonS3LocationConstraint,
+ S3LowercaseBucket: *utils.Cfg.FileSettings.AmazonS3LowercaseBucket,
+ }
+}
diff --git a/api/templates/verify_body.html b/api/templates/verify_body.html
index 97571d9e3..c42b2a372 100644
--- a/api/templates/verify_body.html
+++ b/api/templates/verify_body.html
@@ -17,7 +17,7 @@
<table border="0" cellpadding="0" cellspacing="0" style="padding: 20px 50px 0; text-align: center; margin: 0 auto">
<tr>
<td style="border-bottom: 1px solid #ddd; padding: 0 0 20px;">
- <h2 style="font-weight: normal; margin-top: 10px;">You've been invited</h2>
+ <h2 style="font-weight: normal; margin-top: 10px;">You've joined the {{ .Props.TeamDisplayName }} team</h2>
<p>Please verify your email address by clicking below.</p>
<p style="margin: 20px 0 15px">
<a href="{{.Props.VerifyUrl}}" style="background: #2389D7; border-radius: 3px; color: #fff; border: none; outline: none; min-width: 200px; padding: 15px 25px; font-size: 14px; font-family: inherit; cursor: pointer; -webkit-appearance: none;text-decoration: none;">Verify Email</a>
diff --git a/api/templates/welcome_body.html b/api/templates/welcome_body.html
index dbb94cf06..71d838b08 100644
--- a/api/templates/welcome_body.html
+++ b/api/templates/welcome_body.html
@@ -18,7 +18,7 @@
{{if .Props.VerifyUrl }}
<tr>
<td style="border-bottom: 1px solid #ddd; padding: 0 0 20px;">
- <h2 style="font-weight: normal; margin-top: 10px;">You've been invited</h2>
+ <h2 style="font-weight: normal; margin-top: 10px;">You've joined the {{ .Props.TeamDisplayName }} team</h2>
<p>Please verify your email address by clicking below.</p>
<p style="margin: 20px 0 15px">
<a href="{{.Props.VerifyUrl}}" style="background: #2389D7; border-radius: 3px; color: #fff; border: none; outline: none; min-width: 200px; padding: 15px 25px; font-size: 14px; font-family: inherit; cursor: pointer; -webkit-appearance: none;text-decoration: none;">Verify Email</a>
@@ -28,7 +28,7 @@
{{end}}
<tr>
<td style="border-bottom: 1px solid #ddd; padding: 0 0 20px;">
- <h2 style="font-weight: normal; margin-top: 10px;">You can sign-in to your new team from the web address:</h2>
+ <h2 style="font-weight: normal; margin-top: 25px; line-height: 1.5;">You can sign-in to your new team from the web address:</h2>
<a href="{{.Props.TeamURL}}">{{.Props.TeamURL}}</a>
<p>Mattermost lets you share messages and files from your PC or phone, with instant search and archiving.</p>
</td>
diff --git a/doc/help/README.md b/doc/help/README.md
index 23c8b192d..fc11aebaa 100644
--- a/doc/help/README.md
+++ b/doc/help/README.md
@@ -2,6 +2,7 @@
- Getting Started
- [Sign-in](Sign-in.md)
+ - [Creating Teams](Creating-Teams.md)
- User Interface
- Main Menu
@@ -17,6 +18,7 @@
- [Channel Types](Channels.md#channel-types)
- [Managing Channels](Channels.md#managing-channels)
- [Channel Settings](Channels.md#channel-settings)
+ - [Notifications](Notifications.md)
- System Console
- Team
diff --git a/doc/help/Team-Settings.md b/doc/help/Team-Settings.md
index fead9f4ca..99960a575 100644
--- a/doc/help/Team-Settings.md
+++ b/doc/help/Team-Settings.md
@@ -38,7 +38,7 @@ Team Administrators would set this to **No** when they:
#### Invite Code
-When allowing anyone to sign-up from the login page, the **Invite Code** is used as part of the sign-up process. Clicking **Re-Generate** will invalidate the previous invitations and invitation URLs.
+The **Invite Code** is used as part of the URL in the team invitation link retrieved from the **Main Menu** > **Get Team Invite Link**. Click **Re-Generate** and then **Save** to generate a new team invitation link and invalidate the previous link.
### Import
diff --git a/doc/install/Configuration-Settings.md b/doc/install/Configuration-Settings.md
index c18012af8..74a7c777c 100644
--- a/doc/install/Configuration-Settings.md
+++ b/doc/install/Configuration-Settings.md
@@ -61,7 +61,7 @@ Maximum number of users per team, including both active and inactive users.
"true": Ability to create new accounts is enabled via inviting new members or sharing the team invite link; “false”: the ability to create accounts is disabled. The create account button displays an error when trying to signup via an email invite or team invite link.
```"RestrictCreationToDomains": ""```
-Teams can only be created by a verified email from this list of comma-separated domains (e.g. "corp.mattermost.com, mattermost.org").
+Teams and user accounts can only be created by a verified email from this list of comma-separated domains (e.g. "corp.mattermost.com, mattermost.org").
```"RestrictTeamNames": true```
"true": Newly created team names cannot contain the following restricted words: www, web, admin, support, notify, test, demo, mail, team, channel, internal, localhost, dockerhost, stag, post, cluster, api, oauth; “false”: Newly created team names are not restricted.
diff --git a/model/config.go b/model/config.go
index 38ef81a85..a4792ff9e 100644
--- a/model/config.go
+++ b/model/config.go
@@ -68,21 +68,25 @@ type LogSettings struct {
}
type FileSettings struct {
- DriverName string
- Directory string
- EnablePublicLink bool
- PublicLinkSalt string
- ThumbnailWidth int
- ThumbnailHeight int
- PreviewWidth int
- PreviewHeight int
- ProfileWidth int
- ProfileHeight int
- InitialFont string
- AmazonS3AccessKeyId string
- AmazonS3SecretAccessKey string
- AmazonS3Bucket string
- AmazonS3Region string
+ DriverName string
+ Directory string
+ EnablePublicLink bool
+ PublicLinkSalt string
+ ThumbnailWidth int
+ ThumbnailHeight int
+ PreviewWidth int
+ PreviewHeight int
+ ProfileWidth int
+ ProfileHeight int
+ InitialFont string
+ AmazonS3AccessKeyId string
+ AmazonS3SecretAccessKey string
+ AmazonS3Bucket string
+ AmazonS3Region string
+ AmazonS3Endpoint string
+ AmazonS3BucketEndpoint string
+ AmazonS3LocationConstraint *bool
+ AmazonS3LowercaseBucket *bool
}
type EmailSettings struct {
@@ -210,6 +214,16 @@ func (o *Config) SetDefaults() {
o.FileSettings.PublicLinkSalt = NewRandomString(32)
}
+ if o.FileSettings.AmazonS3LocationConstraint == nil {
+ o.FileSettings.AmazonS3LocationConstraint = new(bool)
+ *o.FileSettings.AmazonS3LocationConstraint = false
+ }
+
+ if o.FileSettings.AmazonS3LowercaseBucket == nil {
+ o.FileSettings.AmazonS3LowercaseBucket = new(bool)
+ *o.FileSettings.AmazonS3LowercaseBucket = false
+ }
+
if len(o.EmailSettings.InviteSalt) == 0 {
o.EmailSettings.InviteSalt = NewRandomString(32)
}
diff --git a/model/oauth.go b/model/oauth.go
index 67825dd97..448fd9dc9 100644
--- a/model/oauth.go
+++ b/model/oauth.go
@@ -13,7 +13,7 @@ import (
type OAuthApp struct {
Id string `json:"id"`
CreatorId string `json:"creator_id"`
- CreateAt int64 `json:"update_at"`
+ CreateAt int64 `json:"create_at"`
UpdateAt int64 `json:"update_at"`
ClientSecret string `json:"client_secret"`
Name string `json:"name"`
diff --git a/web/react/components/admin_console/email_settings.jsx b/web/react/components/admin_console/email_settings.jsx
index 42e3507d6..91d73dccd 100644
--- a/web/react/components/admin_console/email_settings.jsx
+++ b/web/react/components/admin_console/email_settings.jsx
@@ -52,7 +52,7 @@ export default class EmailSettings extends React.Component {
var config = this.props.config;
config.EmailSettings.EnableSignUpWithEmail = ReactDOM.findDOMNode(this.refs.allowSignUpWithEmail).checked;
config.EmailSettings.SendEmailNotifications = ReactDOM.findDOMNode(this.refs.sendEmailNotifications).checked;
- config.EmailSettings.SendPushlNotifications = ReactDOM.findDOMNode(this.refs.sendPushNotifications).checked;
+ config.EmailSettings.SendPushNotifications = ReactDOM.findDOMNode(this.refs.sendPushNotifications).checked;
config.EmailSettings.RequireEmailVerification = ReactDOM.findDOMNode(this.refs.requireEmailVerification).checked;
config.EmailSettings.FeedbackName = ReactDOM.findDOMNode(this.refs.feedbackName).value.trim();
config.EmailSettings.FeedbackEmail = ReactDOM.findDOMNode(this.refs.feedbackEmail).value.trim();
diff --git a/web/react/components/admin_console/team_settings.jsx b/web/react/components/admin_console/team_settings.jsx
index 7991b9a01..9d958ce91 100644
--- a/web/react/components/admin_console/team_settings.jsx
+++ b/web/react/components/admin_console/team_settings.jsx
@@ -206,7 +206,7 @@ export default class TeamSettings extends React.Component {
defaultValue={this.props.config.TeamSettings.RestrictCreationToDomains}
onChange={this.handleChange}
/>
- <p className='help-text'>{'Teams can only be created from a specific domain (e.g. "mattermost.org") or list of comma-separated domains (e.g. "corp.mattermost.com, mattermost.org").'}</p>
+ <p className='help-text'>{'Teams and user accounts can only be created from a specific domain (e.g. "mattermost.org") or list of comma-separated domains (e.g. "corp.mattermost.com, mattermost.org").'}</p>
</div>
</div>
diff --git a/web/react/components/setting_item_min.jsx b/web/react/components/setting_item_min.jsx
index 2a72be207..ffd2061fe 100644
--- a/web/react/components/setting_item_min.jsx
+++ b/web/react/components/setting_item_min.jsx
@@ -8,7 +8,7 @@ export default class SettingItemMin extends React.Component {
editButton = (
<li className='col-sm-2 section-edit'>
<a
- className='section-edit theme'
+ className='theme'
href='#'
onClick={this.props.updateSection}
>
diff --git a/web/react/components/team_general_tab.jsx b/web/react/components/team_general_tab.jsx
index dc615f2e8..cc06a940e 100644
--- a/web/react/components/team_general_tab.jsx
+++ b/web/react/components/team_general_tab.jsx
@@ -424,7 +424,7 @@ export default class GeneralTab extends React.Component {
</div>
</div>
</div>
- <div className='setting-list__hint'>{'Your Invite Code is used in the URL sent to people to join your team. Regenerating your Invite Code will invalidate the URLs in previous invitations, unless "Allow anyone to sign-up from login page" is enabled.'}</div>
+ <div className='setting-list__hint'>{'The Invite Code is used as part of the URL in the team invitation link created by **Get Team Invite Link** in the main menu. Regenerating creates a new team invitation link and invalidates the previous link.'}</div>
</div>
);
diff --git a/web/react/components/tutorial/tutorial_tip.jsx b/web/react/components/tutorial/tutorial_tip.jsx
index d7c67cc9c..03ecdabab 100644
--- a/web/react/components/tutorial/tutorial_tip.jsx
+++ b/web/react/components/tutorial/tutorial_tip.jsx
@@ -101,22 +101,24 @@ export default class TutorialTip extends React.Component {
<div className={'tip-overlay ' + this.props.overlayClass}>
<div className='arrow'></div>
{this.props.screens[this.state.currentScreen]}
- <div className='tutorial__circles'>{dots}</div>
- <div className='text-right'>
- <button
- className='btn btn-primary'
- onClick={this.handleNext}
- >
- {buttonText}
- </button>
- <div className='tip-opt'>
- {'Seen this before? '}
- <a
- href='#'
- onClick={this.skipTutorial}
+ <div className='tutorial__footer'>
+ <div className='tutorial__circles'>{dots}</div>
+ <div className='text-right'>
+ <button
+ className='btn btn-primary'
+ onClick={this.handleNext}
>
- {'Opt out of these tips.'}
- </a>
+ {buttonText}
+ </button>
+ <div className='tip-opt'>
+ {'Seen this before? '}
+ <a
+ href='#'
+ onClick={this.skipTutorial}
+ >
+ {'Opt out of these tips.'}
+ </a>
+ </div>
</div>
</div>
</div>
diff --git a/web/react/components/user_settings/user_settings_appearance.jsx b/web/react/components/user_settings/user_settings_appearance.jsx
index ad41ab771..7bfc9fdbd 100644
--- a/web/react/components/user_settings/user_settings_appearance.jsx
+++ b/web/react/components/user_settings/user_settings_appearance.jsx
@@ -74,6 +74,10 @@ export default class UserSettingsAppearance extends React.Component {
this.props.setEnforceFocus(true);
}
+ scrollToTop() {
+ $('.ps-container.modal-body').scrollTop(0);
+ $('.ps-container.modal-body').perfectScrollbar('update');
+ }
submitTheme(e) {
e.preventDefault();
var user = UserStore.getCurrentUser();
@@ -88,9 +92,7 @@ export default class UserSettingsAppearance extends React.Component {
this.props.setRequireConfirm(false);
this.originalTheme = Object.assign({}, this.state.theme);
-
- $('.ps-container.modal-body').scrollTop(0);
- $('.ps-container.modal-body').perfectScrollbar('update');
+ this.scrollToTop();
},
(err) => {
var state = this.getStateFromStores();
@@ -129,6 +131,7 @@ export default class UserSettingsAppearance extends React.Component {
const state = this.getStateFromStores();
state.serverError = null;
this.setState(state);
+ this.scrollToTop();
Utils.applyTheme(state.theme);
diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx
index 1c417153b..8a4cee589 100644
--- a/web/react/utils/client.jsx
+++ b/web/react/utils/client.jsx
@@ -246,6 +246,7 @@ export function loginByEmail(name, email, password, success, error) {
data: JSON.stringify({name, email, password}),
success: function onSuccess(data, textStatus, xhr) {
track('api', 'api_users_login_success', data.team_id, 'email', data.email);
+ sessionStorage.removeItem(data.id + '_last_error');
BrowserStore.signalLogin();
success(data, textStatus, xhr);
},
@@ -267,6 +268,8 @@ export function loginByLdap(teamName, id, password, success, error) {
data: JSON.stringify({teamName, id, password}),
success: function onSuccess(data, textStatus, xhr) {
track('api', 'api_users_loginLdap_success', data.team_id, 'id', id);
+ sessionStorage.removeItem(data.id + '_last_error');
+ BrowserStore.signalLogin();
success(data, textStatus, xhr);
},
error: function onError(xhr, status, err) {
diff --git a/web/sass-files/sass/partials/_modal.scss b/web/sass-files/sass/partials/_modal.scss
index 6f70e502f..7627f6a4c 100644
--- a/web/sass-files/sass/partials/_modal.scss
+++ b/web/sass-files/sass/partials/_modal.scss
@@ -229,6 +229,12 @@
height: 80%;
}
+ audio, canvas, progress, video {
+ max-width: 100%;
+ height: auto;
+ display: block;
+ }
+
.modal-close {
background: url("../images/close.png") no-repeat;
@include background-size(100% 100%);
diff --git a/web/sass-files/sass/partials/_post.scss b/web/sass-files/sass/partials/_post.scss
index c2df7b769..937b08084 100644
--- a/web/sass-files/sass/partials/_post.scss
+++ b/web/sass-files/sass/partials/_post.scss
@@ -424,7 +424,7 @@ body.ios {
p {
- margin: 0 0 1em;
+ margin: 0;
line-height: 1.6em;
font-size: 0.97em;
white-space: pre-wrap;
@@ -676,9 +676,14 @@ body.ios {
}
ul {
+ margin-bottom: 0.6em;
padding: 5px 0 0 20px;
}
+ ul + p {
+ margin-top: 1em;
+ }
+
ul, ol {
p {
margin-bottom: 0;
diff --git a/web/sass-files/sass/partials/_responsive.scss b/web/sass-files/sass/partials/_responsive.scss
index 635b46077..8491869a6 100644
--- a/web/sass-files/sass/partials/_responsive.scss
+++ b/web/sass-files/sass/partials/_responsive.scss
@@ -299,15 +299,6 @@
.settings-content {
&.minimize-settings {
display: block;
- .section-edit {
- position: absolute;
- top: 7px;
- right: 0;
- width: 50px;
- .fa {
- display: inline-block;
- }
- }
}
.section-min:hover {
background: none;
@@ -349,6 +340,15 @@
width: 100%;
}
.settings-content {
+ .section-edit {
+ position: absolute;
+ top: 14px;
+ right: 0;
+ padding-right: 0;
+ .fa {
+ display: inline-block;
+ }
+ }
&.minimize-settings {
padding: 0;
display: none;
@@ -356,6 +356,9 @@
padding: 70px 20px 30px;
}
}
+ .section-min:hover {
+ background: none !important;
+ }
}
.settings-links {
background: #fff;
@@ -736,6 +739,9 @@
}
}
@media screen and (max-width: 480px) {
+ .tip-overlay.tip-overlay--sidebar {
+ min-height: 350px;
+ }
.modal {
.modal-body {
max-height: 70%;
diff --git a/web/sass-files/sass/partials/_tutorial.scss b/web/sass-files/sass/partials/_tutorial.scss
index 9e5e1ad7a..20a15441e 100644
--- a/web/sass-files/sass/partials/_tutorial.scss
+++ b/web/sass-files/sass/partials/_tutorial.scss
@@ -32,6 +32,14 @@
&.tip-overlay--sidebar {
max-width: 75%;
margin: 50px 0 0 10px;
+ min-height: 310px;
+ .tutorial__footer {
+ position: absolute;
+ width: 100%;
+ bottom: 20px;
+ left: 0;
+ padding: 0 20px;
+ }
.arrow {
top: 80px;
left: -10px;
diff --git a/web/templates/head.html b/web/templates/head.html
index c2c40098c..70c94e8ff 100644
--- a/web/templates/head.html
+++ b/web/templates/head.html
@@ -77,7 +77,7 @@
}
console.log('detected login from a different tab');
- window.location.href = '/';
+ window.location.href = '/' + window.mm_team.name;
}
});
});