diff options
author | Corey Hulen <corey@hulen.com> | 2017-06-29 12:40:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-29 12:40:13 -0700 |
commit | f79101a279596566d6ee7076d9c8adbc259d97ed (patch) | |
tree | 8162690050436443d1a2132bc6e8c1b896795d68 /webapp/components/channel_view.jsx | |
parent | 5d239317dc71d73c63b466bc61a472e5fa39a76e (diff) | |
download | chat-f79101a279596566d6ee7076d9c8adbc259d97ed.tar.gz chat-f79101a279596566d6ee7076d9c8adbc259d97ed.tar.bz2 chat-f79101a279596566d6ee7076d9c8adbc259d97ed.zip |
Fixes issues with the tutorial (#6786)
* PLT-6907 Increased hit area for tutorial
* PLT-6907 Show the tutorial no matter what channel you're in
* Fixing eslint issue
Diffstat (limited to 'webapp/components/channel_view.jsx')
-rw-r--r-- | webapp/components/channel_view.jsx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/webapp/components/channel_view.jsx b/webapp/components/channel_view.jsx index 7e2f8069c..6c2157ffd 100644 --- a/webapp/components/channel_view.jsx +++ b/webapp/components/channel_view.jsx @@ -5,13 +5,19 @@ import $ from 'jquery'; import PropTypes from 'prop-types'; import React from 'react'; +import Constants from 'utils/constants.jsx'; import * as UserAgent from 'utils/user_agent.jsx'; import ChannelHeader from 'components/channel_header.jsx'; import FileUploadOverlay from 'components/file_upload_overlay.jsx'; import CreatePost from 'components/create_post.jsx'; import PostView from 'components/post_view'; +import TutorialView from 'components/tutorial/tutorial_view.jsx'; +const TutorialSteps = Constants.TutorialSteps; +const Preferences = Constants.Preferences; import ChannelStore from 'stores/channel_store.jsx'; +import PreferenceStore from 'stores/preference_store.jsx'; +import UserStore from 'stores/user_store.jsx'; import * as Utils from 'utils/utils.jsx'; @@ -27,7 +33,8 @@ export default class ChannelView extends React.Component { } getStateFromStores() { return { - channelId: ChannelStore.getCurrentId() + channelId: ChannelStore.getCurrentId(), + tutorialStep: PreferenceStore.getInt(Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), 999) }; } isStateValid() { @@ -66,6 +73,10 @@ export default class ChannelView extends React.Component { return false; } render() { + if (this.state.tutorialStep <= TutorialSteps.INTRO_SCREENS) { + return (<TutorialView/>); + } + return ( <div id='app-content' |