OSDN Git Service

add the functionality for tutorial step.
authorZhiting Lin <zlin035@uottawa.ca>
Wed, 2 May 2018 07:37:40 +0000 (15:37 +0800)
committerZhiting Lin <zlin035@uottawa.ca>
Wed, 2 May 2018 07:37:40 +0000 (15:37 +0800)
src/features/app/components/Navigation/Navigation.jsx
src/features/tutorial/components/TutorialInfo/TutorialInfo.jsx
src/features/tutorial/steps.json

index ea49af9..972fdec 100644 (file)
@@ -64,7 +64,7 @@ class Navigation extends React.Component {
           <li>
             <a href='#' onClick={this.openTutorial}>
               {navIcon('tutorial', styles)}
-              Tutorial
+              {lang === 'zh' ? '教程' : 'Tutorial'}
             </a>
           </li>
         </ul>
index bdf176d..82eaffb 100644 (file)
@@ -42,14 +42,13 @@ class TutorialInfo extends React.Component {
                 if ('index' in contentLine){
                   replacement = replacement[contentLine['index']]
                 }
-                // str = str.replace('STRING', replacement['alias'])
-                str = str.replace('STRING', replacement)
+                str = str.replace('STRING', replacement['alias'])
               }
 
               return <p key={i}>{str}</p>
             })}
           </div>
-
+          {nextButton}
         </div>
     </div>
     )
index e5abba5..cf312a4 100644 (file)
@@ -6,7 +6,7 @@
     "dismiss": "Skip",
     "route": "keys",
     "content": [
-      "Would you like a brief tutorial? This guide will walk you through the basic functions available in the Bytom Dashboard."
+      "Would you like a brief tutorial? This guide will walk you through the basic functions available in the Bytom."
     ]
   },
   {
     "title": "Tutorial - Creating keys - Step 1 of 7",
     "button": "Create a key",
     "route": "keys/create",
-    "image": "mockhsm",
+    "image": "key",
     "content": [
       "Cryptographic private keys are the primary authorization mechanism on a blockchain. They control both the issuance and transfer of asset units. An asset or account will define one or more keys required for issuance or transfers.",
-      "For development environments, Bytom provides a convenient key that simulates production behaviors. Let's begin by creating a new key in our HSM."
+      "For development environments, Bytom provides a convenient key that simulates production behaviors. Let's begin by creating a new key."
     ]
   },
   {
@@ -34,6 +34,9 @@
           ]
         },
         {
+          "title": "Enter and repeat the password for your key"
+        },
+        {
           "title": "Click the \"Submit\" button"
         }
       ]
     "title": "Tutorial - Creating keys - Step 1 of 7",
     "button": "Learn about assets",
     "route": "assets",
-    "image": "mockhsm",
+    "image": "key",
     "content": [
       {
-        "type": "keys",
+        "type": "key",
         "line": "Great work! You created a new key in the key named \"STRING\". Next up, we'll learn about assets and how to create them."
       }
 
           ]
         },
         {
-          "title": "Select \"Generate new a key\" under \"Keys and Signing\"",
+          "title": "Select \"Use existing keys\" or \"Enter existing xpub\" under \"Keys and Signing\"",
           "description": [
-            "You can create a new a key here as well. Enter a descriptive alias for your new key (ex. 'aliceKey')."
+            "Choose an existing key alias or enter an existing xpub."
           ]
         },
         {