cleanup for build. Issues remain with internal image /pt/assets/img/blog/CoPayWalletcopy.jpg

This commit is contained in:
Chuck Williams 2017-02-01 00:56:01 -07:00
parent c86880246c
commit 9bb2ff7536
6 changed files with 29 additions and 20 deletions

View file

@ -2,7 +2,7 @@
author: tungfa
layout: post
image: TheDosandDonts.jpg
title: The Dos and Don'ts of Pushing Crypto: Evangelist John Bush
title: "The Dos and Don'ts of Pushing Crypto: Evangelist John Bush"
---
While Bitcoin value and use continue to grow year after year, cryptocurrency is still a far cry from total main street adoption.

View file

@ -2,6 +2,6 @@
author: tungfa
layout: post
image:
title: Future of DASH Cryptocurrency : Ryan Taylor (Director of Finance)
title: "Future of DASH Cryptocurrency : Ryan Taylor (Director of Finance)"
---
<iframe width="560" height="315" src="https://www.youtube.com/embed/U7wv2zozTCY" frameborder="0" allowfullscreen></iframe>

View file

@ -2,7 +2,7 @@
author: tungfa
layout: post
image: CoPayWalletcopy.jpg
title: Copay-Dash Wallet (Testnet Only / RC 0.1)
title: "Copay-Dash Wallet (Testnet Only / RC 0.1)"
---
Im happy to announce a “Release Candidate” version of Copay-Dash, a variant of the Copay wallet which was originally developed by Bitpay.

View file

@ -2,7 +2,7 @@
author: tungfa
layout: post
image: CoPayWalletcopy.jpg
title: Copay-Dash Wallet (Testnet só / RC 0.1)
title: "Copay-Dash Wallet (Testnet só / RC 0.1)"
---
Estou feliz em anunciar uma versão “Release Candidate” da Copay-Dash, uma carteira Copay que foi desenvolvida pela Bitpay.
Além das características habituais de outras carteiras, este aplicativo com todas as características possui:

View file

@ -5,6 +5,11 @@
;(function ($) {
'use strict';
var _ = window._ || null,
walletsCollectionByOs = window.walletsCollectionByOs || undefined,
platform = window.platform || undefined
;
$(document).ready(function () {
if (typeof(walletsCollectionByOs) !== 'undefined' && walletsCollectionByOs) {
initDownloadButton();
@ -12,12 +17,12 @@
});
function getBestWalletMatch() {
var _walletsCollection = _.flatten(walletsCollectionByOs.map(function (walletGroupCollection){
var _walletsCollection = _.flatten(walletsCollectionByOs.map(function (walletGroupCollection) {
return walletGroupCollection.items;
})),
_family = platform.os.family,
_family = platform && platform.os && platform.os.family,
_vendor = 'dash_core',
_product_id = null,
_productId = null,
_walletOs = 'win32',
_type = 'desktop',
detectedWallet = {}
@ -40,47 +45,49 @@
_type = 'desktop';
break;
case /^ios/gi.test(_family):
_walletOs = 'ios'
_walletOs = 'ios';
_vendor = '';
_type = '';
break;
case /(linux|centos|debian|fedora|freebsd|gentoo|haiku|kubuntu|openbsd|red hat|suse|ubuntu|cygwin)/gi.test(_family):
_walletOs = 'linux';
_product_id = platform.os.architecture === 32 ? 'dash_core_linux_32' : 'dash_core_linux_64';
_productId = platform.os.architecture === 32 ? 'dash_core_linux_32' : 'dash_core_linux_64';
_vendor = 'dash_core';
_type = 'desktop';
break;
default:
// do nothing;
break;
}
if ( _product_id ) {
detectedWallet = _.find(_walletsCollection,{product_id:_product_id});
if (_productId) {
detectedWallet = _.find(_walletsCollection,{ product_id: _productId});
} else {
detectedWallet = _.find(_walletsCollection,{os:_walletOs,vendor_id:_vendor,type:_type});
detectedWallet = _.find(_walletsCollection,{ os: _walletOs, vendor_id: _vendor, type: _type});
}
console.info('detectedWallet: ' , detectedWallet, {os:_walletOs,vendor_id:_vendor,type:_type});
console.info('detectedWallet: ' , detectedWallet, { os: _walletOs, vendor_id: _vendor, type: _type});
return detectedWallet;
}
function onDownloadClick (event) {
function onDownloadClick(event) {
var _dlButton = $(event.target),
_linkTo = _dlButton.data('detectedWallet').links[0].url;
_linkTo = _dlButton.data('detectedWallet').links[0].url
;
window.open(_linkTo,"_blank");
window.open(_linkTo,'_blank');
}
function initDownloadButton(){
function initDownloadButton() {
var _downloadButton = $('#download-detected-platform-button'),
_detectedWallet = getBestWalletMatch(),
_notDetectedMessage = $('#platform-not-detected');
_notDetectedMessage = $('#platform-not-detected')
;
if (_downloadButton && _downloadButton.length > 0) {
if (_detectedWallet) {
_downloadButton.html(_detectedWallet.links[0].label+': '+_detectedWallet.name)
if (_detectedWallet && platform) {
_downloadButton.html(_detectedWallet.links[0].label + ': ' + _detectedWallet.name)
.attr({
title: platform.os.toString()
})

View file

@ -1,3 +1,5 @@
/* eslint-disable */
/*!
* Platform.js <https://mths.be/platform>
* Copyright 2014-2016 Benjamin Tan <https://demoneaux.github.io/>