SVG icon added to view explorer for tx

This commit is contained in:
Matt Pass 2018-05-30 21:04:43 +01:00 committed by GitHub
parent d767c553b0
commit 9897d2e57a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -201,6 +201,9 @@ btcpWidget.logo = '<svg xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" s
// Set clipboard icon as SVG
clipboardIcon = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve"><g><path d="M779.5,82.6h-76.2V64.4c0-29-29-54.4-65.3-54.4H365.7c-36.3,0-65.3,25.4-65.3,54.4v18.1h-79.9c-36.3,0-65.3,29-65.3,65.3v776.7c0,36.3,29,65.3,65.3,65.3h559c36.3,0,65.3-29,65.3-69V147.9C844.8,111.6,815.8,82.6,779.5,82.6z M333,64.4c0-10.9,14.5-18.1,29-18.1h272.2c14.5,0,29,7.3,29,18.1v90.7H336.7H333V64.4z M808.5,921c0,14.5-14.5,29-29,29h-559c-14.5,0-29-10.9-29-29V147.9c0-14.5,14.5-29,29-29h79.9v72.6h399.3h3.6v-72.6h76.2c14.5,0,29,10.9,29,29V921z" fill="white"/></g></svg>';
// Set open link icon
openLinkIcon = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 1000 1000" xml:space="preserve"><g><path d="M73.7883228,16 L44.56401,45.2243128 C42.8484762,46.9398466 42.8459918,49.728257 44.5642987,51.4465639 C46.2791092,53.1613744 49.0684023,53.1650001 50.7865498,51.4468526 L80,22.2334024 L80,32.0031611 C80,34.2058797 81.790861,36 84,36 C86.2046438,36 88,34.2105543 88,32.0031611 L88,11.9968389 C88,10.8960049 87.5527117,9.89722307 86.8294627,9.17343595 C86.1051125,8.44841019 85.1063303,8 84.0031611,8 L63.9968389,8 C61.7941203,8 60,9.790861 60,12 C60,14.2046438 61.7894457,16 63.9968389,16 L73.7883228,16 L73.7883228,16 Z M88,56 L88,36.9851507 L88,78.0296986 C88,83.536144 84.0327876,88 79.1329365,88 L16.8670635,88 C11.9699196,88 8,83.5274312 8,78.0296986 L8,17.9703014 C8,12.463856 11.9672124,8 16.8670635,8 L59.5664682,8 L40,8 C42.209139,8 44,9.790861 44,12 C44,14.209139 42.209139,16 40,16 L18.2777939,16 C17.0052872,16 16,17.1947367 16,18.668519 L16,77.331481 C16,78.7786636 17.0198031,80 18.2777939,80 L77.7222061,80 C78.9947128,80 80,78.8052633 80,77.331481 L80,56 C80,53.790861 81.790861,52 84,52 C86.209139,52 88,53.790861 88,56 L88,56 Z" fill="white"/></g></svg>';
// Selector helper function
var get = function(elem) {
return document.getElementById(elem);
@ -364,7 +367,7 @@ btcpWidget.showPaymentScreen = function(anim) {
btcpWidget.data.address = data.widgetAddress;
// Set various items that make use of address
btcpWidget.explorerLink = '<a href="https://explorer.btcprivate.org/address/'+btcpWidget.data.address+'" target="_blank" style="text-decoration: none; color: #fff">[&gt;]</a>';
btcpWidget.explorerLink = '<a href="https://explorer.btcprivate.org/address/'+btcpWidget.data.address+'" target="_blank" style="position: relative; display: inline-block; width: 20px; height: 20px; top: 5px; background: url(\'data:image/svg+xml;base64,'+window.btoa(openLinkIcon)+'\') no-repeat 0 0; background-size: 20px 20px"></a>';
btcpWidget.btcpURI = 'bitcoinprivate:'+encodeURI(btcpWidget.data.address)+
'?amount='+encodeURI(btcpWidget.data.amount)+
'&message='+encodeURI(btcpWidget.data.description);