Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fixing react-joyride

Ilian Sapundshievcce74ceb7120
diff --git a/app/components/AppOnboarding.js b/app/components/AppOnboarding.js
index 911681ca0..d370d8a6f 100644
--- a/app/components/AppOnboarding.js
+++ b/app/components/AppOnboarding.js
@@ -21,42 +21,44 @@ import React, { Component } from 'react';
import Joyride from 'react-joyride';
import i18n from './../services/i18n';
-class AppOnboarding extends React.Component {
+class AppOnboarding extends Component {
state = {
- run: true,
+ run: false,
steps: [
{
- target: '.locationName',
+ target: '[data-tid=createNewLocation]',
content: i18n.t('ns.common:welcomeContent'),
placement: 'bottom',
},
+ {
+ target: '[data-tid=aboutTagSpaces]',
+ content: 'Hello world',
+ placement: 'bottom',
+ },
]
};
componentDidMount() {
setTimeout(() => {
this.setState({
- isReady: true,
- isRunning: true,
+ run: true,
});
}, 1000);
}
- checkForInitialTour() {
- this.joyride.start(true);
- }
+ callback = (data) => {
+ const { action, index, type } = data;
+ };
render() {
const { steps, run } = this.state;
return (
- <div className="AppOnboarding">
- <Joyride
- steps={steps}
- run={run}
- callback={this.callback}
- />
- </div>
+ <Joyride
+ steps={steps}
+ run={run}
+ callback={this.callback}
+ />
);
}
}
diff --git a/app/containers/App.js b/app/containers/App.js
index c55be94cc..839702847 100644
--- a/app/containers/App.js
+++ b/app/containers/App.js
@@ -30,6 +30,7 @@ import green from '../assets/tsgreen';
import '../assets/fonts/roboto/index.css';
import i18n from '../services/i18n';
import { getCurrentTheme, getKeyBindingObject } from '../reducers/settings';
+import AppOnBoarding from '../components/AppOnboarding';
// Needed for onTouchTap http://stackoverflow.com/a/34015469/988941
// injectTapEventPlugin();
@@ -77,6 +78,7 @@ class App extends Component {
theme={theme}
>
<I18nextProvider i18n={i18n}>{this.props.children}</I18nextProvider>
+ <AppOnBoarding />
</MuiThemeProvider>
</HotKeys>
);