diff --git a/_data/wallets-collection.yml b/_data/wallets-collection.yml index 16d85c9..4347c17 100644 --- a/_data/wallets-collection.yml +++ b/_data/wallets-collection.yml @@ -1,29 +1,3 @@ -- name: "Dash Core Win/32 ZIP" - description: Dash Core QT Wallet (All Features incl IS, PS, ....) - logo_url: /assets/img/dash_circle_normal.png - os: win32 - type: desktop - vendor_id: dash_core - vendor_label: Dash Core - product_id: dash_core_win_32_zip - product_label: Dash Core Win/32 ZIP - product_security_label: "https://www.dash.org" - product_security_url: "https://www.dash.org" - product_website_label: Dash.org - product_website_url: "https://www.dash.org" - product_source_label: Github - product_source_url: "https://github.com/dashpay/dash" - links: - - - label: Download ZIP - url: "https://www.dash.org/binaries/dash-0.12.0.58-win32.zip" - - - label: Hash File - url: "https://github.com/dashpay/dash/releases/download/v0.12.0.58/SHA256SUMS.asc" - - - label: PGP - url: "https://www.dash.org/binaries/dash-0.12.0.58-win32.zip.asc" - - name: "Dash Core Win/32 Installer" description: Dash Core QT Wallet (All Features incl IS, PS, ....) logo_url: /assets/img/dash_circle_normal.png @@ -50,6 +24,32 @@ label: PGP
 url: "https://www.dash.org/binaries/dash-0.12.0.58-win32-setup.exe.asc" +- name: "Dash Core Win/32 ZIP" + description: Dash Core QT Wallet (All Features incl IS, PS, ....) + logo_url: /assets/img/dash_circle_normal.png + os: win32 + type: desktop + vendor_id: dash_core + vendor_label: Dash Core + product_id: dash_core_win_32_zip + product_label: Dash Core Win/32 ZIP + product_security_label: "https://www.dash.org" + product_security_url: "https://www.dash.org" + product_website_label: Dash.org + product_website_url: "https://www.dash.org" + product_source_label: Github + product_source_url: "https://github.com/dashpay/dash" + links: + - + label: Download ZIP + url: "https://www.dash.org/binaries/dash-0.12.0.58-win32.zip" + - + label: Hash File + url: "https://github.com/dashpay/dash/releases/download/v0.12.0.58/SHA256SUMS.asc" + - + label: PGP + url: "https://www.dash.org/binaries/dash-0.12.0.58-win32.zip.asc" + - name: "Dash Core Win/64 Installer" description: Dash Core QT Wallet (All Features incl IS, PS, ....) logo_url: /assets/img/dash_circle_normal.png diff --git a/_includes/hero/get-dash.html b/_includes/hero/get-dash.html index ecd3c57..ff8b5ab 100644 --- a/_includes/hero/get-dash.html +++ b/_includes/hero/get-dash.html @@ -16,12 +16,14 @@

{% t pages.get-dash.hero-heading %}

{% t pages.get-dash.hero-text %}

-
- - {% t pages.get-dash.hero-all-wallets-btn %} -
-

{% t pages.get-dash.hero-platform-not-detected %}

+
+

{% t pages.get-dash.hero-platform-not-detected %}

+
+ + {% t pages.get-dash.hero-all-wallets-btn %} +
+
{% t pages.get-dash.hero-guide-btn %} {% t pages.get-dash.hero-buy-btn %} diff --git a/_includes/wallets_js_data.html b/_includes/wallets_js_data.html index a98ab51..0de3a07 100644 --- a/_includes/wallets_js_data.html +++ b/_includes/wallets_js_data.html @@ -1,6 +1,6 @@ -{% assign desktop-os-collection = site.data.wallets-collection | where:"type","desktop" | group_by:"os" %} +{% assign wallet-collection-by-os = site.data.wallets-collection | group_by:"os" %} diff --git a/src/js/get-dash.js b/src/js/get-dash.js index 9e1d999..f96b71f 100644 --- a/src/js/get-dash.js +++ b/src/js/get-dash.js @@ -6,7 +6,9 @@ 'use strict'; $(document).ready(function () { - initDownloadButton(); + if (typeof(walletsCollectionByOs) !== 'undefined' && walletsCollectionByOs) { + initDownloadButton(); + } }); function getBestWalletMatch() { @@ -15,8 +17,10 @@ })), _family = platform.os.family, _vendor = 'dash_core', + _product_id = null, _walletOs = 'win32', - _type = 'desktop' + _type = 'desktop', + detectedWallet = {} ; switch (true) { @@ -42,6 +46,7 @@ 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'; _vendor = 'dash_core'; _type = 'desktop'; break; @@ -50,8 +55,13 @@ break; } - var detectedWallet = _.find(_walletsCollection,{os:_walletOs,vendor_id:_vendor,type:_type}); + if ( _product_id ) { + detectedWallet = _.find(_walletsCollection,{product_id:_product_id}); + } else { + detectedWallet = _.find(_walletsCollection,{os:_walletOs,vendor_id:_vendor,type:_type}); + } + console.info('detectedWallet: ' , detectedWallet, {os:_walletOs,vendor_id:_vendor,type:_type}); return detectedWallet; } @@ -68,19 +78,21 @@ _notDetectedMessage = $('#platform-not-detected'); ; - if (_detectedWallet) { - _downloadButton.html(_detectedWallet.links[0].label+': '+_detectedWallet.name) - .attr({ - title: platform.os.toString() - }) - .data('detectedWallet',_detectedWallet) - .click(onDownloadClick) - .show() - ; - _notDetectedMessage.hide(); - } else { - _downloadButton.hide(); - _notDetectedMessage.show(); + if (_downloadButton && _downloadButton.length > 0) { + if (_detectedWallet) { + _downloadButton.html(_detectedWallet.links[0].label+': '+_detectedWallet.name) + .attr({ + title: platform.os.toString() + }) + .data('detectedWallet',_detectedWallet) + .click(onDownloadClick) + .show() + ; + _notDetectedMessage.hide(); + } else { + _downloadButton.hide(); + _notDetectedMessage.show(); + } } return _downloadButton; } diff --git a/src/js/platform.js b/src/js/platform.js index 156be0e..f3a3f28 100644 --- a/src/js/platform.js +++ b/src/js/platform.js @@ -6,7 +6,6 @@ */ ;(function() { 'use strict'; - console.log('platform.js'); /** Used to determine if values are of the language type `Object`. */ var objectTypes = {