2018-04-30 13:31:29 -04:00
|
|
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
|
|
|
// See LICENSE.txt for license information.
|
2016-03-24 20:04:40 -04:00
|
|
|
|
2016-04-22 14:52:44 -04:00
|
|
|
import $ from 'jquery';
|
2017-09-12 15:16:32 -05:00
|
|
|
import PropTypes from 'prop-types';
|
2016-04-01 09:11:27 -04:00
|
|
|
import React from 'react';
|
|
|
|
|
|
2018-10-08 11:24:07 -04:00
|
|
|
import TutorialIntroScreens from './tutorial_intro_screens';
|
2017-10-06 01:50:05 +08:00
|
|
|
|
2016-03-24 20:04:40 -04:00
|
|
|
export default class TutorialView extends React.Component {
|
2016-04-01 09:11:27 -04:00
|
|
|
componentDidMount() {
|
2017-09-12 15:16:32 -05:00
|
|
|
if (this.props.isRoot) {
|
|
|
|
|
$('body').addClass('app__body');
|
|
|
|
|
}
|
2016-04-01 09:11:27 -04:00
|
|
|
}
|
2016-04-22 14:52:44 -04:00
|
|
|
|
2018-02-16 04:00:29 -05:00
|
|
|
componentWillUnmount() {
|
2017-09-12 15:16:32 -05:00
|
|
|
if (this.props.isRoot) {
|
|
|
|
|
$('body').removeClass('app__body');
|
|
|
|
|
}
|
2016-04-01 09:11:27 -04:00
|
|
|
}
|
2018-02-16 04:00:29 -05:00
|
|
|
|
2016-03-24 20:04:40 -04:00
|
|
|
render() {
|
|
|
|
|
return (
|
|
|
|
|
<div
|
|
|
|
|
id='app-content'
|
|
|
|
|
className='app__content'
|
|
|
|
|
>
|
2016-04-01 09:11:27 -04:00
|
|
|
<TutorialIntroScreens
|
2018-02-16 04:00:29 -05:00
|
|
|
townSquareDisplayName={this.props.townSquareDisplayName}
|
|
|
|
|
appDownloadLink={this.props.appDownloadLink}
|
|
|
|
|
isLicensed={this.props.isLicensed}
|
|
|
|
|
restrictTeamInvite={this.props.restrictTeamInvite}
|
|
|
|
|
supportEmail={this.props.supportEmail}
|
2016-04-01 09:11:27 -04:00
|
|
|
/>
|
2016-03-24 20:04:40 -04:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-09-12 15:16:32 -05:00
|
|
|
|
2018-02-16 04:00:29 -05:00
|
|
|
TutorialView.propTypes = {
|
|
|
|
|
isRoot: PropTypes.bool,
|
|
|
|
|
townSquareDisplayName: PropTypes.string.isRequired,
|
|
|
|
|
appDownloadLink: PropTypes.string,
|
|
|
|
|
isLicensed: PropTypes.bool.isRequired,
|
2019-02-01 19:43:54 +08:00
|
|
|
restrictTeamInvite: PropTypes.bool.isRequired,
|
2018-02-21 11:34:59 -05:00
|
|
|
supportEmail: PropTypes.string.isRequired,
|
2018-02-16 04:00:29 -05:00
|
|
|
};
|
|
|
|
|
|
2017-09-12 15:16:32 -05:00
|
|
|
TutorialView.defaultProps = {
|
2018-02-21 11:34:59 -05:00
|
|
|
isRoot: true,
|
2017-09-12 15:16:32 -05:00
|
|
|
};
|