Browse Source

- include changelog for project (via README and live-app footer)

- version # listed in footer
- tweaks to donation modal
master
Dan Janosik 5 years ago
parent
commit
abe20d540f
No known key found for this signature in database GPG Key ID: C6F8CE9FFDB2CED2
  1. 54
      CHANGELOG.md
  2. 2
      LICENSE
  3. 4
      README.md
  4. 15
      app.js
  5. 5
      npm-shrinkwrap.json
  6. 1
      package.json
  7. 4
      public/css/styling.css
  8. 9
      routes/baseActionsRouter.js
  9. 10
      views/changelog.pug
  10. 15
      views/includes/donation-modal.pug
  11. 3
      views/index.pug
  12. 21
      views/layout.pug

54
CHANGELOG.md

@ -0,0 +1,54 @@
#### Pending Release
* Version number in footer
* `/changelog` linked in footer
#### v1.1.2
###### 2019-10-17
* Add back map on `/peers` that was lost with recent bug
#### v1.1.1
###### 2019-10-01
* Add new default blacklist items for some 'hidden' RPCs
* Print app version info to log on startup
* Remove LTC site from footer
#### v1.1.0
###### 2019-09-30
* Show spent/unspent status on tx detail pages
* Show mempool ancestor/descendant txs on tx detail pages
* Blacklist 'createwallet' by default
* Show RBF status for unconfirmed txs
* Faster, more reliable display of `/mempool-summary` and `/unconfirmed-tx` pages
* Fix for persisting arg values in UI on `/rpc-browser`
* Misc minor fixes and ux tweaks
#### v1.0.3
###### 2019-04-27
* Pluggable address API supporting different implementations
* Logging improvements
* Fix to avoid caching unconfirmed txs
* Identify destroyed fees
* Misc minor fixes and ux tweaks
#### v1.0.2
###### 2019-03-13
* Fix for background color on light theme
#### v1.0.1
###### 2019-03-13
* Dark theme
* Tx rate graph on homepage
* Improved caching
* Misc minor fixes and ux tweaks
#### v1.0.0
###### 2019-02-23
* Initial release

2
LICENSE

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2018 Dan Janosik
Copyright (c) 2018-2019 Dan Janosik
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

4
README.md

@ -22,6 +22,10 @@ Live demo available at: [https://btc-explorer.com](https://btc-explorer.com)
* Mempool summary, with fee, size, and age breakdowns
* RPC command browser and terminal
# Changelog / Release notes
See [CHANGELOG.md](/CHANGELOG.md).
# Getting started
The below instructions are geared toward BTC, but can be adapted easily to other coins.

15
app.js

@ -139,12 +139,27 @@ function getSourcecodeProjectMetadata() {
});
}
function loadChangelog() {
var filename = "CHANGELOG.md";
fs.readFile(filename, 'utf8', function(err, data) {
if (err) {
utils.logError("2379gsd7sgd334", err);
} else {
global.changelogMarkdown = data;
}
});
}
app.onStartup = function() {
global.config = config;
global.coinConfig = coins[config.coin];
global.coinConfigs = coins;
loadChangelog();
if (global.sourcecodeVersion == null && fs.existsSync('.git')) {
simpleGit(".").log(["-n 1"], function(err, log) {
if (err) {

5
npm-shrinkwrap.json

@ -1633,6 +1633,11 @@
"uc.micro": "^1.0.5"
}
},
"marked": {
"version": "0.7.0",
"resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz",
"integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg=="
},
"md5.js": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz",

1
package.json

@ -36,6 +36,7 @@
"express-session": "1.16.1",
"jstransformer-markdown-it": "^2.1.0",
"lru-cache": "5.1.1",
"marked": "0.7.0",
"meow": "^5.0.0",
"moment": "^2.24.0",
"moment-duration-format": "2.2.2",

4
public/css/styling.css

@ -52,6 +52,10 @@ pre {
word-wrap: break-word;
}
dd {
margin-bottom: 1rem;
}
.word-wrap {
word-wrap: break-word;
word-break: break-all;

9
routes/baseActionsRouter.js

@ -12,6 +12,7 @@ var bitcoinjs = require('bitcoinjs-lib');
var sha256 = require("crypto-js/sha256");
var hexEnc = require("crypto-js/enc-hex");
var Decimal = require("decimal.js");
var marked = require("marked");
var utils = require('./../app/utils.js');
var coins = require("./../app/coins.js");
@ -1191,6 +1192,14 @@ router.get("/about", function(req, res, next) {
next();
});
router.get("/changelog", function(req, res, next) {
res.locals.changelogHtml = marked(global.changelogMarkdown);
res.render("changelog");
next();
});
router.get("/fun", function(req, res, next) {
var sortedList = coins[config.coin].historicalData;
sortedList.sort(function(a, b){

10
views/changelog.pug

@ -0,0 +1,10 @@
extends layout
block headContent
title Changelog
block content
h1.h3 Changelog
hr
| !{changelogHtml}

15
views/includes/donation-modal.pug

@ -6,13 +6,11 @@
button.close(type='button' data-dismiss='modal' aria-label='Close')
span(aria-hidden='true') ×
.modal-body
p Any and all support is greatly appreciated!
p.lead.text-primary I work on this project because I value it myself and want to give back to the BTC community. If it's valuable to you too, please consider supporting my work with a donation. Thanks!
if (config.donations.btcpayserver)
h6
span(class="mr-2") Donate via
img(src="/img/logo/btcpay.png", alt="BTCPay", style="height: 30px;", class="mr-2")
a(href="https://github.com/btcpayserver/btcpayserver") BTCPay
span(class="mr-2") Donate (via BTCPay)
- var amounts = [1, 5, 10, 25, 100];
- var icons = [ "thumbs-up", "beer", "hamburger", "utensils", "grin-hearts" ];
div(class="mb-2")
@ -44,17 +42,14 @@
link.classList.add("d-none");
}
a(href="javascript:void(0)", onclick="showDonateByAddress(this);") Or donate by address
div(id="donate-by-address", class="d-none mt-4")
div(id="donate-by-address", class="mt-4")
h6 Donate by address
div(class="mb-3")
each coin, index in config.donations.addresses.coins
div(class="monospace")
if (coinConfig.ticker == coin)
span #{coin}:
a(href=("/address/" + config.donations.addresses[coin].address), class="text-wrap") #{config.donations.addresses[coin].address}
span #{config.donations.addresses[coin].address}
else
span #{coin}:
a(href=(config.donations.addresses.sites[coin] + "/address/" + config.donations.addresses[coin].address), class="text-wrap") #{config.donations.addresses[coin].address}
@ -62,8 +57,6 @@
each coin, index in config.donations.addresses.coins
div(style="display: inline-block; max-width: 150px;", class="text-center mb-3 word-wrap monospace", class=(index > 0 ? "ml-md-3" : false))
img(src=donationAddressQrCodeUrls[coin], alt=config.donations.addresses[coin].address, style="border: solid 1px #ccc;")
br
span #{coin}
.modal-footer
button.btn.btn-secondary(type='button' data-dismiss='modal') Close

3
views/index.pug

@ -42,8 +42,7 @@ block content
if (!crawlerBot)
button.btn.btn-primary(type="button", class="btn btn-primary mb-1", data-toggle="modal", data-target="#exampleModalCenter")
i(class="fas fa-heart mr-2")
span Donate via
span(class="font-weight-light") BTCPay
span Support Project
div.mt-2
a.mr-2(href="https://www.npmjs.com/package/btc-rpc-explorer" rel="nofollow" target="_blank")

21
views/layout.pug

@ -155,11 +155,20 @@ html(lang="en")
span(class="badge bg-white text-dark") #{global.sourcecodeProjectMetadata.forks_count}
if (sourcecodeVersion)
dt Running Version
dd
a(href=("https://github.com/janoside/btc-rpc-explorer/commit/" + sourcecodeVersion)) #{sourcecodeVersion}
span(style="color: #ccc;") (#{sourcecodeDate})
dt App Details
dd
span version: #{global.appVersion}
if (sourcecodeVersion)
br
span commit:
a(href=("https://github.com/janoside/btc-rpc-explorer/commit/" + sourcecodeVersion)) #{sourcecodeVersion}
br
span released: #{sourcecodeDate}
span(style="font-size: 0.9em;") (
a(href="/changelog") changelog
span )
if (config.demoSite)
dt Public Demos
@ -183,7 +192,7 @@ html(lang="en")
dd
button.btn.btn-primary(type="button", class="btn btn-primary", data-toggle="modal", data-target="#exampleModalCenter")
i(class="fas fa-heart mr-2")
span Support Development
span Support Project
script(src="/js/jquery.min.js", integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=")
script(src="/js/popper.min.js", integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut")

Loading…
Cancel
Save