diff --git a/server.js b/server.js index eac8484..b31a35c 100755 --- a/server.js +++ b/server.js @@ -192,7 +192,9 @@ function fetchMetadata(data, socket) { body.file_path = uploadResponse.filename; body.method = resolveMethod; - // console.log(body); + // Reference: + // https://github.com/lbryio/lbry.tech/blob/master/content/.vuepress/components/Tour/Step2.vue + // https://github.com/lbryio/lbry.tech/blob/master/server.js return new Promise((resolve, reject) => { request({ @@ -201,6 +203,7 @@ function fetchMetadata(data, socket) { }, (error, response, body) => { if (error) reject(error); body = JSON.parse(body); + console.log(body); resolve(body); }); }); diff --git a/views/pages/tour.js b/views/pages/tour.js index d295c90..24ffcab 100644 --- a/views/pages/tour.js +++ b/views/pages/tour.js @@ -301,5 +301,76 @@ function step2() { function step3() { - // + /** + Step 2 loading steps: + - exampleCode !== '' +
+ + - isLoading +
+ + - jsonData +

Success! Here is the response:

+
+ */ + + return html` + + `; } diff --git a/views/partials/tour-scripts.js b/views/partials/tour-scripts.js index f1cc668..7c0bc70 100644 --- a/views/partials/tour-scripts.js +++ b/views/partials/tour-scripts.js @@ -2,10 +2,7 @@ -$("#fetch-claim-uri").val(""); // reset - -detectLanguageAndUpdate(); -initCanvas(); +initializeTour(); @@ -92,6 +89,14 @@ function detectLanguageAndUpdate() { ) $("#meme-language").children(`option[value="${compare(memeLocales, userLocales)[0]}"]`).attr("selected", true); } +function initializeTour() { + $("#fetch-claim-uri").val(""); // reset + $(".hook__navigation__step:nth-child(1)").addClass("active"); + + detectLanguageAndUpdate(); + initCanvas(); +} + function fetchMetadata(stepNumber, data) {