diff options
-rw-r--r-- | api/team.go | 4 | ||||
-rw-r--r-- | api/templates/invite_body.html | 6 | ||||
-rw-r--r-- | api/user.go | 9 | ||||
-rw-r--r-- | web/react/components/center_panel.jsx | 4 | ||||
-rw-r--r-- | web/react/components/create_post.jsx | 2 | ||||
-rw-r--r-- | web/react/components/posts_view_container.jsx | 2 | ||||
-rw-r--r-- | web/react/components/sidebar.jsx | 5 | ||||
-rw-r--r-- | web/react/utils/constants.jsx | 3 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_content.scss | 8 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_headers.scss | 1 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_markdown.scss | 1 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_post.scss | 6 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_videos.scss | 1 |
13 files changed, 33 insertions, 19 deletions
diff --git a/api/team.go b/api/team.go index 7d746d922..862970887 100644 --- a/api/team.go +++ b/api/team.go @@ -510,16 +510,14 @@ func InviteMembers(c *Context, team *model.Team, user *model.User, invites []str } subjectPage := NewServerTemplatePage("invite_subject") - subjectPage.Props["SiteURL"] = c.GetSiteURL() subjectPage.Props["SenderName"] = sender subjectPage.Props["TeamDisplayName"] = team.DisplayName bodyPage := NewServerTemplatePage("invite_body") - bodyPage.Props["SiteURL"] = c.GetSiteURL() + bodyPage.Props["TeamURL"] = c.GetTeamURL() bodyPage.Props["TeamDisplayName"] = team.DisplayName bodyPage.Props["SenderName"] = sender bodyPage.Props["SenderStatus"] = senderRole - bodyPage.Props["Email"] = invite props := make(map[string]string) props["email"] = invite props["id"] = team.Id diff --git a/api/templates/invite_body.html b/api/templates/invite_body.html index 930bc099d..d98f91357 100644 --- a/api/templates/invite_body.html +++ b/api/templates/invite_body.html @@ -18,10 +18,12 @@ <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> - <p>{{.Props.TeamDisplayName}} started using {{.ClientCfg.SiteName}}.<br> The team {{.Props.SenderStatus}} <strong>{{.Props.SenderName}}</strong>, has invited you to join <strong>{{.Props.TeamDisplayName}}</strong>.</p> - <p style="margin: 20px 0 15px"> + <p>The team {{.Props.SenderStatus}} <strong>{{.Props.SenderName}}</strong>, has invited you to join <strong>{{.Props.TeamDisplayName}}</strong>.</p> + <p style="margin: 30px 0 15px"> <a href="{{.Props.Link}}" 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;">Join Team</a> </p> + <br/> + <p>Mattermost lets you share messages and files from your PC or phone, with instant search and archiving. After you’ve joined <strong>{{.Props.TeamDisplayName}}</strong>, you can sign-in to your new team and access these features anytime from the web address:<br/><br/><a href="{{.Props.TeamURL}}">{{.Props.TeamURL}}</a></p> </td> </tr> <tr> diff --git a/api/user.go b/api/user.go index 42d3a43e7..c871d7c79 100644 --- a/api/user.go +++ b/api/user.go @@ -87,6 +87,8 @@ func createUser(c *Context, w http.ResponseWriter, r *http.Request) { hash := r.URL.Query().Get("h") + sendWelcomeEmail := true + if IsVerifyHashRequired(user, team, hash) { data := r.URL.Query().Get("d") props := model.MapFromJson(strings.NewReader(data)) @@ -109,6 +111,7 @@ func createUser(c *Context, w http.ResponseWriter, r *http.Request) { user.Email = props["email"] user.EmailVerified = true + sendWelcomeEmail = false } if len(user.AuthData) > 0 && len(user.AuthService) > 0 { @@ -120,6 +123,10 @@ func createUser(c *Context, w http.ResponseWriter, r *http.Request) { return } + if sendWelcomeEmail { + sendWelcomeEmailAndForget(ruser.Id, ruser.Email, team.Name, team.DisplayName, c.GetSiteURL(), c.GetTeamURLFromTeam(team), ruser.EmailVerified) + } + w.Write([]byte(ruser.ToJson())) } @@ -198,8 +205,6 @@ func CreateUser(c *Context, team *model.Team, user *model.User) *model.User { l4g.Error("Encountered an issue joining default channels user_id=%s, team_id=%s, err=%v", ruser.Id, ruser.TeamId, err) } - sendWelcomeEmailAndForget(ruser.Id, ruser.Email, team.Name, team.DisplayName, c.GetSiteURL(), c.GetTeamURLFromTeam(team), user.EmailVerified) - addDirectChannelsAndForget(ruser) if user.EmailVerified { diff --git a/web/react/components/center_panel.jsx b/web/react/components/center_panel.jsx index 242c2c637..ea0eec747 100644 --- a/web/react/components/center_panel.jsx +++ b/web/react/components/center_panel.jsx @@ -61,9 +61,7 @@ export default class CenterPanel extends React.Component { <div id='channel-header'> <ChannelHeader /> </div> - <div id='post-list'> - {postsContainer} - </div> + {postsContainer} <div className='post-create__container' id='post-create' diff --git a/web/react/components/create_post.jsx b/web/react/components/create_post.jsx index 1545cdfaa..4d1874e18 100644 --- a/web/react/components/create_post.jsx +++ b/web/react/components/create_post.jsx @@ -236,8 +236,6 @@ export default class CreatePost extends React.Component { PostStore.storeCurrentDraft(draft); } resizePostHolder() { - const height = this.state.windowHeight - $(ReactDOM.findDOMNode(this.refs.topDiv)).height() - 50; - $('.post-list-holder-by-time').css('height', `${height}px`); if (this.state.windowWidth > 960) { $('#post_textbox').focus(); } diff --git a/web/react/components/posts_view_container.jsx b/web/react/components/posts_view_container.jsx index 301057990..761664602 100644 --- a/web/react/components/posts_view_container.jsx +++ b/web/react/components/posts_view_container.jsx @@ -261,7 +261,7 @@ export default class PostsViewContainer extends React.Component { } return ( - <div>{postListCtls}</div> + <div id='post-list'>{postListCtls}</div> ); } } diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx index aab9919a4..8b5f7a381 100644 --- a/web/react/components/sidebar.jsx +++ b/web/react/components/sidebar.jsx @@ -20,6 +20,7 @@ const Utils = require('../utils/utils.jsx'); const Constants = require('../utils/constants.jsx'); const Preferences = Constants.Preferences; const TutorialSteps = Constants.TutorialSteps; +const NotificationPrefs = Constants.NotificationPrefs; const Tooltip = ReactBootstrap.Tooltip; const OverlayTrigger = ReactBootstrap.OverlayTrigger; @@ -76,6 +77,8 @@ export default class Sidebar extends React.Component { if (ch.type === 'D') { chMentionCount = chUnreadCount; chUnreadCount = 0; + } else if (chMember.notify_props && chMember.notify_props.mark_unread === NotificationPrefs.MENTION) { + chUnreadCount = 0; } channelUnreadCounts[ch.id] = {msgs: chUnreadCount, mentions: chMentionCount}; @@ -362,7 +365,7 @@ export default class Sidebar extends React.Component { var unread = false; if (channelMember) { msgCount = unreadCount.msgs + unreadCount.mentions; - unread = (msgCount > 0 && channelMember.notify_props.mark_unread !== 'mention') || channelMember.mention_count > 0; + unread = msgCount > 0 || channelMember.mention_count > 0; } if (unread) { diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index 7d885681a..58ee8e2d2 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -384,5 +384,8 @@ module.exports = { BOTTOM: 1, POST: 2, SIDEBAR_OPEN: 3 + }, + NotificationPrefs: { + MENTION: 'mention' } }; diff --git a/web/sass-files/sass/partials/_content.scss b/web/sass-files/sass/partials/_content.scss index 49b3916a9..d86e225f3 100644 --- a/web/sass-files/sass/partials/_content.scss +++ b/web/sass-files/sass/partials/_content.scss @@ -18,15 +18,15 @@ margin-left: 220px; position: relative; background: #fff; + display: flex; + flex-direction: column; .channel__wrap & { padding-top: 0; } } #post-create { + flex: 0 0 auto; background: #fff; - position: absolute; - bottom: 0; - left: 0; width: 100%; z-index: 3; } @@ -61,4 +61,4 @@ .delete-message-text { margin-top: 10px; -}
\ No newline at end of file +} diff --git a/web/sass-files/sass/partials/_headers.scss b/web/sass-files/sass/partials/_headers.scss index 5c8313454..74a7cecff 100644 --- a/web/sass-files/sass/partials/_headers.scss +++ b/web/sass-files/sass/partials/_headers.scss @@ -1,6 +1,7 @@ #channel-header { padding: 3px 0; height: 58px; + flex: 0 0 58px; } .row { &.header { diff --git a/web/sass-files/sass/partials/_markdown.scss b/web/sass-files/sass/partials/_markdown.scss index 87e809694..241377252 100644 --- a/web/sass-files/sass/partials/_markdown.scss +++ b/web/sass-files/sass/partials/_markdown.scss @@ -9,6 +9,7 @@ } } .markdown-inline-img { + -moz-force-broken-image-icon: 1; max-height: 500px; height: 500px; } diff --git a/web/sass-files/sass/partials/_post.scss b/web/sass-files/sass/partials/_post.scss index e11f9b640..ad31e3eb6 100644 --- a/web/sass-files/sass/partials/_post.scss +++ b/web/sass-files/sass/partials/_post.scss @@ -182,12 +182,16 @@ body.ios { } #post-list { + flex: 1 1 auto; + position: relative; + overflow-y: hidden; .post-list-holder-by-time { background: #fff; overflow-y: scroll; width: 100%; padding: 1em 0 0; - position: relative; + position: absolute; + height: 100%; -webkit-overflow-scrolling: touch; &::-webkit-scrollbar { width: 0px !important; diff --git a/web/sass-files/sass/partials/_videos.scss b/web/sass-files/sass/partials/_videos.scss index bcfc28f19..bb36b6223 100644 --- a/web/sass-files/sass/partials/_videos.scss +++ b/web/sass-files/sass/partials/_videos.scss @@ -52,6 +52,7 @@ } .gif-div { + -moz-force-broken-image-icon: 1; position:relative; max-width: 450px; max-height: 500px; |