mirror of
https://github.com/strapi/strapi.git
synced 2025-09-27 01:09:49 +00:00
Merge branch 'master' into feature/deep-filtering-mongoose-bookshelf
This commit is contained in:
commit
d19cbbacf0
7
.github/PULL_REQUEST_TEMPLATE.md
vendored
7
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,3 +1,10 @@
|
|||||||
|
> ⚠️ We have stopped merging PRs for now to the Strapi core.<br><br>
|
||||||
|
> The reason is that we are developing new architecture for the admin panel and for the plugins.<br>
|
||||||
|
> This new architecture will provide stability of the Strapi core as we approach the release of Beta.<br>
|
||||||
|
> We appreciate and welcome all your contributions, but until further notice, please do not submit a PR as it will not be merged.<br>
|
||||||
|
> Furthermore, you will have to rewrite it based on the new architecture.
|
||||||
|
|
||||||
|
|
||||||
<!-- ⚠️ Your PR title will appear in the changelogs please make it short detailed and understandable for all. -->
|
<!-- ⚠️ Your PR title will appear in the changelogs please make it short detailed and understandable for all. -->
|
||||||
|
|
||||||
<!-- Write a short description of what your PR does and link the concerned issues of your update. -->
|
<!-- Write a short description of what your PR does and link the concerned issues of your update. -->
|
||||||
|
@ -39,10 +39,14 @@ install:
|
|||||||
jobs:
|
jobs:
|
||||||
include:
|
include:
|
||||||
- stage: test
|
- stage: test
|
||||||
name: 'Lint / Snyk / Unit Tests '
|
name: Snyk
|
||||||
|
script: npm run -s test:snyk
|
||||||
|
if: fork = false
|
||||||
|
|
||||||
|
- stage: test
|
||||||
|
name: 'Lint / Unit Tests '
|
||||||
script:
|
script:
|
||||||
- npm run -s lint
|
- npm run -s lint
|
||||||
- npm run -s test:snyk
|
|
||||||
- npm run -s test:unit
|
- npm run -s test:unit
|
||||||
|
|
||||||
- <<: *e2e_tests
|
- <<: *e2e_tests
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
# Contribute to Strapi
|
# Contribute to Strapi
|
||||||
|
|
||||||
|
> ⚠️ We have stopped merging PRs for now to the Strapi core.<br><br>
|
||||||
|
> The reason is that we are developing new architecture for the admin panel and for the plugins.<br>
|
||||||
|
> This new architecture will provide stability of the Strapi core as we approach the release of Beta.<br>
|
||||||
|
> We appreciate and welcome all your contributions, but until further notice, please do not submit a PR as it will not be merged.<br>
|
||||||
|
> Furthermore, you will have to rewrite it based on the new architecture.
|
||||||
|
|
||||||
First off, thanks for taking the time to contribute! 🎉👍
|
First off, thanks for taking the time to contribute! 🎉👍
|
||||||
|
|
||||||
The following is a set of guidelines for contributing to Strapi and its packages.
|
The following is a set of guidelines for contributing to Strapi and its packages.
|
||||||
|
@ -121,6 +121,12 @@ Be aware that one of the content type builder won't work due to the writing file
|
|||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
|
> ⚠️ We have stopped merging PRs for now to the Strapi core.<br><br>
|
||||||
|
> The reason is that we are developing new architecture for the admin panel and for the plugins.<br>
|
||||||
|
> This new architecture will provide stability of the Strapi core as we approach the release of Beta.<br>
|
||||||
|
> We appreciate and welcome all your contributions, but until further notice, please do not submit a PR as it will not be merged.<br>
|
||||||
|
> Furthermore, you will have to rewrite it based on the new architecture.
|
||||||
|
|
||||||
Please read our [Contributing Guide](./CONTRIBUTING.md) before submitting a Pull Request to the project.
|
Please read our [Contributing Guide](./CONTRIBUTING.md) before submitting a Pull Request to the project.
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
@ -15,7 +15,14 @@ import injectReducer from 'utils/injectReducer';
|
|||||||
|
|
||||||
import OnboardingVideo from 'components/OnboardingVideo';
|
import OnboardingVideo from 'components/OnboardingVideo';
|
||||||
|
|
||||||
import { getVideos, onClick, removeVideos, setVideoDuration, setVideoEnd, updateVideoStartTime } from './actions';
|
import {
|
||||||
|
getVideos,
|
||||||
|
onClick,
|
||||||
|
removeVideos,
|
||||||
|
setVideoDuration,
|
||||||
|
setVideoEnd,
|
||||||
|
updateVideoStartTime,
|
||||||
|
} from './actions';
|
||||||
import makeSelectOnboarding from './selectors';
|
import makeSelectOnboarding from './selectors';
|
||||||
import reducer from './reducer';
|
import reducer from './reducer';
|
||||||
import saga from './saga';
|
import saga from './saga';
|
||||||
@ -43,17 +50,17 @@ export class Onboarding extends React.Component {
|
|||||||
|
|
||||||
setVideoEnd = () => {
|
setVideoEnd = () => {
|
||||||
this.setVideoEnd();
|
this.setVideoEnd();
|
||||||
}
|
};
|
||||||
|
|
||||||
didPlayVideo = (index, currTime) => {
|
didPlayVideo = (index, currTime) => {
|
||||||
const eventName = `didPlay${index}GetStartedVideo`;
|
const eventName = `didPlay${index}GetStartedVideo`;
|
||||||
this.context.emitEvent(eventName, { timestamp: currTime });
|
this.context.emitEvent(eventName, { timestamp: currTime });
|
||||||
}
|
};
|
||||||
|
|
||||||
didStopVideo = (index, currTime) => {
|
didStopVideo = (index, currTime) => {
|
||||||
const eventName = `didStop${index}Video`;
|
const eventName = `didStop${index}Video`;
|
||||||
this.context.emitEvent(eventName, { timestamp: currTime });
|
this.context.emitEvent(eventName, { timestamp: currTime });
|
||||||
}
|
};
|
||||||
|
|
||||||
handleOpenModal = () => this.setState({ showVideos: true });
|
handleOpenModal = () => this.setState({ showVideos: true });
|
||||||
|
|
||||||
@ -67,10 +74,9 @@ export class Onboarding extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
updateCurrentTime = (index, current, duration) => {
|
updateCurrentTime = (index, current, duration) => {
|
||||||
|
|
||||||
this.props.updateVideoStartTime(index, current);
|
this.props.updateVideoStartTime(index, current);
|
||||||
|
|
||||||
const percent = current * 100 / duration;
|
const percent = (current * 100) / duration;
|
||||||
const video = this.props.videos[index];
|
const video = this.props.videos[index];
|
||||||
|
|
||||||
if (percent >= 80) {
|
if (percent >= 80) {
|
||||||
@ -80,21 +86,35 @@ export class Onboarding extends React.Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
updateEnd = (index) => {
|
updateEnd = index => {
|
||||||
this.props.setVideoEnd(index, true);
|
this.props.setVideoEnd(index, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
// eslint-disable-line jsx-handler-names
|
// eslint-disable-line jsx-handler-names
|
||||||
render() {
|
render() {
|
||||||
const { videos, onClick, setVideoDuration } = this.props;
|
const { videos, onClick, setVideoDuration } = this.props;
|
||||||
|
const { showVideos } = this.state;
|
||||||
|
|
||||||
|
const style = showVideos ? {} : { maxWidth: 0 };
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={cn(styles.videosWrapper, videos.length > 0 ? styles.visible : styles.hidden)}>
|
<div
|
||||||
<div className={cn(styles.videosContent, this.state.showVideos ? styles.shown : styles.hide)}>
|
style={style}
|
||||||
|
className={cn(styles.videosWrapper, videos.length > 0 ? styles.visible : styles.hidden)}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={style}
|
||||||
|
className={cn(styles.videosContent, this.state.showVideos ? styles.shown : styles.hide)}
|
||||||
|
>
|
||||||
<div className={styles.videosHeader}>
|
<div className={styles.videosHeader}>
|
||||||
<p><FormattedMessage id="app.components.Onboarding.title" /></p>
|
<p>
|
||||||
|
<FormattedMessage id="app.components.Onboarding.title" />
|
||||||
|
</p>
|
||||||
{videos.length && (
|
{videos.length && (
|
||||||
<p>{Math.floor((videos.filter(v => v.end).length)*100/videos.length)}<FormattedMessage id="app.components.Onboarding.label.completed" /></p>
|
<p>
|
||||||
|
{Math.floor((videos.filter(v => v.end).length * 100) / videos.length)}
|
||||||
|
<FormattedMessage id="app.components.Onboarding.label.completed" />
|
||||||
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<ul className={styles.onboardingList}>
|
<ul className={styles.onboardingList}>
|
||||||
@ -116,10 +136,7 @@ export class Onboarding extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.openBtn}>
|
<div className={styles.openBtn}>
|
||||||
<button
|
<button onClick={this.handleVideosToggle} className={this.state.showVideos ? styles.active : ''}>
|
||||||
onClick={this.handleVideosToggle}
|
|
||||||
className={this.state.showVideos ? styles.active : ''}
|
|
||||||
>
|
|
||||||
<i className="fa fa-question" />
|
<i className="fa fa-question" />
|
||||||
<i className="fa fa-times" />
|
<i className="fa fa-times" />
|
||||||
<span />
|
<span />
|
||||||
@ -157,7 +174,10 @@ Onboarding.propTypes = {
|
|||||||
const mapStateToProps = makeSelectOnboarding();
|
const mapStateToProps = makeSelectOnboarding();
|
||||||
|
|
||||||
function mapDispatchToProps(dispatch) {
|
function mapDispatchToProps(dispatch) {
|
||||||
return bindActionCreators({ getVideos, onClick, setVideoDuration, updateVideoStartTime, setVideoEnd, removeVideos }, dispatch);
|
return bindActionCreators(
|
||||||
|
{ getVideos, onClick, setVideoDuration, updateVideoStartTime, setVideoEnd, removeVideos },
|
||||||
|
dispatch,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const withConnect = connect(
|
const withConnect = connect(
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
/* global <%= globalID %> */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <%= filename %> service
|
* <%= filename %> service
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user