26
Gruntfile.js
|
@ -25,19 +25,11 @@ module.exports = function(grunt) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
shell: {
|
exec: {
|
||||||
prod: {
|
prod: {
|
||||||
options: {
|
command: 'ls'
|
||||||
stdout: false,
|
|
||||||
stderr: false
|
|
||||||
},
|
|
||||||
command: 'node ./util/build.js'
|
|
||||||
},
|
},
|
||||||
dev: {
|
dev: {
|
||||||
options: {
|
|
||||||
stdout: true,
|
|
||||||
stderr: true
|
|
||||||
},
|
|
||||||
command: 'node ./util/build.js -d'
|
command: 'node ./util/build.js -d'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -242,25 +234,25 @@ module.exports = function(grunt) {
|
||||||
|
|
||||||
|
|
||||||
grunt.registerTask('default', [
|
grunt.registerTask('default', [
|
||||||
'shell:dev', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors'
|
'exec:dev', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors'
|
||||||
]);
|
]);
|
||||||
grunt.registerTask('mobile', [
|
grunt.registerTask('mobile', [
|
||||||
'shell:dev', 'nggettext_compile', 'concat', 'cssmin:mobile', 'cssmin:vendors'
|
'exec:dev', 'nggettext_compile', 'concat', 'cssmin:mobile', 'cssmin:vendors'
|
||||||
]);
|
]);
|
||||||
grunt.registerTask('dist', [
|
grunt.registerTask('dist', [
|
||||||
'shell:prod', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors', 'uglify', 'copy:dist'
|
'exec:prod', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors', 'uglify', 'copy:dist'
|
||||||
]);
|
]);
|
||||||
grunt.registerTask('dist-dbg', [
|
grunt.registerTask('dist-dbg', [
|
||||||
'shell:prod', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors', 'copy:dist'
|
'exec:prod', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors', 'copy:dist'
|
||||||
]);
|
]);
|
||||||
grunt.registerTask('dist-mobile', [
|
grunt.registerTask('dist-mobile', [
|
||||||
'shell:prod', 'nggettext_compile', 'concat', 'cssmin:mobile', 'cssmin:vendors', 'uglify', 'copy:dist'
|
'exec:prod', 'nggettext_compile', 'concat', 'cssmin:mobile', 'cssmin:vendors', 'uglify', 'copy:dist'
|
||||||
]);
|
]);
|
||||||
grunt.registerTask('dist-mobile-dbg', [
|
grunt.registerTask('dist-mobile-dbg', [
|
||||||
'shell:dev', 'nggettext_compile', 'concat', 'cssmin:mobile', 'cssmin:vendors', 'copy:dist'
|
'exec:dev', 'nggettext_compile', 'concat', 'cssmin:mobile', 'cssmin:vendors', 'copy:dist'
|
||||||
]);
|
]);
|
||||||
grunt.registerTask('prod', [
|
grunt.registerTask('prod', [
|
||||||
'shell:prod', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors', 'uglify'
|
'exec:prod', 'nggettext_compile', 'concat', 'cssmin:desktop', 'cssmin:vendors', 'uglify'
|
||||||
]);
|
]);
|
||||||
grunt.registerTask('translate', ['nggettext_extract']);
|
grunt.registerTask('translate', ['nggettext_extract']);
|
||||||
grunt.registerTask('docs', ['jsdoc']);
|
grunt.registerTask('docs', ['jsdoc']);
|
||||||
|
|
42
Makefile
|
@ -1,29 +1,31 @@
|
||||||
|
VERSION=`cut -d '"' -f2 $BUILDDIR/../version.js`
|
||||||
|
|
||||||
sign:
|
sign:
|
||||||
gpg -u 1112CFA1 --output browser-extensions/chrome/copay-chrome-extension.zip.sig --detach-sig browser-extensions/chrome/copay-chrome-extension.zip
|
gpg -u 1112CFA1 --output browser-extensions/chrome/copay-chrome-extension.zip.sig --detach-sig browser-extensions/chrome/copay-chrome-extension.zip
|
||||||
verify:
|
verify:
|
||||||
gpg --verify browser-extensions/chrome/copay-chrome-extension.zip.sig browser-extensions/chrome/copay-chrome-extension.zip
|
gpg --verify browser-extensions/chrome/copay-chrome-extension.zip.sig browser-extensions/chrome/copay-chrome-extension.zip
|
||||||
|
|
||||||
ios:
|
|
||||||
cordova/build.sh
|
|
||||||
cd cordova/project && cordova build ios
|
|
||||||
open cordova/project/platforms/ios/Copay.xcodeproj
|
|
||||||
|
|
||||||
ios-debug:
|
|
||||||
cordova/build.sh --dbgjs
|
|
||||||
cd cordova/project && cordova build ios
|
|
||||||
open cordova/project/platforms/ios/Copay.xcodeproj
|
|
||||||
|
|
||||||
android:
|
|
||||||
cordova/build.sh --android --dbgjs
|
|
||||||
cd cordova/project && cordova run android
|
|
||||||
|
|
||||||
android-prod:
|
|
||||||
cordova/build.sh --release
|
|
||||||
cd cordova/project && cordova build android --release
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
chrome:
|
chrome:
|
||||||
grunt prod
|
grunt prod
|
||||||
browser-extensions/chrome/build.sh
|
browser-extensions/chrome/build.sh
|
||||||
|
|
||||||
|
|
||||||
|
cordova-base:
|
||||||
|
grunt dist-mobile
|
||||||
|
|
||||||
|
ios: cordova-base
|
||||||
|
make -C cordova ios
|
||||||
|
open cordova/project/platforms/ios/Copay
|
||||||
|
|
||||||
|
android: cordova-base
|
||||||
|
make -C cordova run-android
|
||||||
|
|
||||||
|
release-android: cordova-base
|
||||||
|
make -C cordova release-android
|
||||||
|
|
||||||
|
wp8:
|
||||||
|
cordova/build.sh WP8
|
||||||
|
cordova/wp/fix-svg.sh
|
||||||
|
echo -e "\a"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
.PHONY: plugins android wp8 ios clean
|
||||||
|
|
||||||
|
all:
|
||||||
|
|
||||||
|
# grunt dist-mobile-dbg
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
make -C project plugins
|
||||||
|
|
||||||
|
project:
|
||||||
|
cordova create project com.bitpay.copay Copay
|
||||||
|
cp config.xml project/config.xml
|
||||||
|
cp ProjectMakefile project/Makefile
|
||||||
|
cp -af ../dist/web/** project/www
|
||||||
|
sed "s/<\!-- PLACEHOLDER: CORDOVA SRIPT -->/<script type='text\/javascript' charset='utf-8' src='cordova.js'><\/script>/g" ../index.html > project/www/index.html
|
||||||
|
|
||||||
|
|
||||||
|
android: project plugins
|
||||||
|
mkdir -p project/platforms/android/res/xml/
|
||||||
|
cp android/AndroidManifest.xml project/platforms/android/AndroidManifest.xml
|
||||||
|
cp android/project.properties project/platforms/android/project.properties
|
||||||
|
cp -R android/res/* project/platforms/android/res
|
||||||
|
make -C project android
|
||||||
|
|
||||||
|
wp8: project plugins
|
||||||
|
make -C project wp8
|
||||||
|
cp -R project/www/* project/platforms/wp8/www
|
||||||
|
cp -R wp/res/* project/platforms/wp/res
|
||||||
|
|
||||||
|
ios: project plugins
|
||||||
|
make -C project ios
|
||||||
|
cp ios/Copay-Info.plist project/platforms/ios/Copay-Info.plist
|
||||||
|
mkdir -p project/platforms/ios/Copay/Resources/icons
|
||||||
|
mkdir -p project/platforms/ios/Copay/Resources/splash
|
||||||
|
cp -R ios/icons/* project/platforms/ios/Copay/Resources/icons
|
||||||
|
cp -R ios/splash/* project/platforms/ios/Copay/Resources/splash
|
||||||
|
|
||||||
|
open-ios: ios
|
||||||
|
open project/platforms/ios/Copay.xcodeproj
|
||||||
|
|
||||||
|
run-android: android
|
||||||
|
make -C project run-android
|
||||||
|
|
||||||
|
release-android: android
|
||||||
|
make -C project release-android
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf project
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
|
||||||
|
.PHONY: android plugins wp8 ios
|
||||||
|
|
||||||
|
plugins:
|
||||||
|
@echo "Intalling cordova plugins"
|
||||||
|
cordova plugin add https://github.com/Initsogar/cordova-webintent.git
|
||||||
|
cordova plugin add https://github.com/wildabeast/BarcodeScanner.git
|
||||||
|
cordova plugin add org.apache.cordova.splashscreen
|
||||||
|
cordova plugin add org.apache.cordova.statusbar
|
||||||
|
cordova plugin add https://github.com/EddyVerbruggen/LaunchMyApp-PhoneGap-Plugin.git --variable URL_SCHEME=bitcoin
|
||||||
|
cordova plugin add org.apache.cordova.inappbrowser
|
||||||
|
|
||||||
|
android:
|
||||||
|
cordova platforms add android
|
||||||
|
|
||||||
|
wp8:
|
||||||
|
cordova platforms add wp8
|
||||||
|
|
||||||
|
ios:
|
||||||
|
cordova platforms add ios
|
||||||
|
|
||||||
|
build-ios:
|
||||||
|
cordova build ios
|
||||||
|
|
||||||
|
run-android:
|
||||||
|
cordova run android
|
||||||
|
|
||||||
|
release-android:
|
||||||
|
cordova build android --release
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,9 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
#
|
||||||
# Usage:
|
# Usage:
|
||||||
# sh ./build.sh --android --reload
|
# sh ./build.sh --android --reload
|
||||||
|
#
|
||||||
OpenColor="\033["
|
#
|
||||||
Red="1;31m"
|
|
||||||
Yellow="1;33m"
|
|
||||||
Green="1;32m"
|
|
||||||
CloseColor="\033[0m"
|
|
||||||
|
|
||||||
# Check function OK
|
# Check function OK
|
||||||
checkOK() {
|
checkOK() {
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
|
@ -22,22 +17,22 @@ BUILDDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
PROJECT="$BUILDDIR/project"
|
PROJECT="$BUILDDIR/project"
|
||||||
VERSION=`cut -d '"' -f2 $BUILDDIR/../version.js`
|
VERSION=`cut -d '"' -f2 $BUILDDIR/../version.js`
|
||||||
|
|
||||||
SKIPIOS=false
|
CURRENT_OS=$1
|
||||||
|
|
||||||
|
if [ -z "CURRENT_OS" ]
|
||||||
|
then
|
||||||
|
echo "Build.sh WP8|ANDROID|IPHONE"
|
||||||
|
fi
|
||||||
|
|
||||||
CLEAR=false
|
CLEAR=false
|
||||||
DBGJS=false
|
DBGJS=false
|
||||||
|
|
||||||
# Check Args
|
if [[ $2 = "--clear" || $3 = "--clear" ]]
|
||||||
if [[ $1 = "--android" || $2 = "--android" || $3 = "--android" ]]
|
|
||||||
then
|
|
||||||
SKIPIOS=true
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ $1 = "--clear" || $2 = "--clear" || $3 = "--clear" ]]
|
|
||||||
then
|
then
|
||||||
CLEAR=true
|
CLEAR=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $1 = "--dbgjs" || $2 = "--dbgjs" || $3 = "--dbgjs" ]]
|
if [[ $2 = "--dbgjs" || $3 = "--dbgjs" ]]
|
||||||
then
|
then
|
||||||
DBGJS=true
|
DBGJS=true
|
||||||
fi
|
fi
|
||||||
|
@ -45,7 +40,7 @@ fi
|
||||||
|
|
||||||
echo "${OpenColor}${Green}* Checking dependencies...${CloseColor}"
|
echo "${OpenColor}${Green}* Checking dependencies...${CloseColor}"
|
||||||
command -v cordova >/dev/null 2>&1 || { echo >&2 "Cordova is not present, please install it: sudo npm -g cordova."; exit 1; }
|
command -v cordova >/dev/null 2>&1 || { echo >&2 "Cordova is not present, please install it: sudo npm -g cordova."; exit 1; }
|
||||||
command -v xcodebuild >/dev/null 2>&1 || { echo >&2 "XCode is not present, install it or use [--android]."; exit 1; }
|
#command -v xcodebuild >/dev/null 2>&1 || { echo >&2 "XCode is not present, install it or use [--android]."; exit 1; }
|
||||||
|
|
||||||
# Create project dir
|
# Create project dir
|
||||||
if $CLEAR
|
if $CLEAR
|
||||||
|
@ -55,6 +50,10 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Build directory is $BUILDDIR"
|
||||||
|
echo "Project directory is $PROJECT"
|
||||||
|
|
||||||
|
|
||||||
if [ ! -d $PROJECT ]; then
|
if [ ! -d $PROJECT ]; then
|
||||||
cd $BUILDDIR
|
cd $BUILDDIR
|
||||||
echo "${OpenColor}${Green}* Creating project... ${CloseColor}"
|
echo "${OpenColor}${Green}* Creating project... ${CloseColor}"
|
||||||
|
@ -62,16 +61,25 @@ if [ ! -d $PROJECT ]; then
|
||||||
checkOK
|
checkOK
|
||||||
|
|
||||||
cd $PROJECT
|
cd $PROJECT
|
||||||
echo "${OpenColor}${Green}* Adding Android platform... ${CloseColor}"
|
|
||||||
cordova platforms add android
|
|
||||||
checkOK
|
|
||||||
|
|
||||||
if [[ !$SKIPIOS ]]; then
|
if [ $CURRENT_OS == "ANDROID" ]; then
|
||||||
|
echo "${OpenColor}${Green}* Adding Android platform... ${CloseColor}"
|
||||||
|
cordova platforms add android
|
||||||
|
checkOK
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $CURRENT_OS == "IPHONE" ]; then
|
||||||
echo "${OpenColor}${Green}* Adding IOS platform... ${CloseColor}"
|
echo "${OpenColor}${Green}* Adding IOS platform... ${CloseColor}"
|
||||||
cordova platforms add ios
|
cordova platforms add ios
|
||||||
checkOK
|
checkOK
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $CURRENT_OS == "WP8" ]; then
|
||||||
|
echo "${OpenColor}${Green}* Adding WP8 platform... ${CloseColor}"
|
||||||
|
cordova platforms add wp8
|
||||||
|
checkOK
|
||||||
|
fi
|
||||||
|
|
||||||
echo "${OpenColor}${Green}* Installing plugins... ${CloseColor}"
|
echo "${OpenColor}${Green}* Installing plugins... ${CloseColor}"
|
||||||
|
|
||||||
cordova plugin add https://github.com/Initsogar/cordova-webintent.git
|
cordova plugin add https://github.com/Initsogar/cordova-webintent.git
|
||||||
|
@ -116,22 +124,32 @@ sed "s/<\!-- PLACEHOLDER: CORDOVA SRIPT -->/<script type='text\/javascript' char
|
||||||
checkOK
|
checkOK
|
||||||
|
|
||||||
cd $BUILDDIR
|
cd $BUILDDIR
|
||||||
cp config.xml $PROJECT/config.xml
|
|
||||||
checkOK
|
|
||||||
|
|
||||||
mkdir -p $PROJECT/platforms/android/res/xml/
|
|
||||||
checkOK
|
|
||||||
|
|
||||||
cp android/AndroidManifest.xml $PROJECT/platforms/android/AndroidManifest.xml
|
|
||||||
checkOK
|
|
||||||
|
|
||||||
cp android/project.properties $PROJECT/platforms/android/project.properties
|
cp config.xml $PROJECT/config.xml
|
||||||
checkOK
|
checkOK
|
||||||
|
|
||||||
cp -R android/res/* $PROJECT/platforms/android/res
|
if [ $CURRENT_OS == "ANDROID" ]; then
|
||||||
checkOK
|
echo "Android project!!!"
|
||||||
|
|
||||||
if [[ !$SKIPIOS ]]; then
|
|
||||||
|
mkdir -p $PROJECT/platforms/android/res/xml/
|
||||||
|
checkOK
|
||||||
|
|
||||||
|
cp android/AndroidManifest.xml $PROJECT/platforms/android/AndroidManifest.xml
|
||||||
|
checkOK
|
||||||
|
|
||||||
|
cp android/project.properties $PROJECT/platforms/android/project.properties
|
||||||
|
checkOK
|
||||||
|
|
||||||
|
cp -R android/res/* $PROJECT/platforms/android/res
|
||||||
|
checkOK
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $CURRENT_OS == "IPHONE" ]; then
|
||||||
|
|
||||||
|
echo "Iphone project!!!"
|
||||||
cp ios/Copay-Info.plist $PROJECT/platforms/ios/Copay-Info.plist
|
cp ios/Copay-Info.plist $PROJECT/platforms/ios/Copay-Info.plist
|
||||||
checkOK
|
checkOK
|
||||||
|
|
||||||
|
@ -148,3 +166,16 @@ if [[ !$SKIPIOS ]]; then
|
||||||
checkOK
|
checkOK
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ $CURRENT_OS == "WP8" ]; then
|
||||||
|
echo "Wp8 project!!!"
|
||||||
|
cp -R $PROJECT/www/* $PROJECT/platforms/wp8/www
|
||||||
|
checkOK
|
||||||
|
|
||||||
|
mkdir -p $PROJECT/platforms/res/wp
|
||||||
|
cp -v wp/res/* $PROJECT/platforms/wp8/Assets
|
||||||
|
cp -v wp/res/SplashScreenImage.jpg $PROJECT/platforms/wp8/
|
||||||
|
checkOK
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
<preference name="StatusBarBackgroundColor" value="#3C4E60" />
|
<preference name="StatusBarBackgroundColor" value="#3C4E60" />
|
||||||
<preference name="StatusBarStyle" value="lightcontent" />
|
<preference name="StatusBarStyle" value="lightcontent" />
|
||||||
<preference name="BackupWebStorage" value="none"/>
|
<preference name="BackupWebStorage" value="none"/>
|
||||||
|
<preference name="windows-target-version" value="8.1"/>
|
||||||
<feature name="App">
|
<feature name="App">
|
||||||
<param name="android-package" value="com.bitpay.copay" />
|
<param name="android-package" value="com.bitpay.copay" />
|
||||||
</feature>
|
</feature>
|
||||||
|
|
|
@ -9,11 +9,10 @@
|
||||||
|
|
||||||
## Build the project
|
## Build the project
|
||||||
|
|
||||||
$ sh cordova/build.sh [--android]
|
$ make [clean] open-ios
|
||||||
$ cd cordova/project
|
OR $ make [clean] android-run
|
||||||
$ cordova run android
|
OR $ make [clean] wp8
|
||||||
$ cordova emulate ios
|
|
||||||
|
See Makefile for more targets
|
||||||
|
|
||||||
## Build for release
|
|
||||||
|
|
||||||
$ cordova build android --release
|
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
<!--
|
||||||
|
Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
or more contributor license agreements. See the NOTICE file
|
||||||
|
distributed with this work for additional information
|
||||||
|
regarding copyright ownership. The ASF licenses this file
|
||||||
|
to you under the Apache License, Version 2.0 (the
|
||||||
|
"License"); you may not use this file except in compliance
|
||||||
|
with the License. You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing,
|
||||||
|
software distributed under the License is distributed on an
|
||||||
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
KIND, either express or implied. See the License for the
|
||||||
|
specific language governing permissions and limitations
|
||||||
|
under the License.
|
||||||
|
-->
|
||||||
|
<phone:PhoneApplicationPage
|
||||||
|
x:Class="com.bitpay.copay.MainPage"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
|
||||||
|
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
mc:Ignorable="d" FontFamily="{StaticResource PhoneFontFamilyNormal}"
|
||||||
|
FontSize="{StaticResource PhoneFontSizeNormal}"
|
||||||
|
Foreground="{StaticResource PhoneForegroundBrush}"
|
||||||
|
Background="Black"
|
||||||
|
SupportedOrientations="Portrait" Orientation="Portrait"
|
||||||
|
shell:SystemTray.IsVisible="True" d:DesignHeight="768" d:DesignWidth="480"
|
||||||
|
xmlns:my="clr-namespace:WPCordovaClassLib">
|
||||||
|
<Grid x:Name="LayoutRoot" Background="Transparent" HorizontalAlignment="Stretch">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<my:CordovaView HorizontalAlignment="Stretch"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
x:Name="CordovaView"
|
||||||
|
VerticalAlignment="Stretch" />
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</phone:PhoneApplicationPage>
|
||||||
|
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest">
|
||||||
|
<Identity Name="18C7659D.Copay" Publisher="CN=F89609D1-EB3E-45FD-A58A-C2E3895FCE7B" Version="0.9.2.2" />
|
||||||
|
<mp:PhoneIdentity PhoneProductId="5381aa50-9069-11e4-84cc-293caf9cbdc8" PhonePublisherId="F89609D1-EB3E-45FD-A58A-C2E3895FCE7B" />
|
||||||
|
<Properties>
|
||||||
|
<DisplayName>Copay</DisplayName>
|
||||||
|
<PublisherDisplayName>BitPay Inc.</PublisherDisplayName>
|
||||||
|
<Logo>Assets\StoreLogo.png</Logo>
|
||||||
|
</Properties>
|
||||||
|
<Prerequisites>
|
||||||
|
<OSMinVersion>6.3.1</OSMinVersion>
|
||||||
|
<OSMaxVersionTested>6.3.1</OSMaxVersionTested>
|
||||||
|
</Prerequisites>
|
||||||
|
<Resources>
|
||||||
|
<Resource Language="x-generate" />
|
||||||
|
</Resources>
|
||||||
|
<Applications>
|
||||||
|
<Application Id="x5381aa50y9069y11e4y84ccy293caf9cbdc8x" Executable="AGHost.exe" EntryPoint="MainPage.xaml">
|
||||||
|
<m3:VisualElements DisplayName="Copay" Square150x150Logo="Assets\SquareTile150x150.png" Square44x44Logo="Assets\Logo.png" Description="Copay" ForegroundText="light" BackgroundColor="#464646">
|
||||||
|
<m3:DefaultTile Square71x71Logo="Assets\SquareTile71x71.png">
|
||||||
|
</m3:DefaultTile>
|
||||||
|
<m3:SplashScreen Image="SplashScreenImage.jpg" />
|
||||||
|
</m3:VisualElements>
|
||||||
|
<Extensions>
|
||||||
|
<Extension Category="windows.backgroundTasks" EntryPoint="AgHost.BackgroundTask">
|
||||||
|
<BackgroundTasks>
|
||||||
|
<Task Type="systemEvent" />
|
||||||
|
</BackgroundTasks>
|
||||||
|
</Extension>
|
||||||
|
</Extensions>
|
||||||
|
</Application>
|
||||||
|
</Applications>
|
||||||
|
<Extensions>
|
||||||
|
<Extension Category="windows.activatableClass.inProcessServer">
|
||||||
|
<InProcessServer>
|
||||||
|
<Path>AgHostSvcs.dll</Path>
|
||||||
|
<ActivatableClass ActivatableClassId="AgHost.BackgroundTask" ThreadingModel="both" />
|
||||||
|
</InProcessServer>
|
||||||
|
</Extension>
|
||||||
|
</Extensions>
|
||||||
|
</Package>
|
|
@ -0,0 +1,12 @@
|
||||||
|
#/bin/bash
|
||||||
|
|
||||||
|
PROJECT=./cordova/project/platforms
|
||||||
|
for i in $PROJECT/wp8/www/img/*.svg
|
||||||
|
do
|
||||||
|
cat $i |grep -v ?xml > $i
|
||||||
|
done
|
||||||
|
|
||||||
|
for i in $PROJECT/wp8/www/font/*.svg
|
||||||
|
do
|
||||||
|
cat $i |grep -v ?xml > $i
|
||||||
|
done
|
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 47 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 54 KiB |
|
@ -1,10 +1,10 @@
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'icomoon';
|
font-family: 'icomoon';
|
||||||
src:url("../font/icomoon.eot?-5b2xva");
|
src:url("../font/icomoon.eot");
|
||||||
src:url("../font/icomoon.eot?#iefix-5b2xva") format('embedded-opentype'),
|
src:url("../font/icomoon.eot?#iefix") format('embedded-opentype'),
|
||||||
url("../font/icomoon.woff?-5b2xva") format('woff'),
|
url("../font/icomoon.woff") format('woff'),
|
||||||
url("../font/icomoon.ttf?-5b2xva") format('truetype'),
|
url("../font/icomoon.ttf") format('truetype'),
|
||||||
url("../font/icomoon.svg?-5b2xva#icomoon") format('svg');
|
url("../font/icomoon.svg#icomoon") format('svg');
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.button-close {
|
.button-close {
|
||||||
margin-top:65px;
|
margin-top:10px;
|
||||||
background: #213140;
|
background: #213140;
|
||||||
padding: 1.2rem;
|
padding: 1.2rem;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
@ -91,7 +91,6 @@
|
||||||
.scroll-section {
|
.scroll-section {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 45px;
|
top: 45px;
|
||||||
bottom: 65px;
|
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
27
index.html
|
@ -1,5 +1,5 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en" ng-csp>
|
<html lang="en" ng-app="copayApp" ng-csp>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||||
|
@ -77,20 +77,20 @@
|
||||||
<span translate> <strong class="size-16">Network Error</strong>.<br> Attempting to reconnect..</span>
|
<span translate> <strong class="size-16">Network Error</strong>.<br> Attempting to reconnect..</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div ng-controller="SidebarController" ng-show="$root.iden && !$root.hideNavigation">
|
<div ng-controller="SidebarController" ng-show="$root.iden && !$root.hideNavigation && !$root.wpInputFocused">
|
||||||
<nav class="tab-bar">
|
<nav class="tab-bar">
|
||||||
<section class="left-small">
|
<section class="left-small">
|
||||||
<a class="left-off-canvas-toggle menu-icon" ><span></span></a>
|
<a class="left-off-canvas-toggle menu-icon" ><span></span></a>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="right-small" ng-show="$root.iden && $root.wallet.isComplete()">
|
<section class="right-small" ng-show="$root.iden && $root.wallet.isComplete() && !$root.hideWalletNavigation">
|
||||||
<a class="p10" ng-click="$root.go('more')"><i class="fi-widget size-24"></i></a>
|
<a class="p10" ng-click="$root.go('more')"><i class="fi-widget size-24"></i></a>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="middle tab-bar-section">
|
<section class="middle tab-bar-section">
|
||||||
<h1 class="title ellipsis" ng-show="$root.iden && $root.wallet">
|
<h1 class="title ellipsis" ng-show="$root.iden && $root.wallet && !$root.hideWalletNavigation">
|
||||||
{{$root.wallet.getName()}}
|
{{$root.wallet.getName()}}
|
||||||
</h1>
|
</h1>
|
||||||
</section>
|
</section>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
|
@ -98,13 +98,12 @@
|
||||||
<div ng-include="'views/includes/sidebar-mobile.html'"></div>
|
<div ng-include="'views/includes/sidebar-mobile.html'"></div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
<div
|
<div ng-if="$root.iden"
|
||||||
ng-if="$root.iden"
|
|
||||||
ng-include="'views/includes/sidebar.html'"
|
ng-include="'views/includes/sidebar.html'"
|
||||||
role='navigation'
|
role='navigation'
|
||||||
class="sidebar"></div>
|
class="sidebar"></div>
|
||||||
<div class="bottom-bar" ng-if="$root.wallet &&
|
<div class="bottom-bar" ng-if="$root.wallet &&
|
||||||
$root.wallet.isComplete() && !$root.wallet.isLocked">
|
$root.wallet.isComplete() && !$root.wallet.isLocked && !$root.hideWalletNavigation">
|
||||||
<div ng-include="'views/includes/bottombar-mobile.html'"></div>
|
<div ng-include="'views/includes/bottombar-mobile.html'"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -116,10 +115,10 @@
|
||||||
class="head show-for-large-up"
|
class="head show-for-large-up"
|
||||||
ng-include="'views/includes/head.html'"
|
ng-include="'views/includes/head.html'"
|
||||||
ng-if="$root.iden"
|
ng-if="$root.iden"
|
||||||
ng-class="{'dni':$root.hideNavigation}"
|
ng-class="{'dni':$root.hideNavigation || $root.wpInputFocused}"
|
||||||
></div>
|
></div>
|
||||||
|
|
||||||
<section ng-class="{'main':$root.iden && !$root.starting && !$root.hideNavigation}" ng-view></section>
|
<section ng-class="{'main':$root.iden && !$root.starting && !$root.hideNavigation && !$root.wpInputFocused}" ng-view></section>
|
||||||
|
|
||||||
<a class="exit-off-canvas"></a>
|
<a class="exit-off-canvas"></a>
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('CreateController',
|
angular.module('copayApp.controllers').controller('CreateController',
|
||||||
function($scope, $rootScope, $location, $timeout, identityService, backupService, notification, defaults) {
|
function($scope, $rootScope, $location, $timeout, identityService, backupService, notification, defaults, isMobile, isCordova) {
|
||||||
|
|
||||||
$rootScope.fromSetup = true;
|
$rootScope.fromSetup = true;
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
$scope.walletPassword = $rootScope.walletPassword;
|
$scope.walletPassword = $rootScope.walletPassword;
|
||||||
$scope.isMobile = !!window.cordova;
|
$scope.isMobile = isMobile.any();
|
||||||
$scope.hideAdv = true;
|
$scope.hideAdv = true;
|
||||||
$scope.networkName = config.networkName;
|
$scope.networkName = config.networkName;
|
||||||
$rootScope.title = 'Create new wallet';
|
$rootScope.title = 'Create new wallet';
|
||||||
|
$rootScope.hideWalletNavigation = true;
|
||||||
|
$scope.isWindowsPhoneApp = isMobile.Windows() && isCordova;
|
||||||
|
|
||||||
// ng-repeat defined number of times instead of repeating over array?
|
// ng-repeat defined number of times instead of repeating over array?
|
||||||
$scope.getNumber = function(num) {
|
$scope.getNumber = function(num) {
|
||||||
|
@ -39,6 +41,7 @@ angular.module('copayApp.controllers').controller('CreateController',
|
||||||
return $scope.networkUrl != defaults.network.livenet.url && $scope.networkUrl != defaults.network.testnet.url;
|
return $scope.networkUrl != defaults.network.livenet.url && $scope.networkUrl != defaults.network.testnet.url;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
$scope.create = function(form) {
|
$scope.create = function(form) {
|
||||||
if (form && form.$invalid) {
|
if (form && form.$invalid) {
|
||||||
$scope.error = 'Please enter the required fields';
|
$scope.error = 'Please enter the required fields';
|
||||||
|
@ -68,4 +71,8 @@ angular.module('copayApp.controllers').controller('CreateController',
|
||||||
},1);
|
},1);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.$on("$destroy", function () {
|
||||||
|
$rootScope.hideWalletNavigation = false;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('CreateProfileController', function($scope, $rootScope, $location, $timeout, $window, notification, pluginManager, identityService, pinService, isMobile, configService, go) {
|
angular.module('copayApp.controllers').controller('CreateProfileController', function($scope, $rootScope, $location, $timeout, $window, notification, pluginManager, identityService, pinService, isMobile, isCordova, configService, go) {
|
||||||
|
|
||||||
var _credentials, _firstpin;
|
var _credentials, _firstpin;
|
||||||
|
|
||||||
|
@ -10,15 +10,25 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
||||||
go.walletHome();
|
go.walletHome();
|
||||||
|
|
||||||
$scope.isMobile = isMobile.any();
|
$scope.isMobile = isMobile.any();
|
||||||
|
$scope.isWindowsPhoneApp = isMobile.Windows() && isCordova;
|
||||||
|
$scope.hideForWP = 0;
|
||||||
|
|
||||||
|
|
||||||
$scope.createStep = 'storage';
|
$scope.createStep = 'storage';
|
||||||
$scope.useLocalstorage = false;
|
$scope.useLocalstorage = false;
|
||||||
$scope.minPasswordStrength = _.isUndefined(config.minPasswordStrength) ?
|
$scope.minPasswordStrength = _.isUndefined(config.minPasswordStrength) ?
|
||||||
4 : config.minPasswordStrength;
|
4 : config.minPasswordStrength;
|
||||||
|
|
||||||
|
|
||||||
pinService.makePinInput($scope, 'newpin', function(newValue) {
|
pinService.makePinInput($scope, 'newpin', function(newValue) {
|
||||||
_firstpin = newValue;
|
_firstpin = newValue;
|
||||||
|
$scope.hideForWP = 0;
|
||||||
$scope.askForPin = 2;
|
$scope.askForPin = 2;
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$digest();
|
||||||
|
}, 1);
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
pinService.makePinInput($scope, 'repeatpin', function(newValue) {
|
pinService.makePinInput($scope, 'repeatpin', function(newValue) {
|
||||||
|
@ -27,6 +37,9 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
||||||
$scope.createPin(newValue);
|
$scope.createPin(newValue);
|
||||||
} else {
|
} else {
|
||||||
$scope.askForPin = 1;
|
$scope.askForPin = 1;
|
||||||
|
$scope.hideForWP = 0;
|
||||||
|
$scope.passwordStrength = null;
|
||||||
|
|
||||||
_firstpin = null;
|
_firstpin = null;
|
||||||
|
|
||||||
$scope.setPinForm.newpin.$setViewValue('');
|
$scope.setPinForm.newpin.$setViewValue('');
|
||||||
|
@ -36,10 +49,20 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
||||||
$scope.setPinForm.$setPristine();
|
$scope.setPinForm.$setPristine();
|
||||||
|
|
||||||
$scope.error = 'Entered PINs were not equal. Try again';
|
$scope.error = 'Entered PINs were not equal. Try again';
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$digest();
|
||||||
|
}, 1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.formFocus = function() {
|
||||||
|
if (!$scope.isWindowsPhoneApp) return
|
||||||
|
$scope.hideForWP = true;
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$digest();
|
||||||
|
}, 1);
|
||||||
|
};
|
||||||
|
|
||||||
$scope.createPin = function(pin) {
|
$scope.createPin = function(pin) {
|
||||||
preconditions.checkArgument(pin);
|
preconditions.checkArgument(pin);
|
||||||
|
@ -66,6 +89,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
||||||
$scope.setStep = function(step) {
|
$scope.setStep = function(step) {
|
||||||
$scope.error = null;
|
$scope.error = null;
|
||||||
$scope.createStep = step;
|
$scope.createStep = step;
|
||||||
|
$scope.hideForWP = false;
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.$digest();
|
$scope.$digest();
|
||||||
}, 1);
|
}, 1);
|
||||||
|
@ -73,6 +97,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
||||||
|
|
||||||
$scope.selectStorage = function(storage) {
|
$scope.selectStorage = function(storage) {
|
||||||
$scope.useLocalstorage = storage == 'local';
|
$scope.useLocalstorage = storage == 'local';
|
||||||
|
$scope.hideForWP = false;
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.$digest();
|
$scope.$digest();
|
||||||
}, 1);
|
}, 1);
|
||||||
|
@ -88,6 +113,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
||||||
preconditions.checkState($scope.userOrEmail);
|
preconditions.checkState($scope.userOrEmail);
|
||||||
|
|
||||||
$scope.error = null;
|
$scope.error = null;
|
||||||
|
$scope.hideForWP = false;
|
||||||
$scope.createStep = 'pass';
|
$scope.createStep = 'pass';
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.$digest();
|
$scope.$digest();
|
||||||
|
@ -142,6 +168,8 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
||||||
password: password,
|
password: password,
|
||||||
};
|
};
|
||||||
$scope.askForPin = 1;
|
$scope.askForPin = 1;
|
||||||
|
$scope.hideForWP = 0;
|
||||||
|
|
||||||
$rootScope.hideNavigation = true;
|
$rootScope.hideNavigation = true;
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$rootScope.$digest();
|
$rootScope.$digest();
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('HomeController', function($scope, $rootScope, $timeout, $window, go, notification, identityService, Compatibility, pinService, applicationService, isMobile) {
|
angular.module('copayApp.controllers').controller('HomeController', function($scope, $rootScope, $timeout, $window, go, notification, identityService, Compatibility, pinService, applicationService, isMobile, isCordova) {
|
||||||
|
|
||||||
var _credentials, _firstpin;
|
var _credentials, _firstpin;
|
||||||
$scope.init = function() {
|
$scope.init = function() {
|
||||||
$scope.isMobile = isMobile.any();
|
$scope.isMobile = isMobile.any();
|
||||||
|
$scope.isWindowsPhoneApp = isMobile.Windows() && isCordova;
|
||||||
|
$scope.hideForWP = 0;
|
||||||
$scope.attempt = 0;
|
$scope.attempt = 0;
|
||||||
|
|
||||||
// This is only for backwards compat, insight api should link to #!/confirmed directly
|
// This is only for backwards compat, insight api should link to #!/confirmed directly
|
||||||
|
@ -30,6 +32,16 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
|
||||||
$scope.usingLocalStorage = config.plugins.EncryptedLocalStorage;
|
$scope.usingLocalStorage = config.plugins.EncryptedLocalStorage;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
$scope.formFocus = function() {
|
||||||
|
if ($scope.isWindowsPhoneApp) {
|
||||||
|
$scope.hideForWP = true;
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.$digest();
|
||||||
|
}, 1);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
pinService.makePinInput($scope, 'pin', function(newValue) {
|
pinService.makePinInput($scope, 'pin', function(newValue) {
|
||||||
$scope.openWithPin(newValue);
|
$scope.openWithPin(newValue);
|
||||||
});
|
});
|
||||||
|
|
|
@ -9,6 +9,8 @@ angular.module('copayApp.controllers').controller('ImportController',
|
||||||
$scope.isSafari = isMobile.Safari();
|
$scope.isSafari = isMobile.Safari();
|
||||||
$scope.isCordova = isCordova;
|
$scope.isCordova = isCordova;
|
||||||
$scope.importOpts = {};
|
$scope.importOpts = {};
|
||||||
|
$rootScope.hideWalletNavigation = true;
|
||||||
|
|
||||||
|
|
||||||
window.ignoreMobilePause = true;
|
window.ignoreMobilePause = true;
|
||||||
$scope.$on('$destroy', function() {
|
$scope.$on('$destroy', function() {
|
||||||
|
@ -96,4 +98,10 @@ angular.module('copayApp.controllers').controller('ImportController',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
$scope.$on("$destroy", function () {
|
||||||
|
$rootScope.hideWalletNavigation = false;
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,6 +6,8 @@ angular.module('copayApp.controllers').controller('JoinController',
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
$scope.isMobile = isMobile.any();
|
$scope.isMobile = isMobile.any();
|
||||||
$rootScope.title = 'Join shared wallet';
|
$rootScope.title = 'Join shared wallet';
|
||||||
|
$rootScope.hideWalletNavigation = true;
|
||||||
|
|
||||||
|
|
||||||
// QR code Scanner
|
// QR code Scanner
|
||||||
var cameraInput;
|
var cameraInput;
|
||||||
|
@ -150,4 +152,9 @@ angular.module('copayApp.controllers').controller('JoinController',
|
||||||
$timeout(function () { $scope.$digest(); }, 1);
|
$timeout(function () { $scope.$digest(); }, 1);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$scope.$on("$destroy", function () {
|
||||||
|
$rootScope.hideWalletNavigation = false;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -3,7 +3,7 @@ var bitcore = require('bitcore');
|
||||||
var preconditions = require('preconditions').singleton();
|
var preconditions = require('preconditions').singleton();
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('SendController',
|
angular.module('copayApp.controllers').controller('SendController',
|
||||||
function($scope, $rootScope, $window, $timeout, $modal, $filter, notification, isMobile, rateService, txStatus) {
|
function($scope, $rootScope, $window, $timeout, $modal, $filter, notification, isMobile, rateService, txStatus, isCordova) {
|
||||||
|
|
||||||
var satToUnit;
|
var satToUnit;
|
||||||
|
|
||||||
|
@ -13,9 +13,13 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
|
|
||||||
preconditions.checkState(w.settings.unitToSatoshi);
|
preconditions.checkState(w.settings.unitToSatoshi);
|
||||||
|
|
||||||
|
$scope.isMobile = isMobile.any();
|
||||||
|
$scope.isWindowsPhoneApp = isMobile.Windows() && isCordova;
|
||||||
|
$rootScope.wpInputFocused = false;
|
||||||
|
|
||||||
$scope.isShared = w.isShared();
|
$scope.isShared = w.isShared();
|
||||||
$scope.requiresMultipleSignatures = w.requiresMultipleSignatures();
|
$scope.requiresMultipleSignatures = w.requiresMultipleSignatures();
|
||||||
$rootScope.title =$scope.requiresMultipleSignatures ? 'Send Proposal' : 'Send';
|
$rootScope.title = $scope.requiresMultipleSignatures ? 'Send Proposal' : 'Send';
|
||||||
$scope.loading = false;
|
$scope.loading = false;
|
||||||
$scope.error = $scope.success = null;
|
$scope.error = $scope.success = null;
|
||||||
|
|
||||||
|
@ -44,7 +48,30 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
$scope.isRateAvailable = true;
|
$scope.isRateAvailable = true;
|
||||||
$scope.$digest();
|
$scope.$digest();
|
||||||
});
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
|
$scope.formFocus = function(what) {
|
||||||
|
if (!$scope.isWindowsPhoneApp) return
|
||||||
|
|
||||||
|
if (!what) {
|
||||||
|
$rootScope.wpInputFocused = false;
|
||||||
|
$scope.hideAddress = false;
|
||||||
|
$scope.hideAmount = false;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
$rootScope.wpInputFocused = true;
|
||||||
|
if (what == 'amount') {
|
||||||
|
$scope.hideAddress = true;
|
||||||
|
} else if (what == 'msg') {
|
||||||
|
$scope.hideAddress = true;
|
||||||
|
$scope.hideAmount = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
$timeout(function() {
|
||||||
|
$rootScope.$digest();
|
||||||
|
}, 1);
|
||||||
|
};
|
||||||
|
|
||||||
$scope.setInputs = function() {
|
$scope.setInputs = function() {
|
||||||
var w = $rootScope.wallet;
|
var w = $rootScope.wallet;
|
||||||
|
@ -148,26 +175,36 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.loading = true;
|
$scope.loading = true;
|
||||||
var comment = form.comment.$modelValue;
|
$scope.creatingTX = true;
|
||||||
var merchantData = $scope._merchantData;
|
if ($scope.isWindowsPhoneApp)
|
||||||
var address, amount;
|
$rootScope.wpInputFocused = true;
|
||||||
if (!merchantData) {
|
|
||||||
address = form.address.$modelValue;
|
|
||||||
amount = parseInt((form.amount.$modelValue * unitToSat).toFixed(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
w.spend({
|
$timeout(function () {
|
||||||
merchantData: merchantData,
|
var comment = form.comment.$modelValue;
|
||||||
toAddress: address,
|
var merchantData = $scope._merchantData;
|
||||||
amountSat: amount,
|
var address, amount;
|
||||||
comment: comment,
|
if (!merchantData) {
|
||||||
}, function(err, txid, status) {
|
address = form.address.$modelValue;
|
||||||
$scope.loading = false;
|
amount = parseInt((form.amount.$modelValue * unitToSat).toFixed(0));
|
||||||
if (err)
|
}
|
||||||
return $scope.setError(err);
|
|
||||||
txStatus.notify(status);
|
w.spend({
|
||||||
$scope.resetForm();
|
merchantData: merchantData,
|
||||||
});
|
toAddress: address,
|
||||||
|
amountSat: amount,
|
||||||
|
comment: comment,
|
||||||
|
}, function (err, txid, status) {
|
||||||
|
$scope.loading = false;
|
||||||
|
$scope.creatingTX = false;
|
||||||
|
if ($scope.isWindowsPhoneApp)
|
||||||
|
$rootScope.wpInputFocused = false;
|
||||||
|
|
||||||
|
if (err)
|
||||||
|
return $scope.setError(err);
|
||||||
|
txStatus.notify(status);
|
||||||
|
$scope.resetForm();
|
||||||
|
});
|
||||||
|
}, 1);
|
||||||
};
|
};
|
||||||
|
|
||||||
// QR code Scanner
|
// QR code Scanner
|
||||||
|
@ -291,7 +328,7 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
window.ignoreMobilePause = true;
|
window.ignoreMobilePause = true;
|
||||||
cordova.plugins.barcodeScanner.scan(
|
cordova.plugins.barcodeScanner.scan(
|
||||||
function onSuccess(result) {
|
function onSuccess(result) {
|
||||||
$timeout(function(){
|
$timeout(function() {
|
||||||
window.ignoreMobilePause = false;
|
window.ignoreMobilePause = false;
|
||||||
}, 100);
|
}, 100);
|
||||||
if (result.cancelled) return;
|
if (result.cancelled) return;
|
||||||
|
@ -305,7 +342,7 @@ angular.module('copayApp.controllers').controller('SendController',
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
function onError(error) {
|
function onError(error) {
|
||||||
$timeout(function(){
|
$timeout(function() {
|
||||||
window.ignoreMobilePause = false;
|
window.ignoreMobilePause = false;
|
||||||
}, 100);
|
}, 100);
|
||||||
alert('Scanning error');
|
alert('Scanning error');
|
||||||
|
|
12
js/init.js
|
@ -1,9 +1,11 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.element(document).ready(function() {
|
angular.element(document).ready(function() {
|
||||||
var startAngular = function() {
|
|
||||||
angular.bootstrap(document, ['copayApp']);
|
// this is now in HTML tab, witch is compatible with Windows Phone
|
||||||
};
|
// var startAngular = function() {
|
||||||
|
// angular.bootstrap(document, ['copayApp']);
|
||||||
|
// };
|
||||||
/* Cordova specific Init */
|
/* Cordova specific Init */
|
||||||
if (window.cordova !== undefined) {
|
if (window.cordova !== undefined) {
|
||||||
|
|
||||||
|
@ -28,10 +30,10 @@ angular.element(document).ready(function() {
|
||||||
window.plugins.webintent.onNewIntent(handleBitcoinURI);
|
window.plugins.webintent.onNewIntent(handleBitcoinURI);
|
||||||
window.handleOpenURL = handleBitcoinURI;
|
window.handleOpenURL = handleBitcoinURI;
|
||||||
|
|
||||||
startAngular();
|
// startAngular();
|
||||||
}, false);
|
}, false);
|
||||||
} else {
|
} else {
|
||||||
startAngular();
|
// startAngular();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -22,13 +22,14 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"browser-request": "git://github.com/matiu/browser-request.git#67200dd4ec133457fb7dc69f005540f92b543f0a",
|
"browser-request": "git://github.com/matiu/browser-request.git#67200dd4ec133457fb7dc69f005540f92b543f0a",
|
||||||
|
"cordova": "^4.1.2",
|
||||||
"inherits": "^2.0.1",
|
"inherits": "^2.0.1",
|
||||||
"lodash": "^2.4.1",
|
"lodash": "^2.4.1",
|
||||||
|
"moment": "2.6.0",
|
||||||
"optimist": "^0.6.1",
|
"optimist": "^0.6.1",
|
||||||
"preconditions": "^1.0.7",
|
"preconditions": "^1.0.7",
|
||||||
"querystring": "^0.2.0",
|
"querystring": "^0.2.0",
|
||||||
"request": "^2.40.0",
|
"request": "^2.40.0"
|
||||||
"moment": "2.6.0"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node server.js",
|
"start": "node server.js",
|
||||||
|
@ -66,7 +67,7 @@
|
||||||
"grunt-markdown": "^0.5.0",
|
"grunt-markdown": "^0.5.0",
|
||||||
"grunt-mocha-test": "^0.8.2",
|
"grunt-mocha-test": "^0.8.2",
|
||||||
"grunt-release": "^0.7.0",
|
"grunt-release": "^0.7.0",
|
||||||
"grunt-shell": "^0.6.4",
|
"grunt-exec": "*",
|
||||||
"istanbul": "^0.2.10",
|
"istanbul": "^0.2.10",
|
||||||
"karma": "^0.12.9",
|
"karma": "^0.12.9",
|
||||||
"karma-chai": "^0.1.0",
|
"karma-chai": "^0.1.0",
|
||||||
|
|
|
@ -250,23 +250,25 @@ describe("Unit: Controllers", function() {
|
||||||
expect(form.newlabel.$invalid).to.equal(true);
|
expect(form.newlabel.$invalid).to.equal(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should create a transaction proposal with given values', function() {
|
it('should create a transaction proposal with given values', inject(function($timeout) {
|
||||||
sendForm.address.$setViewValue(anAddr);
|
sendForm.address.$setViewValue(anAddr);
|
||||||
sendForm.amount.$setViewValue(anAmount);
|
sendForm.amount.$setViewValue(anAmount);
|
||||||
sendForm.comment.$setViewValue(aComment);
|
sendForm.comment.$setViewValue(aComment);
|
||||||
|
|
||||||
var w = scope.wallet;
|
var w = scope.wallet;
|
||||||
scope.submitForm(sendForm);
|
scope.submitForm(sendForm);
|
||||||
|
|
||||||
|
$timeout.flush();
|
||||||
sinon.assert.callCount(w.spend, 1);
|
sinon.assert.callCount(w.spend, 1);
|
||||||
sinon.assert.callCount(w.broadcastTx, 0);
|
sinon.assert.callCount(w.broadcastTx, 0);
|
||||||
var spendArgs = w.spend.getCall(0).args[0];
|
var spendArgs = w.spend.getCall(0).args[0];
|
||||||
spendArgs.toAddress.should.equal(anAddr);
|
spendArgs.toAddress.should.equal(anAddr);
|
||||||
spendArgs.amountSat.should.equal(anAmount * scope.wallet.settings.unitToSatoshi);
|
spendArgs.amountSat.should.equal(anAmount * scope.wallet.settings.unitToSatoshi);
|
||||||
spendArgs.comment.should.equal(aComment);
|
spendArgs.comment.should.equal(aComment);
|
||||||
});
|
}));
|
||||||
|
|
||||||
|
|
||||||
it('should handle big values in 100 BTC', function() {
|
it('should handle big values in 100 BTC', inject(function($timeout) {
|
||||||
var old = scope.wallet.settings.unitToSatoshi;
|
var old = scope.wallet.settings.unitToSatoshi;
|
||||||
scope.wallet.settings.unitToSatoshi = 100000000;
|
scope.wallet.settings.unitToSatoshi = 100000000;
|
||||||
sendForm.address.$setViewValue(anAddr);
|
sendForm.address.$setViewValue(anAddr);
|
||||||
|
@ -276,12 +278,13 @@ describe("Unit: Controllers", function() {
|
||||||
scope.updateTxs = sinon.spy();
|
scope.updateTxs = sinon.spy();
|
||||||
scope.submitForm(sendForm);
|
scope.submitForm(sendForm);
|
||||||
var w = scope.wallet;
|
var w = scope.wallet;
|
||||||
|
$timeout.flush();
|
||||||
w.spend.getCall(0).args[0].amountSat.should.equal(100 * scope.wallet.settings.unitToSatoshi);
|
w.spend.getCall(0).args[0].amountSat.should.equal(100 * scope.wallet.settings.unitToSatoshi);
|
||||||
scope.wallet.settings.unitToSatoshi = old;
|
scope.wallet.settings.unitToSatoshi = old;
|
||||||
});
|
}));
|
||||||
|
|
||||||
|
|
||||||
it('should handle big values in 5000 BTC', inject(function($rootScope) {
|
it('should handle big values in 5000 BTC', inject(function($rootScope, $timeout) {
|
||||||
var w = scope.wallet;
|
var w = scope.wallet;
|
||||||
w.requiresMultipleSignatures = sinon.stub().returns(true);
|
w.requiresMultipleSignatures = sinon.stub().returns(true);
|
||||||
|
|
||||||
|
@ -291,6 +294,7 @@ describe("Unit: Controllers", function() {
|
||||||
sendForm.address.$setViewValue(anAddr);
|
sendForm.address.$setViewValue(anAddr);
|
||||||
sendForm.amount.$setViewValue(5000);
|
sendForm.amount.$setViewValue(5000);
|
||||||
scope.submitForm(sendForm);
|
scope.submitForm(sendForm);
|
||||||
|
$timeout.flush();
|
||||||
|
|
||||||
w.spend.getCall(0).args[0].amountSat.should.equal(5000 * $rootScope.wallet.settings.unitToSatoshi);
|
w.spend.getCall(0).args[0].amountSat.should.equal(5000 * $rootScope.wallet.settings.unitToSatoshi);
|
||||||
$rootScope.wallet.settings.unitToSatoshi = old;
|
$rootScope.wallet.settings.unitToSatoshi = old;
|
||||||
|
|
|
@ -3,11 +3,6 @@
|
||||||
<div ng-include="'views/includes/loading.html'" ng-init="title = 'Creating wallet'"></div>
|
<div ng-include="'views/includes/loading.html'" ng-init="title = 'Creating wallet'"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setup" ng-show="!loading && !$root.starting">
|
<div class="setup" ng-show="!loading && !$root.starting">
|
||||||
<div class="row hide-for-large-up">
|
|
||||||
<div class="medium-12 small-12 columns">
|
|
||||||
<h1>{{$root.title}}</h1>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<form name="setupForm" ng-submit="create(setupForm)" novalidate>
|
<form name="setupForm" ng-submit="create(setupForm)" novalidate>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="large-12 columns">
|
<div class="large-12 columns">
|
||||||
|
@ -24,7 +19,7 @@
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<label><span translate>Wallet name</span>
|
<label><span translate>Wallet name</span>
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input type="text" placeholder="{{'Family vacation funds'|translate}}" class="form-control" ng-model="walletName" ng-required="true">
|
<input type="text" placeholder="{{'Family vacation funds'|translate}}" class="form-control" ng-model="walletName" ng-required="true">
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
|
@ -4,34 +4,34 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="large-4 large-centered medium-7 medium-centered columns m20b" ng-show="!$root.starting && !askForPin">
|
<div class="large-4 large-centered medium-7 medium-centered columns m20b" ng-show="!$root.starting && !askForPin">
|
||||||
<div class="logo-setup hide-for-small-only">
|
<div class="logo-setup hide-for-small-only" ng-hide="hideForWP">
|
||||||
<img src="img/logo-negative-beta.svg" alt="Copay" width="100">
|
<img src="img/logo-negative-beta.svg" alt="Copay" width="100">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
<div class="clipo" ng-show="createStep == 'storage' ">
|
<div class="clipo" ng-show="createStep == 'storage' && !hideForWP ">
|
||||||
<img src="img/clipo-signup1.png" alt="clipo" width="311">
|
<img src="img/clipo-signup1.png" alt="clipo" width="311">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-show="createStep == 'email'">
|
<div ng-show="createStep == 'email'">
|
||||||
<div class="clipo" ng-if="useLocalstorage">
|
<div class="clipo" ng-if="useLocalstorage && !hideForWP" >
|
||||||
<img src="img/clipo-signup2-1.png" alt="clipo" width="373">
|
<img src="img/clipo-signup2-1.png" alt="clipo" width="373">
|
||||||
</div>
|
</div>
|
||||||
<div class="clipo" ng-if="!useLocalstorage">
|
<div class="clipo" ng-if="!useLocalstorage && !hideForWP">
|
||||||
<img src="img/clipo-signup2.png" alt="clipo" width="373">
|
<img src="img/clipo-signup2.png" alt="clipo" width="373">
|
||||||
</div>
|
</div>
|
||||||
<h2 ng-if="!useLocalstorage"> Creating in the cloud </h2>
|
<h2 ng-if="!useLocalstorage" ng-hide="hideForWP"> Creating in the cloud </h2>
|
||||||
<h2 ng-if="useLocalstorage"> Creating on this device </h2>
|
<h2 ng-if="useLocalstorage" ng-hide="hideForWP"> Creating on this device </h2>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-show="createStep == 'pass'">
|
<div ng-show="createStep == 'pass'">
|
||||||
<div class="clipo">
|
<div class="clipo" ng-hide="hideForWP">
|
||||||
<img src="img/clipo-signup3.png" alt="clipo" width="380">
|
<img src="img/clipo-signup3.png" alt="clipo" width="380">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2 ng-if="useLocalstorage"> Creating on this device </h2>
|
<h2 ng-if="useLocalstorage" ng-hide="hideForWP"> Creating on this device </h2>
|
||||||
<h2 ng-if="!useLocalstorage"> Creating in the cloud </h2>
|
<h2 ng-if="!useLocalstorage" ng-hide="hideForWP"> Creating in the cloud </h2>
|
||||||
<div class="text-gray text-center m20b">{{userOrEmail}}</div>
|
<div class="text-gray text-center m20b" ng-hide="hideForWP">{{userOrEmail}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="box-notification" ng-show="error && !passwordStrength">
|
<div class="box-notification" ng-show="error && !passwordStrength">
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
|
|
||||||
<form ng-show="createStep == 'email'" name="emailForm" ng-submit="setEmailOrUsername(emailForm)" novalidate>
|
<form ng-show="createStep == 'email'" name="emailForm" ng-submit="setEmailOrUsername(emailForm)" novalidate>
|
||||||
<div class="input" ng-if="useEmail">
|
<div class="input" ng-if="useEmail">
|
||||||
<input type="email" ng-model="email" class="form-control fi-email" name="email" placeholder="Email" required auto-focus="!isMobile">
|
<input type="email" ng-model="email" class="form-control fi-email" name="email" placeholder="Email" required auto-focus="!isMobile" ng-focus="formFocus()">
|
||||||
<i class="icon-email"></i>
|
<i class="icon-email"></i>
|
||||||
<div class="icon-input" ng-if="useEmail">
|
<div class="icon-input" ng-if="useEmail">
|
||||||
<span translate class="has-error size-12" ng-show="emailForm.email.$invalid &&
|
<span translate class="has-error size-12" ng-show="emailForm.email.$invalid &&
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input" ng-if="!useEmail">
|
<div class="input" ng-if="!useEmail">
|
||||||
<input type="text" ng-model="username" class="form-control fi-user" name="username" placeholder="Username" required auto-focus>
|
<input type="text" ng-model="username" class="form-control fi-user" name="username" placeholder="Username" required auto-focus="!isMobile" ng-focus="formFocus()">
|
||||||
<i class="icon-person"></i>
|
<i class="icon-person"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -149,10 +149,13 @@
|
||||||
<form ng-show="createStep == 'pass'" name="passForm" ng-submit="createProfile(passForm)" novalidate>
|
<form ng-show="createStep == 'pass'" name="passForm" ng-submit="createProfile(passForm)" novalidate>
|
||||||
|
|
||||||
<div class="box-notification" ng-show="passwordStrength">
|
<div class="box-notification" ng-show="passwordStrength">
|
||||||
<div class="box-icon" style="background-color:{{passwordStrength.color}}">
|
<!-- if you change this, check it on WP...-->
|
||||||
<i class="fi-x size-24" ng-if="passwordStrength.strength< minPasswordStrength"></i>
|
<div class="box-icon" ng-if="passwordStrength.strength< minPasswordStrength" style="background-color:#dd514c">
|
||||||
<i class="fi-check size-24" ng-if="passwordStrength.strength >= minPasswordStrength"></i>
|
<i class="fi-x size-24"></i>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="box-icon" ng-if="passwordStrength.strength >= minPasswordStrength" style="background-color:#16A085">
|
||||||
|
<i class="fi-check size-24"></i>
|
||||||
|
</div>
|
||||||
<span class="size-14" >
|
<span class="size-14" >
|
||||||
Password Strength: {{passwordStrength.message}}
|
Password Strength: {{passwordStrength.message}}
|
||||||
</span>
|
</span>
|
||||||
|
@ -160,13 +163,13 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input id="password" type="password" ng-model="$parent.password" class="form-control" name="password" placeholder="{{'Choose a password'|translate}}" check-strength="passwordStrength" >
|
<input id="password" type="password" ng-model="$parent.password" class="form-control" name="password" placeholder="{{'Choose a password'|translate}}" check-strength="passwordStrength" ng-focus="formFocus()" >
|
||||||
<i class="icon-locked"></i>
|
<i class="icon-locked"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input type="password" ng-model="repeatpassword" class="input form-control" name="repeatpassword" placeholder="{{'Repeat password'|translate}}" match="password" required>
|
<input type="password" ng-model="repeatpassword" class="input form-control" name="repeatpassword" placeholder="{{'Repeat password'|translate}}" match="password" required ng-focus="formFocus()">
|
||||||
<i class="icon-locked"></i>
|
<i class="icon-locked"></i>
|
||||||
<div class="icon-input">
|
<div class="icon-input">
|
||||||
<span translate class="has-error size-12" ng-show="passForm.repeatpassword.$dirty &&
|
<span translate class="has-error size-12" ng-show="passForm.repeatpassword.$dirty &&
|
||||||
|
@ -198,7 +201,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="large-4 large-centered medium-6 medium-centered columns m20b" ng-show="!$root.starting && askForPin">
|
<div class="large-4 large-centered medium-6 medium-centered columns m20b" ng-show="!$root.starting && askForPin">
|
||||||
<div class="clipo">
|
<div class="clipo" ng-hide="hideForWP">
|
||||||
<img src="img/clipo-pin.png" alt="clipo" width="380">
|
<img src="img/clipo-pin.png" alt="clipo" width="380">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -212,31 +215,29 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form name="setPinForm" novalidate>
|
<form name="setPinForm" novalidate>
|
||||||
<div class="input" ng-show="askForPin == 1">
|
<div class="input" ng-if="askForPin == 1">
|
||||||
<input id="newpin" type="tel" ng-model="newpin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="PIN" name="newpin" required show-focus="askForPin == 1">
|
<input id="newpin" type="tel" ng-model="newpin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="PIN" name="newpin" required show-focus="askForPin == 1 && !isWindowsPhoneApp" ng-focus="formFocus()">
|
||||||
<i class="icon-locked"></i>
|
<i class="icon-locked" ng-hide="isWindowsPhoneApp"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="input" ng-show="askForPin == 2">
|
<div class="input" ng-if="askForPin == 2">
|
||||||
<input id="repeatpin" type="tel" ng-model="repeatpin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="Confirm your PIN" name="repeatpin" required show-focus="askForPin == 2">
|
<input id="repeatpin" type="tel" ng-model="repeatpin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="Confirm your PIN" name="repeatpin" required show-focus="askForPin == 2 && !isWindowsPhoneApp" ng-focus="formFocus()">
|
||||||
<i class="icon-locked"></i>
|
<i class="icon-locked" ng-hide="isWindowsPhoneApp"></i>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="box-setup-footer row collapse">
|
||||||
<div class="box-setup-footer row collapse">
|
<div class="large-6 medium-6 small-6 columns">
|
||||||
<div class="large-6 medium-6 small-6 columns">
|
<a class="button secondary radius m0" ng-click="createDefaultWallet()">
|
||||||
<a class="button secondary radius m0" ng-click="createDefaultWallet()">
|
<span translate>Skip</span>
|
||||||
<span translate>Skip</span>
|
</a>
|
||||||
</a>
|
</div>
|
||||||
|
<div class="large-6 medium-6 small-6 columns text-right">
|
||||||
|
<button translate ng-click="createPin(setPinForm.repeatpin.$modelValue)" class="button primary radius expand m0"
|
||||||
|
ng-disabled="setPinForm.$invalid || error">
|
||||||
|
OK
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="large-6 medium-6 small-6 columns text-right">
|
|
||||||
<button translate ng-click="createPin(setPinForm.repeatpin.$modelValue)" class="button primary radius expand m0"
|
|
||||||
ng-disabled="setPinForm.$invalid || error">
|
|
||||||
OK
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
</form>
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="large-4 large-centered medium-6 medium-centered columns" ng-show="!$root.starting">
|
<div class="large-4 large-centered medium-6 medium-centered columns" ng-show="!$root.starting">
|
||||||
<div class="logo-setup" ng-show="!$root.iden">
|
<div class="logo-setup" ng-show="!$root.iden && !hideForWP">
|
||||||
<img src="img/logo-negative-beta.svg" alt="Cop ay" width="100">
|
<img src="img/logo-negative-beta.svg" alt="Cop ay" width="100">
|
||||||
<div ng-include="'views/includes/version.html'"></div>
|
<div ng-include="'views/includes/version.html'"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -38,11 +38,11 @@
|
||||||
|
|
||||||
<form name="setPinForm" ng-model="setPinForm" novalidate>
|
<form name="setPinForm" ng-model="setPinForm" novalidate>
|
||||||
<div class="input" ng-show="askForPin == 1">
|
<div class="input" ng-show="askForPin == 1">
|
||||||
<input id="newpin" type="tel" ng-model="newpin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="PIN" name="newpin" required show-focus="askForPin == 1">
|
<input id="newpin" type="tel" ng-model="newpin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="PIN" name="newpin" required show-focus="askForPin == 1 && !isWindowsPhoneApp" ng-focus="formFocus()">
|
||||||
<i class="icon-locked"></i>
|
<i class="icon-locked"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="input" ng-show="askForPin == 2">
|
<div class="input" ng-show="askForPin == 2">
|
||||||
<input id="repeatpin" type="tel" ng-model="repeatpin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="Confirm your PIN" name="repeatpin" required show-focus="askForPin == 2">
|
<input id="repeatpin" type="tel" ng-model="repeatpin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="Confirm your PIN" name="repeatpin" required show-focus="askForPin == 2 && !isWindowsPhoneApp" ng-focus="formFocus()">
|
||||||
<i class="icon-locked"></i>
|
<i class="icon-locked"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-if='$root.hasPin && !$root.iden'>
|
<div ng-if='$root.hasPin && !$root.iden'>
|
||||||
<div class="clipo">
|
<div class="clipo" ng-hide="hideForWP">
|
||||||
<img src="img/clipo-pin-enter.png" alt="clipo" width="300">
|
<img src="img/clipo-pin-enter.png" alt="clipo" width="300">
|
||||||
</div>
|
</div>
|
||||||
<form name="pinForm" novalidate>
|
<form name="pinForm" novalidate>
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input id="pin" type="tel" ng-model="pin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="Pin number" name="pin" required>
|
<input id="pin" type="tel" ng-model="pin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="Pin number" name="pin" required ng-focus="formFocus()">
|
||||||
<i class="icon-locked"></i>
|
<i class="icon-locked"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-if='!$root.hasPin && !askForPin && !$root.iden'>
|
<div ng-if='!$root.hasPin && !askForPin && !$root.iden'>
|
||||||
<div class="clipo">
|
<div class="clipo" ng-hide="hideForWP">
|
||||||
<img src="img/clipo-signin.png" alt="clipo" width="310">
|
<img src="img/clipo-signin.png" alt="clipo" width="310">
|
||||||
</div>
|
</div>
|
||||||
<div class="p10 m20b size-14 bg-success text-white" ng-show="anyWallet && !confirmedEmail && !error">
|
<div class="p10 m20b size-14 bg-success text-white" ng-show="anyWallet && !confirmedEmail && !error">
|
||||||
|
@ -131,24 +131,28 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input" ng-if="!usingLocalStorage">
|
<div class="input" ng-if="!usingLocalStorage">
|
||||||
<input type="email" ng-model="email" class="form-control" name="email" placeholder="Email" required show-focus="!isMobile">
|
<input type="email" ng-model="email" class="form-control" name="email" placeholder="Email" required show-focus="!isMobile" ng-focus="formFocus()">
|
||||||
<i class="icon-email"></i>
|
<i class="icon-email"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input" ng-if="usingLocalStorage">
|
<div class="input" ng-if="usingLocalStorage">
|
||||||
<input type="text" ng-model="email" class="form-control" name="email" placeholder="Username" required show-focus="!isMobile">
|
<input type="text" ng-model="email" class="form-control" name="email" placeholder="Username" required show-focus="!isMobile" ng-focus="formFocus()">
|
||||||
<i class="icon-person"></i>
|
<i class="icon-person"></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input type="password" ng-model="password" class="form-control" name="password" placeholder="Password" required>
|
<input type="password" ng-model="password" class="form-control" name="password" placeholder="Password" required ng-focus="formFocus()">
|
||||||
<i class="icon-locked"></i>
|
<i class="icon-locked"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<button translate type="submit" class="button primary radius expand m0" ng-disabled="loginForm.$invalid">
|
<button translate type="submit" class="button primary radius expand m0" ng-disabled="loginForm.$invalid">
|
||||||
Sign in
|
Sign in
|
||||||
|
{{hideAll}}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
aasdas
|
||||||
<div ng-if="usingLocalStorage" class="text-gray size-12 m10v">
|
<div ng-if="usingLocalStorage" class="text-gray size-12 m10v">
|
||||||
* Using this device storage. Change to cloud storage on 'settings'.
|
* Using this device storage. Change to cloud storage on 'settings'.
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="send" ng-controller="SendController" ng-init="init()">
|
<div class="send" ng-controller="SendController" ng-init="init()">
|
||||||
|
|
||||||
<div class="row hide-for-large-up" >
|
<div class="row hide-for-large-up" ng-hide="$root.wpInputFocused" >
|
||||||
<div class="large-10 medium-10 small-9 columns">
|
<div class="large-10 medium-10 small-9 columns">
|
||||||
<h1>{{$root.title}}</h1>
|
<h1>{{$root.title}}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
@ -29,11 +29,27 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" ng-show="!fetchingURL">
|
<div class="row" ng-show="creatingTX">
|
||||||
|
<div class="large-12 columns">
|
||||||
|
<div class="panel">
|
||||||
|
<div class="box-notification">
|
||||||
|
<div class="box-icon secondary">
|
||||||
|
<i class="fi-bitcoin-circle icon-rotate spinner size-24"></i>
|
||||||
|
</div>
|
||||||
|
<span class="text-secondary size-14">
|
||||||
|
Creating Transaction...
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="row" ng-show="!fetchingURL && !creatingTX">
|
||||||
<div class="large-8 large-centered columns">
|
<div class="large-8 large-centered columns">
|
||||||
<form name="sendForm" ng-submit="submitForm(sendForm)" novalidate>
|
<form name="sendForm" ng-submit="submitForm(sendForm)" novalidate>
|
||||||
<div class="panel">
|
<div class="panel">
|
||||||
<div class="box-notification" ng-show="error">
|
<div class="box-notification" ng-show="error && !hideForWP ">
|
||||||
<div class="box-icon error">
|
<div class="box-icon error">
|
||||||
<i class="fi-x size-24"></i>
|
<i class="fi-x size-24"></i>
|
||||||
</div>
|
</div>
|
||||||
|
@ -52,10 +68,10 @@
|
||||||
<a class="close-notification text-success" ng-click="success=null">×</a>
|
<a class="close-notification text-success" ng-click="success=null">×</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-if="!_merchantData">
|
<div ng-if="!_merchantData" ng-hide="hideAddress">
|
||||||
<div class="row collapse">
|
<div class="row collapse">
|
||||||
|
|
||||||
<label for="address" class="left">
|
<label for="address" class="left" >
|
||||||
<span translate>To</span>
|
<span translate>To</span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
|
@ -73,13 +89,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input type="text" id="address" name="address" ng-disabled="loading || lockAddress" placeholder="{{'Bitcoin address'|translate}}" ng-model="_address" valid-address required>
|
<input type="text" id="address" name="address" ng-disabled="loading || lockAddress" placeholder="{{'Bitcoin address'|translate}}" ng-model="_address" valid-address required ng-focus="formFocus('address')" ng-blur="formFocus(false)">
|
||||||
<a class="postfix" ng-click="openAddressBook()"><i class="fi-address-book size-24"></i></a>
|
<a class="postfix" ng-click="openAddressBook()"><i class="fi-address-book size-24"></i></a>
|
||||||
</div>
|
</div>
|
||||||
<div id="scanner" class="row" ng-if="showScanner" ng-include="'views/includes/scanner.html'">
|
<div id="scanner" class="row" ng-if="showScanner" ng-include="'views/includes/scanner.html'">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div ng-show="_merchantData">
|
<div ng-show="_merchantData && !hideAddress">
|
||||||
<div class="row collapse" ng-click="openPPModal(_merchantData)">
|
<div class="row collapse" ng-click="openPPModal(_merchantData)">
|
||||||
|
|
||||||
<label for="domain">
|
<label for="domain">
|
||||||
|
@ -93,7 +109,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row" ng-init="showAlternative = false">
|
<div class="row" ng-init="showAlternative = false" ng-hide="hideAmount">
|
||||||
<div class="large-12 medium-12 columns">
|
<div class="large-12 medium-12 columns">
|
||||||
<div class="m5b right" ng-hide="sendForm.amount.$pristine">
|
<div class="m5b right" ng-hide="sendForm.amount.$pristine">
|
||||||
<span translate class="has-error right size-12" ng-show="sendForm.amount.$invalid">
|
<span translate class="has-error right size-12" ng-show="sendForm.amount.$invalid">
|
||||||
|
@ -110,7 +126,7 @@
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input type="number" id="amount" ng-disabled="loading || lockAmount" name="amount" placeholder="{{'Amount'|translate}}" ng-minlength="0.00000001" ng-maxlength="10000000000" ng-model="_amount" valid-amount required autocomplete="off">
|
<input type="number" id="amount" ng-disabled="loading || lockAmount" name="amount" placeholder="{{'Amount'|translate}}" ng-minlength="0.00000001" ng-maxlength="10000000000" ng-model="_amount" valid-amount required autocomplete="off" ng-focus="formFocus('amount')" ng-blur="formFocus(false)">
|
||||||
<a class="postfix" ng-click="showAlternative = true">{{$root.wallet.settings.unitName}}</a>
|
<a class="postfix" ng-click="showAlternative = true">{{$root.wallet.settings.unitName}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -118,7 +134,7 @@
|
||||||
<label for="alternative"><span translate>Amount in</span> {{ alternativeName }}
|
<label for="alternative"><span translate>Amount in</span> {{ alternativeName }}
|
||||||
</label>
|
</label>
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input type="number" id="alternative" ng-disabled="loading || !isRateAvailable || lockAmount" name="alternative" placeholder="{{'Amount'|translate}}" ng-model="_alternative" requiredautocomplete="off">
|
<input type="number" id="alternative" ng-disabled="loading || !isRateAvailable || lockAmount" name="alternative" placeholder="{{'Amount'|translate}}" ng-model="_alternative" requiredautocomplete="off" ng-focus="formFocus('amount')" ng-blur="formFocus(false)">
|
||||||
<a class="postfix" ng-click="showAlternative = false"> {{ alternativeName }}</a>
|
<a class="postfix" ng-click="showAlternative = false"> {{ alternativeName }}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -131,8 +147,8 @@
|
||||||
<small translate class="has-error" ng-show="sendForm.comment.$invalid && !sendForm.comment.$pristine">too long!</small>
|
<small translate class="has-error" ng-show="sendForm.comment.$invalid && !sendForm.comment.$pristine">too long!</small>
|
||||||
</label>
|
</label>
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<textarea id="comment" ng-disabled="loading" name="comment" ng-if="isShared" placeholder="Leave a private message to your copayers" ng-maxlength="100" ng-model="_comment"></textarea>
|
<textarea id="comment" ng-disabled="loading" name="comment" ng-if="isShared" placeholder="Leave a private message to your copayers" ng-maxlength="100" ng-model="_comment" ng-focus="formFocus('msg')" ng-blur="formFocus(false)"></textarea>
|
||||||
<textarea id="comment" ng-disabled="loading" name="comment" ng-if="!isShared" placeholder="Add a private comment to identify the transaction" ng-maxlength="100" ng-model="_comment"></textarea>
|
<textarea id="comment" ng-disabled="loading" name="comment" ng-if="!isShared" placeholder="Add a private comment to identify the transaction" ng-maxlength="100" ng-model="_comment" ng-focus="formFocus('msg')" ng-blur="formFocus(false)"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|