diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index be6a74d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -language: bash - -dist: xenial - -services: - - docker - -script: - - echo "testing" - - echo $TRAVIS_BRANCH - -notifications: - slack: - rooms: - - $SLACK_NOTIFICATION_KEY - on_success: always - on_failure: always - template: - - "Repo `%{repository_slug}` *%{result}* build (<%{build_url}|#%{build_number}>) for commit (<%{compare_url}|%{commit}>) on branch `%{branch}`." - - "Execution time: *%{duration}*" - - "Message: %{message}" - -deploy: - provider: script - script: bash .travis/deploy.sh - skip_cleanup: true - on: - all_branches: true - condition: $TRAVIS_BRANCH =~ ^release-[0-9.]+$ \ No newline at end of file diff --git a/.travis/deploy.sh b/.travis/deploy.sh deleted file mode 100644 index 389da59..0000000 --- a/.travis/deploy.sh +++ /dev/null @@ -1,7 +0,0 @@ -docker build -t $DOCKER_IMAGE . - -echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - -docker push $DOCKER_IMAGE - -curl $UPDATE_HOOK \ No newline at end of file diff --git a/LICENSE b/LICENSE index 31b4e4c..26be5c3 100644 --- a/LICENSE +++ b/LICENSE @@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/package.json b/package.json index 5e79ddb..6a7bacc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gitcourse-core", - "version": "0.5.3", + "version": "0.5.6", "description": "A front framework which can present courses made by git repositories", "main": "lib/index.js", "repository": { diff --git a/src/pages/HomePage.js b/src/pages/HomePage.js index b36e61a..c48d673 100644 --- a/src/pages/HomePage.js +++ b/src/pages/HomePage.js @@ -9,15 +9,19 @@ const { Header } = Layout; class HomePage extends Component { componentDidMount() { - const {compact,dockerEndpoint,corsProxy,repo}=this.props; + const {compact,dockerEndpoint,corsProxy,repo,currentIndex,showGuide}=this.props; const store=this.props.store; store.setDockerEndpoint(dockerEndpoint); store.setCorsProxy(corsProxy); store.setRepo(repo); store.course.setCompact(compact); + store.setCurrentIndex(currentIndex); + store.setShowGuide(showGuide); setTimeout(store.updateCourse,1000);//necessary pause } + + render() { const {store}=this.props; const compact=store.course.compact; diff --git a/src/pages/Scenario.js b/src/pages/Scenario.js index 8e5182e..f850481 100644 --- a/src/pages/Scenario.js +++ b/src/pages/Scenario.js @@ -6,13 +6,6 @@ import Fullscreen from "react-full-screen"; import Step from "./Step"; import TrainPanel from "./TrainPanel"; -function showModal() { - Modal.success({ - title: 'Congratulations!', - content: '恭喜你!你已完成全部实训课程!', - }); -} - class Scenario extends Component { state = { @@ -74,6 +67,11 @@ class Scenario extends Component { this.setState({ firstPaneSize: currentPaneSize }); + }else{ + store.setShowGuide(true); + this.setState({ + firstPaneSize: currentPaneSize + }); } }; @@ -81,6 +79,7 @@ class Scenario extends Component { const store=this.props.store; const compact=store.course.compact; const scenarioIndex=store.currentIndex; + const length=store.course.scenarios.length;//don't remove this line const scenarioCurrent = store.course.scenarios[scenarioIndex]; if (!scenarioCurrent) { return
@@ -188,11 +187,6 @@ class Scenario extends Component { 完成 } - { - stepIndex === scenarioCurrent.steps.length - 1 && - scenarioIndex === store.course.scenarios.length - 1 && - showModal() - }