Merge pull request #235 from bitjson/feature/new-qrscanner
Feature: New QRScanner
|
|
@ -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'
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -28,10 +28,63 @@
|
|||
<preference name="windows-target-version" value="8.1"/>
|
||||
<preference name="Orientation" value="default" />
|
||||
|
||||
<!-- Supported Platforms -->
|
||||
<!-- <engine name="ios" spec="~4.2.1" />
|
||||
<engine name="android" spec="~5.2.2" />
|
||||
<engine name="wp8" spec="~3.8.2" /> -->
|
||||
|
||||
<!-- Plugins -->
|
||||
<plugin name="cordova-plugin-globalization" spec="~1.0.4" />
|
||||
<plugin name="cordova.plugins.diagnostic" spec="~3.2.1" />
|
||||
<plugin name="cordova-plugin-splashscreen" spec="~4.0.0" />
|
||||
<plugin name="cordova-plugin-statusbar" spec="~2.2.0" />
|
||||
<plugin name="cordova-plugin-inappbrowser" spec="~1.5.0" />
|
||||
<plugin name="cordova-plugin-x-toast" spec="~2.5.2" />
|
||||
<plugin name="com.verso.cordova.clipboard" spec="https://github.com/VersoSolutions/CordovaClipboard" />
|
||||
<plugin name="cordova-plugin-x-socialsharing" spec="https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git" />
|
||||
<plugin name="cordova-plugin-spinner-dialog" spec="~1.3.1" />
|
||||
<plugin name="cordova-plugin-dialogs" spec="~1.3.0" />
|
||||
<plugin name="cordova-plugin-network-information" spec="~1.3.0" />
|
||||
<plugin name="cordova-plugin-console" spec="~1.0.4" />
|
||||
<plugin name="cordova-plugin-uniquedeviceid" spec="~1.3.2" />
|
||||
<plugin name="cordova-plugin-file" spec="~4.3.0" />
|
||||
<plugin name="cordova-plugin-touch-id" spec="~3.2.0" />
|
||||
<plugin name="cordova-plugin-transport-security" spec="~0.1.2" />
|
||||
<plugin name="cordova-ios-requires-fullscreen" spec="~0.0.2" />
|
||||
<plugin name="cordova-plugin-disable-bitcode" spec="~1.3.2" />
|
||||
<plugin name="cordova-plugin-android-fingerprint-auth" spec="~0.2.0" />
|
||||
<plugin name="cordova-plugin-screen-orientation" spec="~1.4.2" />
|
||||
<plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
|
||||
<plugin name="cordova-plugin-whitelist" spec="~1.3.0" />
|
||||
<plugin name="cordova-plugin-wkwebview-engine" spec="https://github.com/driftyco/cordova-plugin-wkwebview-engine.git" />
|
||||
<plugin name="cordova-plugin-qrscanner" spec="~2.3.3" />
|
||||
<platform name="wp8">
|
||||
<plugin name="phonegap-plugin-barcodescanner" spec="https://github.com/jrontend/phonegap-plugin-barcodescanner" />
|
||||
</platform>
|
||||
<platform name="android">
|
||||
<plugin name="phonegap-plugin-barcodescanner" spec="https://github.com/jrontend/phonegap-plugin-barcodescanner" />
|
||||
<plugin name="phonegap-plugin-push" spec="~1.8.2" />
|
||||
</platform>
|
||||
<platform name="ios">
|
||||
<plugin name="cordova-plugin-cszbar" spec="https://github.com/tjwoon/csZBar.git" />
|
||||
<plugin name="phonegap-plugin-push" spec="~1.5.3" />
|
||||
</platform>
|
||||
|
||||
<!-- Hooks -->
|
||||
|
||||
<platform name="android">
|
||||
<hook type="after_run" src="scripts/afterRun.js" />
|
||||
</platform>
|
||||
|
||||
<platform name="ios">
|
||||
<hook type="before_build" src="../../node_modules/cordova-plugin-qrscanner/scripts/swift-support.js" />
|
||||
<config-file target="*-Info.plist" parent="NSCameraUsageDescription">
|
||||
<string>The camera is used to read QR codes.</string>
|
||||
</config-file>
|
||||
</platform>
|
||||
|
||||
<!-- Assets -->
|
||||
|
||||
<platform name="ios">
|
||||
<!-- iOS 8.0+ -->
|
||||
<!-- iPad Pro -->
|
||||
|
|
|
|||
|
|
@ -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,37 +69,35 @@
|
|||
"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": {
|
||||
"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": {
|
||||
"trash-cli": "^1.4.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
51
package.json
|
|
@ -1,22 +1,22 @@
|
|||
|
||||
{
|
||||
{
|
||||
"//":"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",
|
||||
"bitpay",
|
||||
"copay",
|
||||
"multisignature",
|
||||
"bitcoin",
|
||||
"bitcore"
|
||||
],
|
||||
"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,
|
||||
|
|
@ -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,37 +72,34 @@
|
|||
"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": {
|
||||
"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": {
|
||||
"trash-cli": "^1.4.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
37
public/img/bitpay-wallet-qr-scan-guides.svg
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 20.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="QR-scanner-guides" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
||||
y="0px" viewBox="0 0 271 236" style="enable-background:new 0 0 271 236;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{filter:url(#filter-2);}
|
||||
.st1{fill:none;stroke:#647CE8;stroke-width:2;}
|
||||
.st2{fill:#FFFFFF;fill-opacity:0.3;}
|
||||
</style>
|
||||
<filter filterUnits="objectBoundingBox" height="200%" id="filter-2" width="200%" x="-50%" y="-50%">
|
||||
<feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"></feMorphology>
|
||||
<feOffset dx="0" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
|
||||
<feMorphology in="SourceAlpha" operator="erode" radius="1" result="shadowInner"></feMorphology>
|
||||
<feOffset dx="0" dy="0" in="shadowInner" result="shadowInner"></feOffset>
|
||||
<feComposite in="shadowOffsetOuter1" in2="shadowInner" operator="out" result="shadowOffsetOuter1"></feComposite>
|
||||
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="6"></feGaussianBlur>
|
||||
|
||||
<feColorMatrix in="shadowBlurOuter1" type="matrix" values="0 0 0 0 0.392156863 0 0 0 0 0.48627451 0 0 0 0 0.909803922 0 0 0 1 0">
|
||||
</feColorMatrix>
|
||||
</filter>
|
||||
<g id="scan-line">
|
||||
<g class="st0">
|
||||
<line x1="11" y1="111" x2="260" y2="111"/>
|
||||
</g>
|
||||
<g>
|
||||
<path id="line" class="st1" d="M11,111h249"/>
|
||||
</g>
|
||||
</g>
|
||||
<path id="top-left" class="st2" d="M28,10h53.1c2.8,0,5-2.2,5-5s-2.2-5-5-5H23c-2.8,0-5,2.2-5,5v58c0,2.8,2.2,5,5,5s5-2.2,5-5V10z"
|
||||
/>
|
||||
<path id="bottom-left" class="st2" d="M28,224.7v-53.1c0-2.8-2.2-5-5-5s-5,2.2-5,5v58.1c0,2.8,2.2,5,5,5h58c2.8,0,5-2.2,5-5
|
||||
c0-2.8-2.2-5-5-5H28z"/>
|
||||
<path id="top-right" class="st2" d="M244,10v53.1c0,2.8,2.2,5,5,5s5-2.2,5-5V5c0-2.8-2.2-5-5-5h-58c-2.8,0-5,2.2-5,5s2.2,5,5,5H244z
|
||||
"/>
|
||||
<path id="bottom-right" class="st2" d="M244.1,225.6H191c-2.8,0-5,2.2-5,5c0,2.8,2.2,5,5,5h58.1c2.8,0,5-2.2,5-5v-58
|
||||
c0-2.8-2.2-5-5-5s-5,2.2-5,5V225.6z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2 KiB |
16
public/img/icon-camera-toggle.svg
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 20.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="camera-toggle" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
|
||||
y="0px" viewBox="0 0 40 40" style="enable-background:new 0 0 40 40;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{opacity:0.8;fill:none;stroke:#FFFFFF;}
|
||||
.st1{opacity:0.386;fill:#FFFFFF;enable-background:new ;}
|
||||
</style>
|
||||
<path id="top-arrow-line" class="st0" d="M10.5,18.1c0-4.7,4.3-8.5,9.5-8.5c3.7,0,6.9,1.9,8.5,4.7"/>
|
||||
<path id="bottom-arrow-line" class="st0" d="M29.5,21c0,4.7-4.3,8.5-9.5,8.5c-3.7,0-6.9-1.9-8.5-4.7"/>
|
||||
<polyline id="top-arrow-head" class="st0" points="28.9,11.1 28.4,14.1 25,13.7 "/>
|
||||
<polyline id="bottom-arrow-head" class="st0" points="11,27.8 11.4,24.8 14.8,25.2 "/>
|
||||
<path id="camera" class="st1" d="M24.6,21.9c0,0.8-0.7,1.5-1.5,1.5H17c-0.8,0-1.5-0.7-1.5-1.5v-3.5c0-0.8,0.7-1.5,1.5-1.5h1l0.8-1.1
|
||||
h2.5l0.8,1.1h1c0.8,0,1.5,0.7,1.5,1.5V21.9z M20.1,21.9c1.1,0,2.1-0.8,2.1-1.9s-0.9-1.9-2.1-1.9C18.9,18.1,18,19,18,20
|
||||
S18.9,21.9,20.1,21.9z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
15
public/img/icon-card.svg
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 20.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Card" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 40 40" style="enable-background:new 0 0 40 40;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:none;stroke:#647CE8;}
|
||||
.st1{fill:none;stroke:#B2C1F7;}
|
||||
</style>
|
||||
<path id="card" class="st0" d="M11.6,28C10.2,28,9,26.8,9,25.5V14.5c0-1.4,1.2-2.5,2.6-2.5h16.5c1.5,0,2.6,1.1,2.6,2.5v10.9
|
||||
C30.6,26.8,29.5,28,28,28H11.6z"/>
|
||||
<path id="stripe-bottom" class="st0" d="M9,18.1h22"/>
|
||||
<path id="stripe-top" class="st0" d="M9,15.6h22"/>
|
||||
<path id="bottom-line" class="st1" d="M11.3,23.8h4.3"/>
|
||||
<path id="top-line" class="st1" d="M11.3,21.3h8.4"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 818 B |
9
public/img/icon-flash.svg
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 20.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Flash_1_" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 40 40" style="enable-background:new 0 0 40 40;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{opacity:0.8;fill:#FFFFFF;enable-background:new ;}
|
||||
</style>
|
||||
<polygon id="bolt" class="st0" points="15,21.4 19.6,21.4 18,30 25,18.6 20.4,18.6 22,10 "/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 536 B |
|
|
@ -1,28 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="44px" height="38px" viewBox="0 0 44 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 39.1 (31720) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>Wallet Copy</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs>
|
||||
<path d="M12.2206319,33.5295725 C12.2206319,35.1887012 13.5540503,36.5336907 15.221911,36.5336908 L35.3827914,36.5336913 C37.040352,36.5336913 38.3840705,35.1979548 38.3840705,33.529573 L38.3840709,19.5110705 L12.2206319,19.5110706 L12.2206319,33.5295725 Z M31.7761235,19.4691743 L31.776124,16.3165791 L12.2255864,16.3165791 C12.2255864,16.3165791 12.2255864,19.5085877 12.2255864,19.5085877 L31.7761235,19.4691743 Z M33.423217,30.9126651 C34.3328814,30.9126651 35.07031,30.1815053 35.07031,29.279574 C35.07031,28.3776426 34.3328814,27.6464828 33.423217,27.6464828 C32.5135527,27.6464828 31.776124,28.3776426 31.776124,29.279574 C31.776124,30.1815053 32.5135527,30.9126651 33.423217,30.9126651 Z" id="path-1"></path>
|
||||
<filter x="-50%" y="-50%" width="200%" height="200%" filterUnits="objectBoundingBox" id="filter-2">
|
||||
<feMorphology radius="0.5" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
|
||||
<feOffset dx="0" dy="2" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
|
||||
<feMorphology radius="1" operator="erode" in="SourceAlpha" result="shadowInner"></feMorphology>
|
||||
<feOffset dx="0" dy="2" in="shadowInner" result="shadowInner"></feOffset>
|
||||
<feComposite in="shadowOffsetOuter1" in2="shadowInner" operator="out" result="shadowOffsetOuter1"></feComposite>
|
||||
<feGaussianBlur stdDeviation="4" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
||||
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.307518116 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
|
||||
</filter>
|
||||
</defs>
|
||||
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Wallet/Icon/Blue" transform="translate(-3.000000, -10.000000)">
|
||||
<g id="Oval-87-+-bitpay-logo-grayscale" transform="translate(0.000000, 1.000000)">
|
||||
<g id="Wallet-Copy">
|
||||
<use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
|
||||
<use stroke="#FFFFFF" stroke-width="1" xlink:href="#path-1"></use>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 20.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<svg version="1.1" id="Wallet" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 40 40" style="enable-background:new 0 0 40 40;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:none;stroke:#FFFFFF;}
|
||||
</style>
|
||||
<path id="Icon" class="st0" d="M9,25.6c0,1.3,1.1,2.4,2.5,2.4h17c1.4,0,2.5-1,2.5-2.4V14.5H9V25.6L9,25.6z M25.5,14.5V12H9v2.5H25.5
|
||||
z M26.9,23.5c0.7,0,1.4-0.6,1.4-1.3s-0.6-1.3-1.4-1.3s-1.4,0.6-1.4,1.3S26.1,23.5,26.9,23.5z"/>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 640 B |
|
|
@ -5,7 +5,7 @@
|
|||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round" opacity="0.9">
|
||||
<g id="Icons/Tabs/Scan/2" transform="translate(1.000000, -6.000000)" stroke-width="1.5" stroke="#FFFFFF">
|
||||
<g id="Icons/Tabs/Scan/2" transform="translate(1.000000, -6.000000)" stroke-width="1.5" stroke="#647CE8">
|
||||
<g id="scan" transform="translate(-1.000000, 6.000000)">
|
||||
<g id="Scan">
|
||||
<path d="M10.4803945,1.62179474 L6.04824505,1.62179474 M5.74546723,1.62179474 L5.74546723,5.91363686" id="Line-Copy-2" stroke-linejoin="round"></path>
|
||||
|
|
@ -17,4 +17,4 @@
|
|||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</svg>
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
|
|
@ -134,7 +134,7 @@
|
|||
<i class="icon big-icon-svg">
|
||||
<div class="bg icon-bitpay-card"></div>
|
||||
</i>
|
||||
<span translate>Add BitPay Card</span>
|
||||
<span translate>Add BitPay Visa® Card</span>
|
||||
<i class="icon nav-item-arrow-right"></i>
|
||||
</a>
|
||||
<a ng-show="!externalServices.BuyAndSell && (coinbaseEnabled || glideraEnabled)" ui-sref="tabs.buyandsell" class="item item-icon-left item-big-icon-left item-icon-right next-step">
|
||||
|
|
@ -154,9 +154,5 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<p class="padding" style="text-align:center; color:#999">
|
||||
{{name}} v{{version}}
|
||||
</p>
|
||||
|
||||
</ion-content>
|
||||
</ion-view>
|
||||
|
|
|
|||
22
public/views/tab-scan.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<ion-view id="tab-scan">
|
||||
<ion-nav-bar class="bar-royal">
|
||||
<ion-nav-title>{{'Scan' | translate}}</ion-nav-title>
|
||||
</ion-nav-bar>
|
||||
<ion-content scroll="false">
|
||||
<div class="guides">
|
||||
<img class="qr-scan-guides" src="img/bitpay-wallet-qr-scan-guides.svg">
|
||||
</div>
|
||||
<div class="scanner-controls">
|
||||
<a ng-click="toggleLight()" ng-show="canEnableLight">
|
||||
<i class="icon">
|
||||
<div class="icon-flash" ng-class="{'active': lightActive}"></div>
|
||||
</i>
|
||||
</a>
|
||||
<a ng-click="toggleCamera()" ng-show="canChangeCamera">
|
||||
<i class="icon">
|
||||
<div class="icon-camera-toggle" ng-class="{'active': cameraToggleActive}"></div>
|
||||
</i>
|
||||
</a>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-view>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
<label class="item item-input bitcoin-address">
|
||||
<i class="icon ion-social-bitcoin placeholder-icon"></i>
|
||||
<div class="qr-scan-icon" ng-style="{'width': '100%'}">
|
||||
<qr-scanner class="qr-icon size-24" ng-style="{'top': '3px'}" on-scan="onQrCodeScanned(data)"></qr-scanner>
|
||||
<a ui-sref="tabs.scan" ng-style="{'top': '6px'}"><i class="icon ion-qr-scanner"></i></a>
|
||||
<input type="text"
|
||||
placeholder="{{'Search or enter bitcoin address' | translate}}"
|
||||
ng-model="formData.search"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,4 @@
|
|||
<!--
|
||||
Create tabs with an icon and label, using the tabs-positive style.
|
||||
Each tab's child <ion-nav-view> directive will have its own
|
||||
navigation history that also transitions its views in and out.
|
||||
-->
|
||||
<ion-tabs class="tabs-icon-top tabs-color-active-positive" ng-class="{'tabs-item-hide': hideTabs}">
|
||||
<ion-tabs class="tabs-icon-top tabs-color-active-positive ion-tabs-transparent" ng-class="{'tabs-item-hide': hideTabs}">
|
||||
|
||||
<ion-tab title="Home" icon-off="ico-home" icon-on="ico-home-selected" ui-sref="tabs.home">
|
||||
<ion-nav-view name="tab-home"></ion-nav-view>
|
||||
|
|
@ -13,12 +8,8 @@ navigation history that also transitions its views in and out.
|
|||
<ion-nav-view name="tab-receive"></ion-nav-view>
|
||||
</ion-tab>
|
||||
|
||||
|
||||
<!-- this actually NEVER gets rendered -->
|
||||
<qr-scanner class="qr-icon size-24" style="display:none" set-fn="setScanFn(theScanFn)" on-scan="onScan(data)"></qr-scanner>
|
||||
|
||||
|
||||
<ion-tab title="Scan" icon-off="ico-scan" ng-click="scan()" >
|
||||
<ion-tab title="Scan" icon-off="ico-scan" icon-on="ico-scan-selected" ui-sref="tabs.scan">
|
||||
<ion-nav-view name="tab-scan"></ion-nav-view>
|
||||
</ion-tab>
|
||||
|
||||
<ion-tab title="Send" icon-off="ico-send" icon-on="ico-send-selected" ui-sref="tabs.send">
|
||||
|
|
|
|||
45
src/js/controllers/tab-scan.js
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('tabScanController', function($scope, $log, $timeout, scannerService, incomingData) {
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function() {
|
||||
$log.debug('Preparing to display available controls.');
|
||||
var capabilities = scannerService.getCapabilities();
|
||||
$scope.canEnableLight = capabilities.canEnableLight;
|
||||
$scope.canChangeCamera = capabilities.canChangeCamera;
|
||||
});
|
||||
|
||||
$scope.$on("$ionicView.afterEnter", function() {
|
||||
scannerService.activate(function(){
|
||||
scannerService.scan(function(err, contents){
|
||||
if(err){
|
||||
$log.debug('Scan canceled.');
|
||||
} else {
|
||||
incomingData.redir(contents);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
$scope.$on("$ionicView.afterLeave", function() {
|
||||
scannerService.deactivate();
|
||||
});
|
||||
|
||||
$scope.toggleLight = function(){
|
||||
scannerService.toggleLight(function(lightEnabled){
|
||||
$scope.lightActive = lightEnabled;
|
||||
$scope.$apply();
|
||||
});
|
||||
};
|
||||
|
||||
$scope.toggleCamera = function(){
|
||||
$scope.cameraToggleActive = true;
|
||||
scannerService.toggleCamera(function(status){
|
||||
// (a short delay for the user to see the visual feedback)
|
||||
$timeout(function(){
|
||||
$scope.cameraToggleActive = false;
|
||||
$log.debug('Camera toggle control deactivated.');
|
||||
}, 200);
|
||||
});
|
||||
};
|
||||
|
||||
});
|
||||
|
|
@ -101,12 +101,6 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
|
|||
});
|
||||
};
|
||||
|
||||
$scope.onQrCodeScanned = function(data) {
|
||||
if (!incomingData.redir(data)) {
|
||||
popupService.showAlert(null, gettextCatalog.getString('Invalid data'));
|
||||
}
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.formData = {
|
||||
search: null
|
||||
|
|
|
|||
|
|
@ -208,6 +208,15 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
}
|
||||
}
|
||||
})
|
||||
.state('tabs.scan', {
|
||||
url: '/scan',
|
||||
views: {
|
||||
'tab-scan': {
|
||||
controller: 'tabScanController',
|
||||
templateUrl: 'views/tab-scan.html',
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('tabs.send', {
|
||||
url: '/send',
|
||||
views: {
|
||||
|
|
@ -875,7 +884,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
}
|
||||
});
|
||||
})
|
||||
.run(function($rootScope, $state, $location, $log, $timeout, $ionicHistory, $ionicPlatform, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService) {
|
||||
.run(function($rootScope, $state, $location, $log, $timeout, $ionicHistory, $ionicPlatform, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService, storageService, scannerService) {
|
||||
|
||||
uxLanguage.init();
|
||||
openURLService.init();
|
||||
|
|
@ -982,7 +991,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
} else {
|
||||
profileService.storeProfileIfDirty();
|
||||
$log.debug('Profile loaded ... Starting UX.');
|
||||
|
||||
scannerService.gentleInitialize();
|
||||
$state.go('tabs.home');
|
||||
}
|
||||
});
|
||||
|
|
|
|||
188
src/js/services/scannerService.js
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.services').service('scannerService', function($log, $timeout, platformInfo) {
|
||||
|
||||
var isDesktop = !platformInfo.isCordova;
|
||||
var QRScanner = window.QRScanner;
|
||||
var lightEnabled = false;
|
||||
var backCamera = true; // the plugin defaults to the back camera
|
||||
|
||||
// Initalize known capabilities
|
||||
var hasPermission = isDesktop? true: false;
|
||||
var canEnableLight = false;
|
||||
var canChangeCamera = false;
|
||||
|
||||
function _checkCapabilities(status){
|
||||
$log.debug('scannerService is reviewing platform capabilities...');
|
||||
// Permission can be assumed on the desktop builds
|
||||
hasPermission = (isDesktop || status.authorized)? true: false;
|
||||
canEnableLight = status.canEnableLight? true : false;
|
||||
canChangeCamera = status.canChangeCamera? true : false;
|
||||
function orIsNot(bool){
|
||||
return bool? '' : 'not ';
|
||||
}
|
||||
$log.debug('A light is ' + orIsNot(canEnableLight) + 'available on this platform.');
|
||||
$log.debug('A second camera is ' + orIsNot(canChangeCamera) + 'available on this platform.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Immediately return known capabilities of the current platform.
|
||||
*/
|
||||
this.getCapabilities = function(){
|
||||
return {
|
||||
hasPermission: hasPermission,
|
||||
canEnableLight: canEnableLight,
|
||||
canChangeCamera: canChangeCamera
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* If camera access has been granted, pre-initialize the QRScanner. This method
|
||||
* can be safely called before the scanner is visible to improve perceived
|
||||
* scanner loading times.
|
||||
*
|
||||
* The `status` of QRScanner is returned to the callback.
|
||||
*/
|
||||
this.gentleInitialize = function(callback) {
|
||||
$log.debug('Trying to pre-initialize QRScanner.');
|
||||
if(!isDesktop){
|
||||
QRScanner.getStatus(function(status){
|
||||
_checkCapabilities(status);
|
||||
if(status.authorized){
|
||||
$log.debug('Camera permission already granted.');
|
||||
_initalize();
|
||||
} else {
|
||||
$log.debug('QRScanner not authorized, waiting to initalize.');
|
||||
if(typeof callback === "function"){
|
||||
callback && callback(status);
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
$log.debug('Camera permission assumed on desktop.');
|
||||
_initalize();
|
||||
}
|
||||
function _initalize(){
|
||||
$log.debug('Preparing scanner...');
|
||||
QRScanner.prepare(function(err, status){
|
||||
if(err){
|
||||
$log.error(err);
|
||||
}
|
||||
_checkCapabilities(status);
|
||||
callback && callback(status);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
var nextHide = null;
|
||||
var nextDestroy = null;
|
||||
var hideAfterSeconds = 15;
|
||||
var destroyAfterSeconds = 5 * 60;
|
||||
|
||||
/**
|
||||
* (Re)activate the QRScanner, and cancel the timeouts if present.
|
||||
*
|
||||
* The `status` of QRScanner is passed to the callback when activation
|
||||
* is complete.
|
||||
*/
|
||||
this.activate = function(callback) {
|
||||
$log.debug('Activating scanner...');
|
||||
QRScanner.show(function(status){
|
||||
_checkCapabilities(status);
|
||||
callback(status);
|
||||
});
|
||||
if(nextHide !== null){
|
||||
$timeout.cancel(nextHide);
|
||||
nextHide = null;
|
||||
}
|
||||
if(nextDestroy !== null){
|
||||
$timeout.cancel(nextDestroy);
|
||||
nextDestroy = null;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Start a new scan.
|
||||
*
|
||||
* The callback receives: (err, contents)
|
||||
*/
|
||||
this.scan = function(callback) {
|
||||
$log.debug('Scanning...');
|
||||
QRScanner.scan(callback);
|
||||
};
|
||||
|
||||
/**
|
||||
* Deactivate the QRScanner. To balance user-perceived performance and power
|
||||
* consumption, this kicks off a countdown which will "sleep" the scanner
|
||||
* after a certain amount of time.
|
||||
*
|
||||
* The `status` of QRScanner is passed to the callback when deactivation
|
||||
* is complete.
|
||||
*/
|
||||
this.deactivate = function(callback) {
|
||||
$log.debug('Deactivating scanner...');
|
||||
QRScanner.cancelScan();
|
||||
nextHide = $timeout(_hide, hideAfterSeconds * 1000);
|
||||
nextDestroy = $timeout(_destroy, destroyAfterSeconds * 1000);
|
||||
};
|
||||
|
||||
// Natively hide the QRScanner's preview
|
||||
// On mobile platforms, this can reduce GPU/power usage
|
||||
// On desktop, this fully turns off the camera (and any associated privacy lights)
|
||||
function _hide(){
|
||||
$log.debug('Scanner not in use for ' + hideAfterSeconds + ' seconds, hiding...');
|
||||
QRScanner.hide();
|
||||
}
|
||||
|
||||
// Reduce QRScanner power/processing consumption by the maximum amount
|
||||
function _destroy(){
|
||||
$log.debug('Scanner not in use for ' + destroyAfterSeconds + ' seconds, destroying...');
|
||||
QRScanner.destroy();
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggle the device light (if available).
|
||||
*
|
||||
* The callback receives a boolean which is `true` if the light is enabled.
|
||||
*/
|
||||
this.toggleLight = function(callback) {
|
||||
$log.debug('Toggling light...');
|
||||
if(lightEnabled){
|
||||
QRScanner.disableLight(_handleResponse);
|
||||
} else {
|
||||
QRScanner.enableLight(_handleResponse);
|
||||
}
|
||||
function _handleResponse(err, status){
|
||||
if(err){
|
||||
$log.error(err);
|
||||
} else {
|
||||
lightEnabled = status.lightEnabled;
|
||||
var state = lightEnabled? 'enabled' : 'disabled';
|
||||
$log.debug('Light ' + state + '.');
|
||||
}
|
||||
callback(lightEnabled);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Switch cameras (if a second camera is available).
|
||||
*
|
||||
* The `status` of QRScanner is passed to the callback when activation
|
||||
* is complete.
|
||||
*/
|
||||
this.toggleCamera = function(callback) {
|
||||
var nextCamera = backCamera? 1 : 0;
|
||||
function cameraToString(index){
|
||||
return index === 1? 'front' : 'back'; // front = 1, back = 0
|
||||
};
|
||||
$log.debug('Toggling to the ' + cameraToString(nextCamera) + ' camera...');
|
||||
QRScanner.useCamera(nextCamera, function(err, status){
|
||||
if(err){
|
||||
$log.error(err);
|
||||
}
|
||||
backCamera = status.currentCamera === 1? false : true;
|
||||
$log.debug('Camera toggled. Now using the ' + cameraToString(backCamera) + ' camera.');
|
||||
callback(status);
|
||||
});
|
||||
};
|
||||
});
|
||||
|
|
@ -1,13 +1,28 @@
|
|||
/* 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; }
|
||||
|
||||
// the ion tabs element never needs it's own background (backgrounds are
|
||||
// rendered by the tabs), and the default background would cover the scanner
|
||||
ion-tabs.ion-tabs-transparent {
|
||||
background: none transparent;
|
||||
}
|
||||
|
||||
@import "../../bower_components/ionic/scss/ionic";
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -994,6 +637,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";
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
54
src/sass/views/tab-scan.scss
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
#tab-scan {
|
||||
// view background is transparent to show video preview
|
||||
background: none transparent;
|
||||
.scanner-controls {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
}
|
||||
.guides {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
.qr-scan-guides {
|
||||
width: 60%;
|
||||
max-width: 400px;
|
||||
margin-bottom: 8em;
|
||||
}
|
||||
.icon-flash, .icon-camera-toggle {
|
||||
border-radius: 50%;
|
||||
width: 4em;
|
||||
height: 4em;
|
||||
background-color: rgba(13, 13, 13, 0.79);
|
||||
background-repeat: no-repeat;
|
||||
background-clip: padding-box;
|
||||
background-size: 100%;
|
||||
display: inline-block;
|
||||
margin: 2em 1em;
|
||||
cursor: pointer;
|
||||
// hover for desktop only
|
||||
body:not(.platform-cordova) &:hover {
|
||||
background-color: rgba(31, 40, 78, 0.79);
|
||||
}
|
||||
&.active, &:active {
|
||||
background-color: rgba(100, 124, 232, 0.79);
|
||||
}
|
||||
}
|
||||
.icon-flash {
|
||||
background-image: url("../img/icon-flash.svg");
|
||||
}
|
||||
.icon-camera-toggle {
|
||||
background-image: url("../img/icon-camera-toggle.svg");
|
||||
}
|
||||
}
|
||||
|
||||
#cordova-plugin-qrscanner-still, #cordova-plugin-qrscanner-video-preview {
|
||||
background-color: #060d2d !important;
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"""
|
||||
|
||||
|
|
|
|||