summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-11-10 08:09:22 -0500
committerChristopher Speller <crspeller@gmail.com>2015-11-10 08:09:22 -0500
commit011f2bc19c4aa80072224d106f1cfa51405c2ac2 (patch)
tree90bb9d97906246a51b31077bcb9044e7d6f919ae
parentc6065a2b023059420a4d72e1216d2d7f7f6ef754 (diff)
parent55882e1b8356fd59db9fc35f2d88617b1e542a4d (diff)
downloadchat-011f2bc19c4aa80072224d106f1cfa51405c2ac2.tar.gz
chat-011f2bc19c4aa80072224d106f1cfa51405c2ac2.tar.bz2
chat-011f2bc19c4aa80072224d106f1cfa51405c2ac2.zip
Merge pull request #1370 from mattermost/plt-1008
PLT-1008 Add skip tutorial button to intro screens
-rw-r--r--web/react/components/tutorial/tutorial_intro_screens.jsx12
-rw-r--r--web/sass-files/sass/partials/_tutorial.scss7
2 files changed, 18 insertions, 1 deletions
diff --git a/web/react/components/tutorial/tutorial_intro_screens.jsx b/web/react/components/tutorial/tutorial_intro_screens.jsx
index 66ca556c6..3afc5145d 100644
--- a/web/react/components/tutorial/tutorial_intro_screens.jsx
+++ b/web/react/components/tutorial/tutorial_intro_screens.jsx
@@ -41,6 +41,11 @@ export default class TutorialIntroScreens extends React.Component {
componentDidMount() {
$('.tutorials__scroll').perfectScrollbar();
}
+ skipTutorial(e) {
+ e.preventDefault();
+ const preference = PreferenceStore.setPreference(Preferences.TUTORIAL_STEP, UserStore.getCurrentId(), '999');
+ AsyncClient.savePreferences([preference]);
+ }
createScreen() {
switch (this.state.currentScreen) {
case 0:
@@ -176,6 +181,13 @@ export default class TutorialIntroScreens extends React.Component {
>
{'Next'}
</button>
+ <a
+ className='tutorial-skip'
+ href='#'
+ onClick={this.skipTutorial}
+ >
+ {'Skip tutorial'}
+ </a>
</div>
</div>
</div>
diff --git a/web/sass-files/sass/partials/_tutorial.scss b/web/sass-files/sass/partials/_tutorial.scss
index a6e16fe37..cfbc3454a 100644
--- a/web/sass-files/sass/partials/_tutorial.scss
+++ b/web/sass-files/sass/partials/_tutorial.scss
@@ -162,7 +162,7 @@
}
.btn-primary {
position: absolute;
- bottom: 0;
+ bottom: 0px;
}
}
h1 {
@@ -179,6 +179,11 @@
position: absolute;
bottom: 40px;
}
+ .tutorial-skip {
+ position: absolute;
+ bottom: 7px;
+ left: 80px;
+ }
}
.tutorial__circles {