Remove shell dependences. Remove unnecessary plugins. Remove unnecessary directives

This commit is contained in:
Gustavo Maximiliano Cortez 2014-11-22 15:51:58 -03:00
parent a1159189ba
commit e7d8421c4d
11 changed files with 1 additions and 190 deletions

View File

@ -115,7 +115,6 @@ module.exports = function(grunt) {
vendors: {
src: [
'lib/mousetrap/mousetrap.min.js',
'js/shell.js', // shell must be loaded before moment due to the way moment loads in a commonjs env
'lib/moment/min/moment.min.js',
'lib/qrcode-generator/js/qrcode.js',
'lib/lodash/dist/lodash.js',

View File

@ -1,40 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.bitpay.copay" version="2.0.0" xmlns="http://www.w3.org/ns/widgets">
<name>Copay</name>
<description>
A secure bitcoin wallet for friends and companies.
</description>
<author email="support@bitpay.com" href="https://copay.io/">
Bitpay Inc.
</author>
<content src="index.html" />
<access origin="*" />
<preference name="loglevel" value="DEBUG" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="10000" />
<preference name="backgroundColor" value="0x2C3E50" />
<feature name="App">
<param name="android-package" value="com.bitpay.copay" />
</feature>
<feature name="WebIntent">
<param name="android-package" value="com.borismus.webintent.WebIntent" />
</feature>
<feature name="BarcodeScanner">
<param name="android-package" value="com.phonegap.plugins.barcodescanner.BarcodeScanner" />
</feature>
<feature name="Clipboard">
<param name="android-package" value="com.verso.cordova.clipboard.Clipboard" />
</feature>
<feature name="EmailComposer">
<param name="android-package" value="de.appplant.cordova.plugin.emailcomposer.EmailComposer" />
</feature>
<feature name="Toast">
<param name="android-package" value="nl.xservices.plugins.Toast" />
</feature>
<feature name="SplashScreen">
<param name="android-package" value="org.apache.cordova.splashscreen.SplashScreen" />
</feature>
<feature name="StatusBar">
<param name="android-package" onload="true" value="org.apache.cordova.statusbar.StatusBar" />
</feature>
</widget>

View File

@ -1,83 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string>icon.png</string>
<key>CFBundleIcons</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>icon-40</string>
<string>icon-small</string>
<string>icon-60</string>
<string>icon.png</string>
<string>icon@2x</string>
<string>icon-72</string>
<string>icon-72@2x</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
<key>CFBundleIcons~ipad</key>
<dict>
<key>CFBundlePrimaryIcon</key>
<dict>
<key>CFBundleIconFiles</key>
<array>
<string>icon-small</string>
<string>icon-40</string>
<string>icon-50</string>
<string>icon-76</string>
<string>icon-60</string>
<string>icon</string>
<string>icon@2x</string>
<string>icon-72</string>
<string>icon-72@2x</string>
</array>
<key>UIPrerenderedIcon</key>
<false/>
</dict>
</dict>
<key>CFBundleIdentifier</key>
<string>com.bitpay.copay</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.6.4</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>0.6.4</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSMainNibFile</key>
<string></string>
<key>NSMainNibFile~ipad</key>
<string></string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

View File

@ -29,10 +29,6 @@ angular.module('copayApp.controllers').controller('HistoryController',
$scope.downloadHistory = function() {
if (window.cordova) {
log.info('Not available on mobile');
return;
}
var w = $rootScope.wallet;
if (!w) return;

View File

@ -18,14 +18,6 @@ angular.module('copayApp.controllers').controller('ImportController',
$scope.$digest();
}
$scope.openFileDialog = function() {
if (window.cshell) {
return cshell.send('backup:import');
}
$scope.choosefile = !$scope.choosefile;
};
$scope._doImport = function(encryptedObj, password) {
updateStatus('Importing wallet - Procesing backup...');

View File

@ -46,13 +46,6 @@ angular.module('copayApp.controllers').controller('ImportProfileController',
});
};
$scope.openFileDialog = function() {
if (window.cshell) {
return cshell.send('backup:import');
}
$scope.choosefile = !$scope.choosefile;
};
$scope.getFile = function() {
// If we use onloadend, we need to check the readyState.
reader.onloadend = function(evt) {

View File

@ -25,12 +25,6 @@ angular.module('copayApp.controllers').controller('ReceiveController',
$scope.openAddressModal = function(address) {
var ModalInstanceCtrl = function($scope, $modalInstance, address) {
$scope.address = address;
$scope.isMobile = !!window.cordova;
$scope.mobileCopy = function(address) {
window.cordova.plugins.clipboard.copy(address);
window.plugins.toast.showShortBottom('Copied to clipboard');
};
$scope.cancel = function() {
$modalInstance.dismiss('cancel');

View File

@ -264,16 +264,6 @@ angular.module('copayApp.directives')
}
};
})
.directive('openExternal', function() {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.bind('click', function() {
window.open('bitcoin:' + attrs.address, '_blank');
});
}
}
})
// From https://gist.github.com/asafge/7430497
.directive('ngReallyClick', [

View File

@ -14,13 +14,4 @@ function onDeviceReady() {
}, false);
function handleBitcoinURI(url) {
if (!url) return;
window.location = '#!/uri-payment/' + url;
}
window.plugins.webintent.getUri(handleBitcoinURI);
window.plugins.webintent.onNewIntent(handleBitcoinURI);
window.handleOpenURL = handleBitcoinURI;
}

View File

@ -14,25 +14,6 @@ BackupService.prototype._download = function(ew, walletName, filename) {
type: 'text/plain;charset=utf-8'
});
// show a native save dialog if we are in the shell
// and pass the wallet to the shell to convert to node Buffer
if (window.cshell) {
return window.cshell.send('backup:download', {
name: walletName,
wallet: ew
});
}
// throw an email intent if we are in the mobile version
if (window.cordova) {
var name = wallet.name ? wallet.name + ' ' : '';
return window.plugin.email.open({
subject: 'Copay - ' + name + 'Wallet ' + 'Backup',
body: 'Here is the encrypted backup of the wallet ' + wallet.id,
attachments: ['base64:' + filename + '//' + btoa(ew)]
});
}
this.notifications.success('Backup created', 'Encrypted backup file saved');
// otherwise lean on the browser implementation

View File

@ -11,9 +11,7 @@
<div class="row show-for-large-up">
<div class="large-7 medium-9 columns">
<div class="list-addr">
<span>
<contact address="{{addr.address}}" tooltip-popup-delay="500" tooltip tooltip-placement="right">
</span>
<contact address="{{addr.address}}" tooltip-popup-delay="500" tooltip tooltip-placement="right">
<small translate class="label" ng-if="addr.isChange">change</small>
</div>
</div>