From 0f99b7b4a4f823c09ad8c13b3e43539c5ba5750e Mon Sep 17 00:00:00 2001 From: "David A. Harding" Date: Tue, 9 May 2017 14:23:32 -0400 Subject: [PATCH 1/4] Wallets: show up to 14 wallets on one page --- _less/screen.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_less/screen.less b/_less/screen.less index 56dcd478..d20802a8 100644 --- a/_less/screen.less +++ b/_less/screen.less @@ -1694,7 +1694,7 @@ button.active { } .wallets{ - width:605px; + width:705px; height:250px; text-align:left; position:relative; @@ -1714,7 +1714,7 @@ button.active { vertical-align:top; font-size:16px; } -.wallets>div:nth-child(1n+13){ +.wallets>div:nth-child(1n+15){ display:none; } .wallets>div>a{ From 2a00906597312bbb8d92d187549b79fcb8f99057 Mon Sep 17 00:00:00 2001 From: "David A. Harding" Date: Tue, 9 May 2017 14:25:02 -0400 Subject: [PATCH 2/4] Wallets: produce error if mismatch between platform and compats If a wallet contains a section for a particular platform, it must also contain that platform in its compatibility field. This commit adds a test for the above and corrects two existing mismatches. --- _templates/choose-your-wallet.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_templates/choose-your-wallet.html b/_templates/choose-your-wallet.html index 3d9dbc85..05174019 100755 --- a/_templates/choose-your-wallet.html +++ b/_templates/choose-your-wallet.html @@ -116,7 +116,7 @@ wallets: - electrum: title: "Electrum" titleshort: "Electrum" - compat: "desktop windows mac linux" + compat: "desktop windows mac linux android" level: 2 platform: desktop: @@ -803,7 +803,7 @@ wallets: - coinspace: title: "Coin.Space" titleshort: "Coin.Space" - compat: "mobile web android windowsphone" + compat: "mobile web android windowsphone ios" level: 3 platform: mobile: @@ -1215,7 +1215,7 @@ wallets:

{{ wallet[1].title }}

-
{% for os in platform.os %}{% translate platform{{os}} %}{% endfor %}
+
{% for os in platform.os %}{% translate platform{{os}} %}{% unless wallet[1].compat contains os %}{% die platform not listed in compat field %}{% endunless %}{% endfor %}
{% if platform.link == 'bitcoincore' %}{% translate walletdownload %}{% elsif platform.link contains 'play.google.com' or platform.link contains 'itunes.apple.com' or platform.link contains 'chrome.google.com' %}{% translate walletdownload %}{% else %}{% translate walletvisit %}{% endif %}{% if platform.source %}{% translate walletsourcecode %}{% endif %}
{% for check in platform.check %}{% if check[0] == 'privacy' and platform.privacycheck %} From a2695c4a6d6bb828647d9af7fa60ea800fe7a818 Mon Sep 17 00:00:00 2001 From: "David A. Harding" Date: Tue, 9 May 2017 14:27:13 -0400 Subject: [PATCH 3/4] Wallets: error if more than 14 wallets in any category --- Makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a5ef3a20..8eabb82d 100644 --- a/Makefile +++ b/Makefile @@ -58,7 +58,9 @@ pre-build-tests-fast: check-for-non-ascii-urls check-for-wrong-filename-assignme check-for-missing-copyright-licenses \ check-bundle \ check-for-english-in-en-dir \ - check-for-consistent-bitcoin-core-titles + check-for-consistent-bitcoin-core-titles \ + check-for-too-many-wallets-on-one-platform + ## Post-build tests which, aggregated together, take less than 10 seconds to run on a typical PC post-build-tests-fast: check-for-build-errors ensure-each-svg-has-a-png check-for-liquid-errors \ @@ -259,7 +261,7 @@ check-bundle: ## Ensure all the dependencies are installed. If you build without this ## check, you'll get confusing error messages when your deps aren't up ## to date - $S ! bundle check | grep -v "The Gemfile's dependencies are satisfied" + $S ! bundle check | egrep -v "(Resolving dependencies...|The Gemfile's dependencies are satisfied)" travis-background-keepalive: $S { while ps aux | grep -q '[m]ake' ; do echo "Ignore me: Travis CI keep alive" ; sleep 1m ; done ; } & @@ -284,3 +286,10 @@ check-for-consistent-bitcoin-core-titles: ## Ensure all page titles in the en/bitcoin-core/ hierarchy mention ## Bitcoin Core $S grep -r -L '^title:.*Bitcoin Core' en/bitcoin-core/ | eval $(ERROR_ON_OUTPUT) + +check-for-too-many-wallets-on-one-platform: + $S for platform in desktop windows mac linux mobile android ios blackberry windowsphone web hardware \ + ; do count=$$( grep -c "compat:.*$$platform" _templates/choose-your-wallet.html ) \ + ; if [ $$count -gt 14 ] \ + ; then echo "ERROR: too many wallets in $$platform platform. Remove one or change layout" \ + ; fi ; done From d0b093ef399c5f31b087cbf582de5c28c423eb7f Mon Sep 17 00:00:00 2001 From: "David A. Harding" Date: Tue, 9 May 2017 14:41:49 -0400 Subject: [PATCH 4/4] Wallets: bugfix: correctly add Electrum to the mobile platform --- _templates/choose-your-wallet.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_templates/choose-your-wallet.html b/_templates/choose-your-wallet.html index 05174019..71e2cac2 100755 --- a/_templates/choose-your-wallet.html +++ b/_templates/choose-your-wallet.html @@ -116,7 +116,7 @@ wallets: - electrum: title: "Electrum" titleshort: "Electrum" - compat: "desktop windows mac linux android" + compat: "desktop windows mac linux mobile android" level: 2 platform: desktop: @@ -139,7 +139,7 @@ wallets: privacyaddressreuse: "checkpassprivacyaddressrotation" privacydisclosure: "checkfailprivacydisclosurecentralized" privacynetwork: "checkpassprivacynetworksupporttorproxy" - android: + mobile: text: "walletelectrum" link: "https://play.google.com/store/apps/details?id=org.electrum.electrum" source: "https://github.com/spesmilo/electrum"