Merge pull request #1587 from mattermost/PLT-1300
PLT-1300 adding jump button to bottom of center archive channel
Этот коммит содержится в:
@@ -13,6 +13,8 @@ import PreferenceStore from '../stores/preference_store.jsx';
|
|||||||
import ChannelStore from '../stores/channel_store.jsx';
|
import ChannelStore from '../stores/channel_store.jsx';
|
||||||
import UserStore from '../stores/user_store.jsx';
|
import UserStore from '../stores/user_store.jsx';
|
||||||
|
|
||||||
|
import * as Utils from '../utils/utils.jsx';
|
||||||
|
|
||||||
import Constants from '../utils/constants.jsx';
|
import Constants from '../utils/constants.jsx';
|
||||||
const TutorialSteps = Constants.TutorialSteps;
|
const TutorialSteps = Constants.TutorialSteps;
|
||||||
const Preferences = Constants.Preferences;
|
const Preferences = Constants.Preferences;
|
||||||
@@ -46,6 +48,8 @@ export default class CenterPanel extends React.Component {
|
|||||||
this.setState({showPostFocus: ChannelStore.getPostMode() === ChannelStore.POST_MODE_FOCUS});
|
this.setState({showPostFocus: ChannelStore.getPostMode() === ChannelStore.POST_MODE_FOCUS});
|
||||||
}
|
}
|
||||||
render() {
|
render() {
|
||||||
|
const channel = ChannelStore.getCurrent();
|
||||||
|
var handleClick = null;
|
||||||
let postsContainer;
|
let postsContainer;
|
||||||
let createPost;
|
let createPost;
|
||||||
if (this.state.showTutorialScreens) {
|
if (this.state.showTutorialScreens) {
|
||||||
@@ -53,7 +57,24 @@ export default class CenterPanel extends React.Component {
|
|||||||
createPost = null;
|
createPost = null;
|
||||||
} else if (this.state.showPostFocus) {
|
} else if (this.state.showPostFocus) {
|
||||||
postsContainer = <PostFocusView />;
|
postsContainer = <PostFocusView />;
|
||||||
createPost = null;
|
|
||||||
|
handleClick = function clickHandler(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
Utils.switchChannel(channel);
|
||||||
|
};
|
||||||
|
|
||||||
|
createPost = (
|
||||||
|
<div
|
||||||
|
id='archive-link-home'
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
href=''
|
||||||
|
onClick={handleClick}
|
||||||
|
>
|
||||||
|
{'You are viewing the Archives. Click here to jump to recent messages.'}
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
postsContainer = <PostsViewContainer />;
|
postsContainer = <PostsViewContainer />;
|
||||||
createPost = (
|
createPost = (
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ export default class PostFocusView extends React.Component {
|
|||||||
getIntroMessage() {
|
getIntroMessage() {
|
||||||
return (
|
return (
|
||||||
<div className='channel-intro'>
|
<div className='channel-intro'>
|
||||||
<h4 className='channel-intro__title'>{'Beginning of Channel'}</h4>
|
<h4 className='channel-intro__title'>{'Beginning of Channel Archives'}</h4>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,20 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#archive-link-home {
|
||||||
|
@include flex(0 0 auto);
|
||||||
|
background: #fff;
|
||||||
|
width: 100%;
|
||||||
|
min-height: 50px;
|
||||||
|
z-index: 3;
|
||||||
|
background-color: beige;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
padding-top: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.post-list {
|
.post-list {
|
||||||
.new-messages-hr {
|
.new-messages-hr {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user