From d3481a0d2611e7396547f5307bc8e95ac7e8691d Mon Sep 17 00:00:00 2001 From: moneroexamples Date: Sun, 14 Jan 2018 13:38:49 +0800 Subject: [PATCH] more js code added --- main.cpp | 2 +- src/page.h | 20 +-- src/templates/partials/tx_details.html | 168 ++++++++++++++++++++++--- 3 files changed, 164 insertions(+), 26 deletions(-) diff --git a/main.cpp b/main.cpp index d38dc25..c27677d 100644 --- a/main.cpp +++ b/main.cpp @@ -529,7 +529,7 @@ main(int ac, const char* av[]) return xmrblocks.get_js_file("config.js"); }); - CROW_ROUTE(app, "/js/nacl-fast-cn.js.js") + CROW_ROUTE(app, "/js/nacl-fast-cn.js") ([&](const crow::request& req) { return xmrblocks.get_js_file("nacl-fast-cn.js"); }); diff --git a/src/page.h b/src/page.h index 08a6c51..962c6cc 100644 --- a/src/page.h +++ b/src/page.h @@ -408,6 +408,7 @@ namespace xmreg js_html_files += ""; js_html_files += ""; js_html_files += ""; + js_html_files += ""; js_html_files += ""; js_html_files += ""; js_html_files += ""; @@ -1833,10 +1834,10 @@ namespace xmreg } outputs.push_back(mstch::map { - {"out_pub_key" , pod_to_hex(outp.first.key)}, - {"amount" , xmreg::xmr_amount_to_str(outp.second)}, - {"mine_output" , mine_output}, - {"output_idx" , fmt::format("{:02d}", output_idx)} + {"out_pub_key" , pod_to_hex(outp.first.key)}, + {"amount" , xmreg::xmr_amount_to_str(outp.second)}, + {"mine_output" , mine_output}, + {"output_idx" , fmt::format("{:02d}", output_idx)} }); ++output_idx; @@ -5829,11 +5830,12 @@ namespace xmreg outputs_xmr_sum += outp.second; outputs.push_back(mstch::map { - {"out_pub_key" , pod_to_hex(outp.first.key)}, - {"amount" , xmreg::xmr_amount_to_str(outp.second)}, - {"amount_idx" , out_amount_index_str}, - {"num_outputs" , num_outputs_amount}, - {"output_idx" , fmt::format("{:02d}", output_idx++)} + {"out_pub_key" , pod_to_hex(outp.first.key)}, + {"amount" , xmreg::xmr_amount_to_str(outp.second)}, + {"amount_idx" , out_amount_index_str}, + {"num_outputs" , num_outputs_amount}, + {"unformated_output_idx" , output_idx}, + {"output_idx" , fmt::format("{:02d}", output_idx++)} }); } diff --git a/src/templates/partials/tx_details.html b/src/templates/partials/tx_details.html index ea87585..f2182a0 100644 --- a/src/templates/partials/tx_details.html +++ b/src/templates/partials/tx_details.html @@ -5,7 +5,7 @@ {{#enable_mixins_details}}
Tx prefix hash: {{tx_prefix_hash}}
{{/enable_mixins_details}} -
Tx public key: {{tx_pub_key}}
+
Tx public key: {{tx_pub_key}}
{{#has_payment_id}}
Payment id: {{payment_id}}
@@ -44,6 +44,15 @@ Tx version: {{tx_version}} No of confirmations: {{confirmations}} RingCT/type: {{#is_ringct}}yes/{{rct_type}}{{/is_ringct}}{{^is_ringct}}no{{/is_ringct}} + + + {{#enable_js}} + + + + {{/enable_js}} + + @@ -70,6 +79,13 @@ {{amount_idx}} of {{num_outputs}} {{/outputs}} + + {{#enable_js}} + + + {{/enable_js}} + + @@ -143,27 +159,147 @@ {{#enable_js}} - -
+ +
-
+
- + {{/enable_js}}