refactor isCordova

This commit is contained in:
Matias Alejo Garcia 2015-10-07 12:17:13 -03:00
commit 1e55e465ca
8 changed files with 12 additions and 17 deletions

View file

@ -68,14 +68,14 @@
<button class="black round expand m0" ng-click="backup.downloadWalletBackup()" <button class="black round expand m0" ng-click="backup.downloadWalletBackup()"
ng-disabled="(!backup.password || backup.password != backup.repeatpassword)" ng-disabled="(!backup.password || backup.password != backup.repeatpassword)"
ng-style="{'background-color':index.backgroundColor}" ng-style="{'background-color':index.backgroundColor}"
ng-show="!backup.isSafari && !backup.isCordova"><i class="fi-download"></i> ng-show="!index.isSafari && !index.isCordova"><i class="fi-download"></i>
<span translate>Download</span></button> <span translate>Download</span></button>
<button class="black round expand m0" ng-click="backup.viewWalletBackup()" <button class="black round expand m0" ng-click="backup.viewWalletBackup()"
ng-disabled="(!backup.password || backup.password != backup.repeatpassword)" ng-disabled="(!backup.password || backup.password != backup.repeatpassword)"
ng-style="{'background-color':index.backgroundColor}" ng-style="{'background-color':index.backgroundColor}"
ng-show="backup.isSafari && !backup.isCordova"><i class="fi-eye"></i> ng-show="index.isSafari && !index.isCordova"><i class="fi-eye"></i>
<span translate>View</span></button> <span translate>View</span></button>
<div ng-show="backup.isCordova"> <div ng-show="index.isCordova">
<h4 translate>Export options</h4> <h4 translate>Export options</h4>
<button class="black round expand" ng-disabled="(!backup.password || backup.password != backup.repeatpassword)" <button class="black round expand" ng-disabled="(!backup.password || backup.password != backup.repeatpassword)"
ng-style="{'background-color':index.backgroundColor}" ng-style="{'background-color':index.backgroundColor}"

View file

@ -112,7 +112,7 @@
</span> </span>
</div> </div>
<div ng-show="!import.isSafari && !import.isCordova" class="line-b m10b"> <div ng-show="!index.isSafari && !index.isCordova" class="line-b m10b">
<label for="backupFile"> <label for="backupFile">
<span translate>Choose a backup file from your computer</span> <i class="fi-laptop"></i> <span translate>Choose a backup file from your computer</span> <i class="fi-laptop"></i>
</label> </label>
@ -120,7 +120,7 @@
name="backupFile" ng-model="import.backupFile" ng-file-select> name="backupFile" ng-model="import.backupFile" ng-file-select>
</div> </div>
<div ng-show="import.isSafari || import.isCordova"> <div ng-show="index.isSafari || index.isCordova">
<label for="backupText"> <label for="backupText">
<span translate>Paste the backup plain text code</span> <i class="fi-clipboard"></i> <span translate>Paste the backup plain text code</span> <i class="fi-clipboard"></i>
</label> </label>

View file

@ -9,7 +9,7 @@
<div class="content p20v" ng-controller="preferencesLogs as logs"> <div class="content p20v" ng-controller="preferencesLogs as logs">
<div class="row columns large-centered medium-centered"> <div class="row columns large-centered medium-centered">
<button class="black round small expand" ng-show="logs.isCordova" ng-style="{'background-color':index.backgroundColor}" ng-click="logs.sendLogs()"><i class="fi-mail"></i> <button class="black round small expand" ng-show="index.isCordova" ng-style="{'background-color':index.backgroundColor}" ng-click="logs.sendLogs()"><i class="fi-mail"></i>
<span translate>Send by email</span> <span translate>Send by email</span>
</button> </button>

View file

@ -1,9 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('backupController', angular.module('copayApp.controllers').controller('backupController',
function($rootScope, $scope, $timeout, backupService, profileService, isMobile, isCordova, notification, go, gettext, gettextCatalog) { function($rootScope, $scope, $timeout, backupService, profileService, isMobile, notification, go, gettext, gettextCatalog) {
this.isSafari = isMobile.Safari();
this.isCordova = isCordova;
this.error = null; this.error = null;
this.success = null; this.success = null;

View file

@ -1,11 +1,10 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('importController', angular.module('copayApp.controllers').controller('importController',
function($scope, $rootScope, $location, $timeout, $log, profileService, notification, go, isMobile, sjcl, gettext, lodash, ledger, trezor) { function($scope, $rootScope, $location, $timeout, $log, profileService, notification, go, sjcl, gettext, lodash, ledger, trezor) {
var self = this; var self = this;
this.isSafari = isMobile.Safari();
var reader = new FileReader(); var reader = new FileReader();
window.ignoreMobilePause = true; window.ignoreMobilePause = true;

View file

@ -1,9 +1,10 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, lodash, go, profileService, configService, isCordova, rateService, storageService, addressService, gettext, amMoment, nodeWebkit, addonManager, feeService, isChromeApp, bwsError, txFormatService, uxLanguage, $state, glideraService) { angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, lodash, go, profileService, configService, isCordova, rateService, storageService, addressService, gettext, amMoment, nodeWebkit, addonManager, feeService, isChromeApp, bwsError, txFormatService, uxLanguage, $state, glideraService, isMobile) {
var self = this; var self = this;
self.isCordova = isCordova; self.isCordova = isCordova;
self.isChromeApp = isChromeApp; self.isChromeApp = isChromeApp;
self.isSafari = isMobile.Safari();
self.onGoingProcess = {}; self.onGoingProcess = {};
self.limitHistory = 5; self.limitHistory = 5;

View file

@ -1,9 +1,7 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('preferencesBwsUrlController', angular.module('copayApp.controllers').controller('preferencesBwsUrlController',
function($scope,$log, configService, isMobile, isCordova, go, applicationService ) { function($scope,$log, configService, go, applicationService ) {
this.isSafari = isMobile.Safari();
this.isCordova = isCordova;
this.error = null; this.error = null;
this.success = null; this.success = null;

View file

@ -1,9 +1,8 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('preferencesLogs', angular.module('copayApp.controllers').controller('preferencesLogs',
function(historicLog, isCordova) { function(historicLog) {
this.logs = historicLog.get(); this.logs = historicLog.get();
this.isCordova = isCordova;
this.sendLogs = function() { this.sendLogs = function() {
var body = 'Copay Session Logs\n Be careful, this could contain sensitive private data\n\n'; var body = 'Copay Session Logs\n Be careful, this could contain sensitive private data\n\n';