From 34197b4ae27fb36cf0b5931086f08db2a0915d97 Mon Sep 17 00:00:00 2001 From: Jason Dreyzehner Date: Wed, 28 Sep 2016 15:28:11 -0400 Subject: [PATCH 1/4] chore(package): add cordova-plugin-qrscanner to dependencies --- app-template/package.json | 30 +++++++++++++++--------------- package.json | 30 +++++++++++++++--------------- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/app-template/package.json b/app-template/package.json index 4cb6f7c94..1f82ba309 100644 --- a/app-template/package.json +++ b/app-template/package.json @@ -1,14 +1,14 @@ - { "name": "*NAMENOSPACE*", "description": "*DESCRIPTION*", "author": "BitPay", "version": "*VERSION*", "keywords": [ + "bitcoin", "wallet", + "bitpay", "copay", "multisignature", - "bitcoin", "bitcore" ], "main": "public/index.html", @@ -42,13 +42,21 @@ "url": "https://github.com/bitpay/copay/issues" }, "dependencies": { + "adm-zip": "^0.4.7", + "angular": "1.4.6", + "angular-mocks": "1.4.10", + "bhttp": "^1.2.1", "bitcore-wallet-client": "4.2.1", + "bower": "^1.7.9", + "chai": "^3.5.0", + "cordova": "5.4.1", + "cordova-android": "5.1.1", + "cordova-plugin-qrscanner": "^2.3.1", "coveralls": "^2.11.9", "express": "^4.11.2", "fs": "0.0.2", - "shelljs": "^0.3.0", - "grunt-angular-gettext": "^2.2.3", "fs-extra": "^0.30.0", + "grunt-angular-gettext": "^2.2.3", "grunt-browserify": "^5.0.0", "grunt-cli": "^1.2.0", "grunt-contrib-compress": "^1.3.0", @@ -61,27 +69,20 @@ "grunt-karma-coveralls": "^2.5.4", "grunt-nw-builder": "^2.0.3", "grunt-sass": "^1.2.0", - "adm-zip": "^0.4.7", - "angular": "1.4.6", - "angular-mocks": "1.4.10", - "bhttp": "^1.2.1", - "bower": "^1.7.9", - "chai": "^3.5.0", - "cordova": "5.4.1", - "cordova-android": "5.1.1", "karma": "^0.13.22", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^1.0.1", "karma-cli": "^1.0.0", "karma-coverage": "^1.0.0", - "pbkdf2": "^3.0.4", "karma-mocha": "^1.0.1", "karma-mocha-reporter": "^2.0.3", "karma-phantomjs-launcher": "^1.0.0", "karma-sinon": "^1.0.5", "load-grunt-tasks": "^3.5.0", "mocha": "^2.4.5", + "pbkdf2": "^3.0.4", "phantomjs-prebuilt": "^2.1.7", + "shelljs": "^0.3.0", "xcode": "^0.8.2" }, "scripts": { @@ -92,6 +93,5 @@ "test": "./node_modules/.bin/grunt test-coveralls", "clean": "git clean -dfx" }, - "devDependencies": { - } + "devDependencies": {} } diff --git a/package.json b/package.json index 29384a197..0112dfaad 100644 --- a/package.json +++ b/package.json @@ -1,4 +1,3 @@ - { "//":"PLEASE! Do not edit this file directly", "//":" Modify it at app-template/", @@ -8,10 +7,11 @@ "author": "BitPay", "version": "0.13.0", "keywords": [ + "bitcoin", "wallet", + "bitpay", "copay", "multisignature", - "bitcoin", "bitcore" ], "main": "public/index.html", @@ -45,13 +45,21 @@ "url": "https://github.com/bitpay/copay/issues" }, "dependencies": { + "adm-zip": "^0.4.7", + "angular": "1.4.6", + "angular-mocks": "1.4.10", + "bhttp": "^1.2.1", "bitcore-wallet-client": "4.2.1", + "bower": "^1.7.9", + "chai": "^3.5.0", + "cordova": "5.4.1", + "cordova-android": "5.1.1", + "cordova-plugin-qrscanner": "^2.3.1", "coveralls": "^2.11.9", "express": "^4.11.2", "fs": "0.0.2", - "shelljs": "^0.3.0", - "grunt-angular-gettext": "^2.2.3", "fs-extra": "^0.30.0", + "grunt-angular-gettext": "^2.2.3", "grunt-browserify": "^5.0.0", "grunt-cli": "^1.2.0", "grunt-contrib-compress": "^1.3.0", @@ -64,27 +72,20 @@ "grunt-karma-coveralls": "^2.5.4", "grunt-nw-builder": "^2.0.3", "grunt-sass": "^1.2.0", - "adm-zip": "^0.4.7", - "angular": "1.4.6", - "angular-mocks": "1.4.10", - "bhttp": "^1.2.1", - "bower": "^1.7.9", - "chai": "^3.5.0", - "cordova": "5.4.1", - "cordova-android": "5.1.1", "karma": "^0.13.22", "karma-chai": "^0.1.0", "karma-chrome-launcher": "^1.0.1", "karma-cli": "^1.0.0", "karma-coverage": "^1.0.0", - "pbkdf2": "^3.0.4", "karma-mocha": "^1.0.1", "karma-mocha-reporter": "^2.0.3", "karma-phantomjs-launcher": "^1.0.0", "karma-sinon": "^1.0.5", "load-grunt-tasks": "^3.5.0", "mocha": "^2.4.5", + "pbkdf2": "^3.0.4", "phantomjs-prebuilt": "^2.1.7", + "shelljs": "^0.3.0", "xcode": "^0.8.2" }, "scripts": { @@ -95,6 +96,5 @@ "test": "./node_modules/.bin/grunt test-coveralls", "clean": "git clean -dfx" }, - "devDependencies": { - } + "devDependencies": {} } From 15836bb81713ff7d24332c25fdd038ef5fe73e82 Mon Sep 17 00:00:00 2001 From: Jason Dreyzehner Date: Fri, 30 Sep 2016 21:18:54 -0400 Subject: [PATCH 2/4] build(cordova): Begin basing cordova build on more standard config.xml This completes the installations of cordova-plugin-qrscanner, including required changes to config.xml. Where possible, other plugins are now included with versioning in config.xml. --- Gruntfile.js | 3 +- app-template/Makefile | 4 +-- app-template/ProjectMakefile | 34 ++--------------------- app-template/config.xml | 53 ++++++++++++++++++++++++++++++++++++ app-template/package.json | 16 +++++++---- chrome-app/manifest.json | 6 ++-- package.json | 27 ++++++++++-------- webkitbuilds/.desktop | 8 +++--- webkitbuilds/setup-win.iss | 18 ++++++------ 9 files changed, 103 insertions(+), 66 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 5b610e424..36610478e 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -141,7 +141,8 @@ module.exports = function(grunt) { 'src/js/externalServices.js', 'src/js/init.js', 'src/js/trezor-url.js', - 'bower_components/trezor-connect/login.js' + 'bower_components/trezor-connect/login.js', + 'node_modules/cordova-plugin-qrscanner/dist/cordova-plugin-qrscanner-lib.min.js' ], dest: 'public/js/copay.js' }, diff --git a/app-template/Makefile b/app-template/Makefile index f18321402..c8b86509c 100644 --- a/app-template/Makefile +++ b/app-template/Makefile @@ -9,7 +9,7 @@ clean: $(WORKDIR)android $(WORKDIR)ios: config.xml - cordova create $@ com.bitpay.*NAMENOSPACE* *NAMECASENOSPACE* || echo "Project Path Existed" + cordova create $@ com.bitpay.*NAMENOSPACE* '*NAMECASENOSPACE*' || echo "Project Path Existed" cp ProjectMakefile $@/Makefile rm -r $@/www && ln -sF ../../public $@/www cp config.xml $@/config.xml @@ -35,7 +35,7 @@ wp-init: config.xml cp config.xml $(WORKDIR)$@/config.xml make -C $(WORKDIR)$@ $(subst $(WORKDIR),, $(WORKDIR)$@) -wp-copy: +wp-copy: cp -rvf wp/Properties/* $(WORKDIR)wp/platforms/wp8/Properties/ cp -rvf wp/MainPage.xaml $(WORKDIR)wp/platforms/wp8/ cp -rvf wp/Package.appxmanifest $(WORKDIR)wp/platforms/wp8/ diff --git a/app-template/ProjectMakefile b/app-template/ProjectMakefile index a3813ae2d..1116fc159 100644 --- a/app-template/ProjectMakefile +++ b/app-template/ProjectMakefile @@ -1,52 +1,24 @@ .PHONY:plugins ios-platform android-platform wp8-platform plugins: - cordova plugin add cordova-plugin-globalization - cordova plugin add cordova.plugins.diagnostic - cordova plugin add cordova-plugin-splashscreen - cordova plugin add cordova-plugin-statusbar cordova plugin add https://github.com/cmgustavo/Custom-URL-scheme.git --variable URL_SCHEME=bitcoin --variable SECOND_URL_SCHEME=*NAMENOSPACE* - cordova plugin add cordova-plugin-inappbrowser - cordova plugin add cordova-plugin-x-toast && cordova prepare - cordova plugin add https://github.com/VersoSolutions/CordovaClipboard - cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git && cordova prepare - cordova plugin add cordova-plugin-spinner-dialog - cordova plugin add cordova-plugin-dialogs - cordova plugin add cordova-plugin-network-information - cordova plugin add cordova-plugin-console - cordova plugin add cordova-plugin-uniquedeviceid - cordova plugin add cordova-plugin-file - cordova plugin add cordova-plugin-touch-id cordova prepare - cordova plugin add cordova-plugin-transport-security - cordova plugin add cordova-ios-requires-fullscreen - cordova plugin add cordova-plugin-disable-bitcode rm -rf platforms/android/res/values-es - cordova plugin add cordova-plugin-android-fingerprint-auth - cordova plugin add cordova-plugin-screen-orientation - cordova plugin add ionic-plugin-keyboard - cordova plugin add cordova-plugin-whitelist - cordova plugin add https://github.com/driftyco/cordova-plugin-wkwebview-engine.git --save - - ios-platform android-platform wp8-platform: cordova platforms add $(subst -platform,,$@) || echo "Platform already added" ios: ios-platform plugins - cordova plugin add https://github.com/tjwoon/csZBar.git - cordova plugin add phonegap-plugin-push@1.5.3 + echo android: android-platform plugins - cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner - cordova plugin add phonegap-plugin-push@1.2.3 + echo wp: wp8-platform plugins - cordova plugin add https://github.com/jrontend/phonegap-plugin-barcodescanner + echo build-ios build-android build-wp8: cordova build $(subst build-,,$@) run: cordova run --device - diff --git a/app-template/config.xml b/app-template/config.xml index 84952a749..e865b2bbf 100644 --- a/app-template/config.xml +++ b/app-template/config.xml @@ -28,10 +28,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The camera is used to read QR codes. + + + + + diff --git a/app-template/package.json b/app-template/package.json index 1f82ba309..2bd898d52 100644 --- a/app-template/package.json +++ b/app-template/package.json @@ -86,12 +86,18 @@ "xcode": "^0.8.2" }, "scripts": { - "preinstall": "bower install && npm i fs-extra && cd app-template && node apply.js", - "postinstall": "npm run build", + "preinstall": "bower install && npm i fs-extra", "build": "grunt", - "start": "node app.js", + "apply:copay": "cd app-template && node apply.js", + "apply:bitpay-wallet": "cd app-template && node apply.js bitpay-wallet", + "start": "npm run build && node app.js", + "watch": "grunt watch", "test": "./node_modules/.bin/grunt test-coveralls", - "clean": "git clean -dfx" + "clean": "git clean -dfx", + "start:ios": "npm run build && cd cordova && trash project-ios && make ios && open project-ios/platforms/ios/BitPay\\ Wallet.xcodeproj", + "start:android": "npm run build && cd cordova && trash project-android && make android" }, - "devDependencies": {} + "devDependencies": { + "trash-cli": "^1.4.0" + } } diff --git a/chrome-app/manifest.json b/chrome-app/manifest.json index 82548f4c9..66fed64f0 100644 --- a/chrome-app/manifest.json +++ b/chrome-app/manifest.json @@ -3,9 +3,9 @@ "//":" Modify it at app-template/", "manifest_version": 2, - "name": "BitPay", - "description": "The BitPay Bitcoin Wallet", - "version": "0.13.0", + "name": "BitPay Wallet", + "description": "Secure Bitcoin Storage", + "version": "0.6.0", "permissions": [ "storage", "unlimitedStorage", diff --git a/package.json b/package.json index 0112dfaad..4d42bde88 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ - { + { "//":"PLEASE! Do not edit this file directly", - "//":" Modify it at app-template/", + "//":" Modify it at app-template/", - "name": "bitpay", - "description": "The BitPay Bitcoin Wallet", + "name": "wallet", + "description": "Secure Bitcoin Storage", "author": "BitPay", - "version": "0.13.0", + "version": "0.6.0", "keywords": [ "bitcoin", "wallet", @@ -16,7 +16,7 @@ ], "main": "public/index.html", "window": { - "title": "BitPay - The BitPay Bitcoin Wallet", + "title": "BitPay Wallet - Secure Bitcoin Storage", "icon": "./public/img/icons/icon-256.png", "toolbar": false, "show": true, @@ -89,12 +89,17 @@ "xcode": "^0.8.2" }, "scripts": { - "preinstall": "bower install && npm i fs-extra && cd app-template && node apply.js", - "postinstall": "npm run build", + "preinstall": "bower install && npm i fs-extra", "build": "grunt", - "start": "node app.js", + "apply:copay": "cd app-template && node apply.js", + "apply:bitpay-wallet": "cd app-template && node apply.js bitpay-wallet", + "start": "npm run build && node app.js", + "watch": "grunt watch", "test": "./node_modules/.bin/grunt test-coveralls", - "clean": "git clean -dfx" + "clean": "git clean -dfx", + "start:ios": "npm run build && cd cordova && trash project-ios && make ios && open project-ios/platforms/ios/BitPay\\ Wallet.xcodeproj" }, - "devDependencies": {} + "devDependencies": { + "trash-cli": "^1.4.0" + } } diff --git a/webkitbuilds/.desktop b/webkitbuilds/.desktop index ef36f1003..b886061ba 100644 --- a/webkitbuilds/.desktop +++ b/webkitbuilds/.desktop @@ -1,9 +1,9 @@ [Desktop Entry] Type=Application -Version=0.13.0 -Name=BitPay -Comment=The BitPay Bitcoin Wallet -Exec=bitpay +Version=0.6.0 +Name=BitPay Wallet +Comment=Secure Bitcoin Storage +Exec=wallet Icon=icon-256.png Terminal=false Categories=Finance diff --git a/webkitbuilds/setup-win.iss b/webkitbuilds/setup-win.iss index cb7008351..75890c496 100755 --- a/webkitbuilds/setup-win.iss +++ b/webkitbuilds/setup-win.iss @@ -1,8 +1,8 @@ ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! -#define MyAppName "bitpay" -#define MyAppVersion "0.13.0" +#define MyAppName "wallet" +#define MyAppVersion "0.6.0" #define MyAppPublisher "BitPay" #define MyAppURL "https://bitpay.com" #define MyAppExeName "*NAMECASENOSPACE.exe" @@ -18,7 +18,7 @@ AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName={pf}\{#MyAppName} DefaultGroupName={#MyAppName} -OutputBaseFilename=BitPay-win +OutputBaseFilename=BitPay Wallet-win OutputDir=./ Compression=lzma SolidCompression=yes @@ -32,8 +32,8 @@ Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] -Source: "BitPay\win64\bitpay.exe"; DestDir: "{app}"; Flags: ignoreversion -Source: "BitPay\win64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs +Source: "BitPay Wallet\win64\wallet.exe"; DestDir: "{app}"; Flags: ignoreversion +Source: "BitPay Wallet\win64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs Source: "../public/img/icons/favicon.ico"; DestDir: "{app}"; DestName: "icon.ico"; Flags: ignoreversion ; NOTE: Don't use "Flags: ignoreversion" on any shared system files @@ -50,8 +50,8 @@ Root: HKCR; Subkey: "bitcoin"; ValueType: "string"; ValueName: "URL Protocol"; V Root: HKCR; Subkey: "bitcoin\DefaultIcon"; ValueType: "string"; ValueData: "{app}\{#MyAppExeName},0" Root: HKCR; Subkey: "bitcoin\shell\open\command"; ValueType: "string"; ValueData: """{app}\{#MyAppExeName}"" ""%1""" -Root: HKCR; Subkey: "bitpay"; ValueType: "string"; ValueData: "URL:BitPay Custom Protocol"; Flags: uninsdeletekey -Root: HKCR; Subkey: "bitpay"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: "" -Root: HKCR; Subkey: "bitpay\DefaultIcon"; ValueType: "string"; ValueData: "{app}\{#MyAppExeName},0" -Root: HKCR; Subkey: "bitpay\shell\open\command"; ValueType: "string"; ValueData: """{app}\{#MyAppExeName}"" ""%1""" +Root: HKCR; Subkey: "wallet"; ValueType: "string"; ValueData: "URL:BitPay Wallet Custom Protocol"; Flags: uninsdeletekey +Root: HKCR; Subkey: "wallet"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: "" +Root: HKCR; Subkey: "wallet\DefaultIcon"; ValueType: "string"; ValueData: "{app}\{#MyAppExeName},0" +Root: HKCR; Subkey: "wallet\shell\open\command"; ValueType: "string"; ValueData: """{app}\{#MyAppExeName}"" ""%1""" From ceac7c2c2bce1e1ea4bca67a8d172b864a09ce5e Mon Sep 17 00:00:00 2001 From: Jason Dreyzehner Date: Fri, 30 Sep 2016 21:28:25 -0400 Subject: [PATCH 3/4] design(home): new icons and design improvements for the home tab --- public/img/icon-card.svg | 15 ++ public/img/icon-wallet.svg | 38 +--- public/views/tab-home.html | 6 +- src/sass/ionic.scss | 22 ++- src/sass/main.scss | 358 +---------------------------------- src/sass/views/tab-home.scss | 8 +- 6 files changed, 48 insertions(+), 399 deletions(-) create mode 100644 public/img/icon-card.svg diff --git a/public/img/icon-card.svg b/public/img/icon-card.svg new file mode 100644 index 000000000..873f912f6 --- /dev/null +++ b/public/img/icon-card.svg @@ -0,0 +1,15 @@ + + + + + + + + + + diff --git a/public/img/icon-wallet.svg b/public/img/icon-wallet.svg index 9cbcfb85f..a1d7c73eb 100644 --- a/public/img/icon-wallet.svg +++ b/public/img/icon-wallet.svg @@ -1,28 +1,10 @@ - - - - Wallet Copy - Created with Sketch. - - - - - - - - - - - - - - - - - - - - - - - + + + + + + diff --git a/public/views/tab-home.html b/public/views/tab-home.html index 7ef233580..e2de16373 100644 --- a/public/views/tab-home.html +++ b/public/views/tab-home.html @@ -135,7 +135,7 @@
- Add BitPay Card + Add BitPay Visa® Card @@ -155,9 +155,5 @@ -

-{{name}} v{{version}} -

- diff --git a/src/sass/ionic.scss b/src/sass/ionic.scss index bad6f9c09..0244562b7 100644 --- a/src/sass/ionic.scss +++ b/src/sass/ionic.scss @@ -1,12 +1,22 @@ -/* Set ionic variables */ -$font-family-sans-serif: "Roboto", sans-serif; -$font-family-light-sans-serif: "Roboto-Light", sans-serif-light; +/* constants */ $royal: #1e3186; -$soft-blue: rgb(100,124,232); -$base-background-color: #f5f5f5; +$soft-blue: #647ce8; +$subtle-gray: #f5f5f5; +$roboto: "Roboto", sans-serif; +$roboto-light: "Roboto-Light", sans-serif-light; -/* Ionic Workaround */ +/* Set ionic variables */ +$font-family-sans-serif: $roboto; +$font-family-light-sans-serif: $roboto-light; +$base-background-color: $subtle-gray; +$item-default-active-bg: $subtle-gray; +$ios-transition-duration: 200ms; + +/* Ionic Workarounds */ +// Please include a description of the problem solved by the workaround. + +// class to dynamically hide the ion-nav-bar for v1 Amazon flow ion-nav-bar.hide { display: block !important; } diff --git a/src/sass/main.scss b/src/sass/main.scss index c2cb10722..013e1293e 100644 --- a/src/sass/main.scss +++ b/src/sass/main.scss @@ -438,363 +438,6 @@ ul.wallet-selection.wallets { } // General purpose -.dn { - display: none; -} - -.dni { - display: none !important; -} - -.pr { - position: relative; -} - -.pa { - position: absolute; -} - -.m0 { - margin: 0; -} - -.p0i { - padding: 0 !important; -} - -.db { - display: block; -} - -.dib { - display: inline-block; -} - -.size-10 { - font-size: 10px; -} - -.size-12 { - font-size: 12px; -} - -.size-14 { - font-size: 14px; -} - -.size-16 { - font-size: 16px; -} - -.size-18 { - font-size: 18px; -} - -.size-21 { - font-size: 21px; -} - -.size-24 { - font-size: 24px; -} - -.size-28 { - font-size: 28px; -} - -.size-32 { - font-size: 32px; -} - -.size-36 { - font-size: 36px; -} - -.size-42 { - font-size: 42px; -} - -.size-48 { - font-size: 48px; -} - -.size-60 { - font-size: 60px; -} - -.size-72 { - font-size: 72px; -} - -.m5 { - margin: 5px; -} - -.m5t { - margin-top: 5px; -} - -.m8t { - margin-top: 8px; -} - -.m5b { - margin-bottom: 5px; -} - -.m5r { - margin-right: 5px; -} - -.m10 { - margin: 10px; -} - -.m10b { - margin-bottom: 10px; -} - -.m3t { - margin-top: 3px; -} - -.m10t { - margin-top: 10px; -} - -.m15b { - margin-bottom: 15px; -} - -.m15r { - margin-right: 15px; -} - -.m20b { - margin-bottom: 20px; -} - -.m30b { - margin-bottom: 30px; -} - -.m40b { - margin-bottom: 40px; -} - -.m50b { - margin-bottom: 50px; -} - -.m10r { - margin-right: 10px; -} - -.m40r { - margin-right: 40px; -} - -.m55r { - margin-right: 55px; -} - -.m25r { - margin-right: 25px; -} - -.m10l { - margin-left: 10px; -} - -.m5l { - margin-left: 5px; -} - -.m15l { - margin-left: 15px; -} - -.m15t { - margin-top: 15px; -} - -.m20r { - margin-right: 20px; -} - -.m20t { - margin-top: 20px; -} - -.m20ti { - margin-top: 20px !important; -} - -.m20tp { - margin-top: 20%; -} - -.m30tp { - margin-top: 30%; -} - -.m15 { - margin: 15px; -} - -.m15h { - margin: 0 15px; -} - -.p10t { - padding-top: 10px; -} - -.p10h { - padding-right: 10px; - padding-left: 10px; -} - -.p15h { - padding: 0 15px; -} - -.p0r { - padding-right: 0; -} - -.p70r { - padding-right: 70px; -} - -.p70l { - padding-left: 70px; -} - -.p5h { - padding: 0 5px; -} - -.p20h { - padding: 0 20px; -} - -.p20v { - padding: 20px 0; -} - -.p20b { - padding-bottom: 20px; -} - -.p25b { - padding-bottom: 25px; -} - -.p25l { - padding-left: 25px; -} - -.p15l { - padding-left: 15px; -} - -.p15 { - padding: 15px; -} - -.p20 { - padding: 20px; -} - -.p15t { - padding-top: 15px; -} - -.p20t { - padding-top: 20px; -} - -.p50t { - padding-top: 50px; -} - -.p10 { - padding: 10px; -} - -.p10i { - padding: 10px !important; -} - -.p10b { - padding-bottom: 10px; -} - -.p45t { - padding-top: 45px; -} - -.p60t { - padding-top: 60px; -} - -.p60b { - padding-bottom: 60px; -} - -.m60t { - margin-top: 60px; -} - -.p45li { - padding-left: 45px !important; -} - -.m30v { - margin: 30px 0; -} - -.m15v { - margin: 15px 0; -} - -.m10h { - margin: 0 10px; -} - -.m10v { - margin: 10px 0; -} - -.m20v { - margin: 20px 0; -} - -.m30v { - margin: 30px 0; -} - -.m30a { - margin: 30px auto; -} - -.m-negative-l { - margin-left: -0.9375rem; -} - -.br100 { - border-radius: 100% !important; -} - -.lh { - line-height: 0; -} - -.lh140 { - line-height: 140%; -} - .oh { overflow: hidden; } @@ -993,6 +636,7 @@ input[type=number] { @import "views/confirm"; @import "views/tab-home"; @import "views/tab-receive"; +@import "views/tab-scan"; @import "views/tab-send"; @import "views/tab-settings"; @import "views/walletDetails"; diff --git a/src/sass/views/tab-home.scss b/src/sass/views/tab-home.scss index 4ce59566b..05f5ff2d6 100644 --- a/src/sass/views/tab-home.scss +++ b/src/sass/views/tab-home.scss @@ -1,12 +1,14 @@ #tab-home { .icon-create-wallet { - background-image: url("../img/icon-bitcoin.svg"); + background-image: url("../img/icon-wallet.svg"); + background-color: #4A90E2; // default wallet color } .icon-buy-bitcoin { - background-image: url("../img/icon-gift.svg"); + background-image: url("../img/icon-bitcoin.svg"); } .icon-bitpay-card { - background-image: url("../img/icon-bitpay.svg"); + background-image: url("../img/icon-card.svg"); + background-color: #1e3186; } .icon-gift { background-image: url("../img/icon-gift.svg"); From f901c95f679f982c7cebc38b4d58a014b68db4d2 Mon Sep 17 00:00:00 2001 From: Jason Dreyzehner Date: Fri, 30 Sep 2016 21:35:23 -0400 Subject: [PATCH 4/4] feat(scan): create Scan tab and scannerService, implement QRScanner and controls --- public/img/bitpay-wallet-qr-scan-guides.svg | 37 ++++ public/img/icon-camera-toggle.svg | 16 ++ public/img/icon-flash.svg | 9 + public/img/tab-icons/ico-scan-selected.svg | 4 +- public/views/tab-scan.html | 22 +++ public/views/tab-send.html | 2 +- public/views/tabs.html | 15 +- src/js/controllers/tab-scan.js | 45 +++++ src/js/controllers/tab-send.js | 6 - src/js/routes.js | 13 +- src/js/services/scannerService.js | 188 ++++++++++++++++++++ src/sass/ionic.scss | 5 + src/sass/views/tab-scan.scss | 54 ++++++ 13 files changed, 393 insertions(+), 23 deletions(-) create mode 100644 public/img/bitpay-wallet-qr-scan-guides.svg create mode 100644 public/img/icon-camera-toggle.svg create mode 100644 public/img/icon-flash.svg create mode 100644 public/views/tab-scan.html create mode 100644 src/js/controllers/tab-scan.js create mode 100644 src/js/services/scannerService.js create mode 100644 src/sass/views/tab-scan.scss diff --git a/public/img/bitpay-wallet-qr-scan-guides.svg b/public/img/bitpay-wallet-qr-scan-guides.svg new file mode 100644 index 000000000..07a700688 --- /dev/null +++ b/public/img/bitpay-wallet-qr-scan-guides.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/img/icon-camera-toggle.svg b/public/img/icon-camera-toggle.svg new file mode 100644 index 000000000..1e1f06503 --- /dev/null +++ b/public/img/icon-camera-toggle.svg @@ -0,0 +1,16 @@ + + + + + + + + + + diff --git a/public/img/icon-flash.svg b/public/img/icon-flash.svg new file mode 100644 index 000000000..72c726a69 --- /dev/null +++ b/public/img/icon-flash.svg @@ -0,0 +1,9 @@ + + + + + + diff --git a/public/img/tab-icons/ico-scan-selected.svg b/public/img/tab-icons/ico-scan-selected.svg index 4738582d9..06a118a83 100644 --- a/public/img/tab-icons/ico-scan-selected.svg +++ b/public/img/tab-icons/ico-scan-selected.svg @@ -5,7 +5,7 @@ Created with Sketch. - + @@ -17,4 +17,4 @@ - \ No newline at end of file + diff --git a/public/views/tab-scan.html b/public/views/tab-scan.html new file mode 100644 index 000000000..27c9cb9c5 --- /dev/null +++ b/public/views/tab-scan.html @@ -0,0 +1,22 @@ + + + {{'Scan' | translate}} + + +
+ +
+
+ + diff --git a/public/views/tab-send.html b/public/views/tab-send.html index 3ab5f5f6a..963c7e094 100644 --- a/public/views/tab-send.html +++ b/public/views/tab-send.html @@ -8,7 +8,7 @@