diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/react/components/posts_view.jsx | 13 | ||||
-rw-r--r-- | web/react/components/posts_view_container.jsx | 2 | ||||
-rw-r--r-- | web/react/components/tutorial/tutorial_tip.jsx | 7 | ||||
-rw-r--r-- | web/react/components/user_settings/manage_incoming_hooks.jsx | 2 | ||||
-rw-r--r-- | web/react/components/user_settings/manage_outgoing_hooks.jsx | 2 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_tutorial.scss | 8 | ||||
-rw-r--r-- | web/static/images/tutorialTip.gif | bin | 18421 -> 22502 bytes | |||
-rw-r--r-- | web/static/images/tutorialTipWhite.gif | bin | 0 -> 6704 bytes |
8 files changed, 28 insertions, 6 deletions
diff --git a/web/react/components/posts_view.jsx b/web/react/components/posts_view.jsx index 2b81d1d79..b782268fa 100644 --- a/web/react/components/posts_view.jsx +++ b/web/react/components/posts_view.jsx @@ -30,6 +30,9 @@ export default class PostsView extends React.Component { static get SIDEBAR_OPEN() { return 3; } + static get SCROLL_TYPE_NEW_MESSAGE() { + return 4; + } isAtBottom() { return ((this.refs.postlist.scrollHeight - this.refs.postlist.scrollTop) === this.refs.postlist.clientHeight); } @@ -145,6 +148,7 @@ export default class PostsView extends React.Component { <div id={newSeparatorId} key='unviewed' + ref='newMessageSeparator' className='new-separator' > <hr @@ -165,6 +169,15 @@ export default class PostsView extends React.Component { window.requestAnimationFrame(() => { this.refs.postlist.scrollTop = this.refs.postlist.scrollHeight; }); + } else if (this.props.scrollType === PostsView.SCROLL_TYPE_NEW_MESSAGE) { + window.requestAnimationFrame(() => { + // If separator exists scroll to it. Otherwise scroll to bottom. + if (this.refs.newMessageSeparator) { + this.refs.newMessageSeparator.scrollIntoView(); + } else { + this.refs.postlist.scrollTop = this.refs.postlist.scrollHeight; + } + }); } else if (this.props.scrollType === PostsView.SCROLL_TYPE_POST && this.props.scrollPost) { window.requestAnimationFrame(() => { const postNode = ReactDOM.findDOMNode(this.refs[this.props.scrollPost]); diff --git a/web/react/components/posts_view_container.jsx b/web/react/components/posts_view_container.jsx index 5059747bd..5037a86cd 100644 --- a/web/react/components/posts_view_container.jsx +++ b/web/react/components/posts_view_container.jsx @@ -109,7 +109,7 @@ export default class PostsViewContainer extends React.Component { this.setState({ currentChannelIndex: newIndex, currentLastViewed: lastViewed, - scrollType: PostsView.SCROLL_TYPE_BOTTOM, + scrollType: PostsView.SCROLL_TYPE_NEW_MESSAGE, channels, postLists}); } diff --git a/web/react/components/tutorial/tutorial_tip.jsx b/web/react/components/tutorial/tutorial_tip.jsx index 3094b2f4c..75d73e920 100644 --- a/web/react/components/tutorial/tutorial_tip.jsx +++ b/web/react/components/tutorial/tutorial_tip.jsx @@ -69,11 +69,16 @@ export default class TutorialTip extends React.Component { } } + var tipColor = ''; + if (this.props.overlayClass === 'tip-overlay--header') { + tipColor = 'White'; + } + return ( <div className={'tip-div ' + this.props.overlayClass}> <img className='tip-button' - src='/static/images/tutorialTip.gif' + src={'/static/images/tutorialTip' + tipColor + '.gif'} width='35' onClick={this.toggle} ref='target' diff --git a/web/react/components/user_settings/manage_incoming_hooks.jsx b/web/react/components/user_settings/manage_incoming_hooks.jsx index 6b8c09718..128c011ea 100644 --- a/web/react/components/user_settings/manage_incoming_hooks.jsx +++ b/web/react/components/user_settings/manage_incoming_hooks.jsx @@ -163,7 +163,7 @@ export default class ManageIncomingHooks extends React.Component { return ( <div key='addIncomingHook'> {'Create webhook URLs for use in external integrations. Please see '}<a href='http://mattermost.org/webhooks'>{'http://mattermost.org/webhooks'}</a> {' to learn more.'} - <label className='control-label padding-top x2'>{'Add a new incoming webhook'}</label> + <div><label className='control-label padding-top x2'>{'Add a new incoming webhook'}</label></div> <div className='row padding-top'> <div className='col-sm-10 padding-bottom'> <select diff --git a/web/react/components/user_settings/manage_outgoing_hooks.jsx b/web/react/components/user_settings/manage_outgoing_hooks.jsx index 93be988d1..7b7cf7401 100644 --- a/web/react/components/user_settings/manage_outgoing_hooks.jsx +++ b/web/react/components/user_settings/manage_outgoing_hooks.jsx @@ -241,7 +241,7 @@ export default class ManageOutgoingHooks extends React.Component { return ( <div key='addOutgoingHook'> {'Create webhooks to send new message events to an external integration. Please see '}<a href='http://mattermost.org/webhooks'>{'http://mattermost.org/webhooks'}</a> {' to learn more.'} - <label className='control-label'>{'Add a new outgoing webhook'}</label> + <div><label className='control-label padding-top x2'>{'Add a new outgoing webhook'}</label></div> <div className='padding-top divider-light'></div> <div className='padding-top'> <div> diff --git a/web/sass-files/sass/partials/_tutorial.scss b/web/sass-files/sass/partials/_tutorial.scss index 08d491fd9..a6e16fe37 100644 --- a/web/sass-files/sass/partials/_tutorial.scss +++ b/web/sass-files/sass/partials/_tutorial.scss @@ -127,7 +127,11 @@ right:0px; &.tip-overlay--header { - top: 20px; + top: 21px; + right: 2px; + .tip-button { + @include opacity(0.8); + } } &.tip-overlay--sidebar { @@ -154,7 +158,7 @@ margin-bottom: 50px; text-align: left; display: inline-block; - padding-bottom: 30px; + padding-bottom: 30px; } .btn-primary { position: absolute; diff --git a/web/static/images/tutorialTip.gif b/web/static/images/tutorialTip.gif Binary files differindex f185ff4b9..c925f0222 100644 --- a/web/static/images/tutorialTip.gif +++ b/web/static/images/tutorialTip.gif diff --git a/web/static/images/tutorialTipWhite.gif b/web/static/images/tutorialTipWhite.gif Binary files differnew file mode 100644 index 000000000..ecf8e97be --- /dev/null +++ b/web/static/images/tutorialTipWhite.gif |