OSDN Git Service

add the tutorial for reset password page.
authorZhiting Lin <zlin035@uottawa.ca>
Thu, 7 Jun 2018 05:37:54 +0000 (13:37 +0800)
committerZhiting Lin <zlin035@uottawa.ca>
Thu, 7 Jun 2018 05:37:54 +0000 (13:37 +0800)
src/features/tutorial/introduction.json
src/features/tutorial/reducers.js

index 8d688cb..c0390c9 100644 (file)
       ]
     }
   },
+  "/keys/:id/reset-password":{
+    "component": "TutorialForm",
+    "title": "Reset password",
+    "content": {
+      "header": "Reset password",
+      "steps": [
+        {
+          "title": "Enter the original password for your key"
+        },
+        {
+          "title": "Enter and repeat the new password for your key",
+          "description": [
+            "It's important to memorize the password for your key and keep it somewhere safe. Bytom doesn't provide any lost and found. "
+          ]
+        },
+        {
+          "title": "Click the \"Reset the Password\" button"
+        }
+      ]
+    }
+  },
   "/access-control/create-token": {
     "component": "TutorialForm",
     "title": "Create an access token",
index 54cab0d..de8e048 100644 (file)
@@ -10,7 +10,10 @@ export const location = (state = { visited: [], isVisited: false }, action) => {
         ( action.payload.search.includes('?type=token') && action.payload.pathname === '/access-control' )){
         return {  ...state, visited: [  action.payload.pathname, ...state.visited ], isVisited: false }
       }
-    }else{
+    }else if (action.payload.pathname.match(/^\/keys.*reset-password$/g) && !state.visited.includes('/keys/:id/reset-password'))
+    {
+      return {  ...state, visited: [  '/keys/:id/reset-password', ...state.visited ], isVisited: false }
+    } else{
       return{ ...state, isVisited:true }
     }
   }