Fix topbar for mobile

This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-02 13:00:38 -03:00
parent 95e29aed9a
commit f8fddd2431
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
12 changed files with 18 additions and 63 deletions

View File

@ -21,9 +21,8 @@
<preference name="AutoHideSplashScreen" value="false" />
<preference name="FadeSplashScreen" value="true" />
<preference name="FadeSplashScreenDuration" value="1" />
<preference name="BackgroundColor" value="#2C3E50" />
<preference name="StatusBarOverlaysWebView" value="false" />
<preference name="StatusBarBackgroundColor" value="#2C3E50" />
<preference name="StatusBarOverlaysWebView" value="true" />
<preference name="StatusBarBackgroundColor" value="#1e3186" />
<preference name="StatusBarStyle" value="lightcontent" />
<preference name="BackupWebStorage" value="none"/>
<preference name="windows-target-version" value="8.1"/>

View File

@ -6,7 +6,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" type="text/css" href="css/ionic.min.css">
<link rel="stylesheet" type="text/css" href="css/copay.css">
<title>{{appConfig.nameCase}} - {{appConfig.description}}</title>
<link rel="shortcut icon" href="img/favicon.ico">

View File

@ -1,7 +1,7 @@
<ion-view id="onboarding-backup-request" class="onboarding">
<ion-content ng-controller="backupRequestController">
<div class="row">
<img src="../../img/onboarding-warning.svg" class="col col-75 warning">
<img src="img/onboarding-warning.svg" class="col col-75 warning">
</div>
<div class="row text-center">
<h3 translate class="col-75 col">

View File

@ -18,7 +18,7 @@
</p>
</div>
<div class="row">
<img src="../../img/onboarding-backup-warning.svg" class="col col-60">
<img src="img/onboarding-backup-warning.svg" class="col col-60">
</div>
<div class="row text-center">
<p class="col col-60">

View File

@ -8,7 +8,7 @@
</ion-nav-bar>
<ion-content>
<div class="row">
<img src="../../img/onboarding-success.svg" class="col col-75" id="success-image" />
<img src="img/onboarding-success.svg" class="col col-75" id="success-image" />
</div>
<div class="row text-center">
<h3 translate class="col">Wallet Created</h3>

View File

@ -10,7 +10,7 @@
</span>
<button class="button button-block button-positive" ng-click="allowNotif()" translate>Allow notifications</button>
<button class="button button-block button-light" href ui-sref="onboarding.requestBackup" translate>Not now</button>
<button class="button button-block button-light" href ui-sref="onboarding.backupRequest" translate>Not now</button>
</div>
</ion-content>
</ion-view>

View File

@ -2,12 +2,12 @@
<ion-nav-bar class="bar-stable">
<ion-nav-title></ion-nav-title>
<ion-nav-buttons side="primary">
<button class="button no-border" ng-click="goBack()">
<button class="button back-button no-border" ng-click="goBack()">
<i class="icon ion-ios-arrow-thin-left"></i>
</button>
</ion-nav-buttons>
<ion-nav-buttons side="secondary">
<button class="button no-border" ng-show="data.index == 0" ng-click="createDefaultWallet()">
<button class="button back-button no-border" ng-show="data.index == 0" ng-click="createDefaultWallet()">
{{'Skip' | translate}}
</button>
</ion-nav-buttons>

View File

@ -3,7 +3,7 @@
<qr-scanner id="shopping-24" on-scan="goImport(data)"></qr-scanner>
<div class="text-center">
<div class="row">
<img src='../../img/bitpay-logo.svg' class="logo col col-50" />
<img src='img/bitpay-logo.svg' class="logo col col-50" />
</div>
<div class="row">
<p translate class="text-center col col-60">

View File

@ -30,4 +30,8 @@ angular.module('copayApp.controllers').controller('collectEmailController', func
});
});
};
$scope.onboardingMailSkip = function() {
$state.go('onboarding.backupRequest');
};
});

View File

@ -30,9 +30,6 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
$scope.glideraEnabled = config.glidera.enabled;
$scope.coinbaseEnabled = config.coinbase.enabled;
$scope.pushNotifications = config.pushNotifications.enabled;
if (isCordova && StatusBar.isVisible) {
StatusBar.backgroundColorByHexString("#4B6178");
}
$scope.otherWallets = lodash.filter(profileService.getWallets(self.network), function(w) {
return w.id != self.walletId;
});

View File

@ -254,12 +254,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/add',
views: {
'tab-home': {
templateUrl: 'views/add.html',
controller: function(platformInfo) {
if (platformInfo.isCordova && StatusBar.isVisible) {
StatusBar.backgroundColorByHexString("#4B6178");
}
}
templateUrl: 'views/add.html'
}
}
})
@ -807,54 +802,16 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
})
.run(function($rootScope, $state, $location, $log, $timeout, $ionicHistory, $ionicPlatform, lodash, platformInfo, profileService, uxLanguage, gettextCatalog, openURLService) {
if (platformInfo.isCordova) {
if (screen.width < 768) {
screen.lockOrientation('portrait');
} else {
window.addEventListener("orientationchange", function() {
var leftMenuWidth = document.querySelector("ion-side-menu[side='left']").clientWidth;
if (screen.orientation.includes('portrait')) {
// Portrait
document.querySelector("ion-side-menu-content").style.width = (screen.width - leftMenuWidth) + "px";
} else {
// Landscape
document.querySelector("ion-side-menu-content").style.width = (screen.height - leftMenuWidth) + "px";
}
});
}
} else {
if (screen.width >= 768) {
window.addEventListener('resize', lodash.throttle(function() {
$rootScope.$emit('Local/WindowResize');
}, 100));
}
}
uxLanguage.init();
openURLService.init();
$ionicPlatform.ready(function() {
if (platformInfo.isCordova) {
window.addEventListener('native.keyboardhide', function() {
$timeout(function() {
$rootScope.shouldHideMenuBar = false; //show menu bar when keyboard is hidden with back button action on send screen
}, 100);
});
window.addEventListener('native.keyboardshow', function() {
$timeout(function() {
$rootScope.shouldHideMenuBar = true; //hide menu bar when keyboard opens with back button action on send screen
}, 300);
});
if (window.cordova && window.cordova.plugins && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
StatusBar.styleLightContent();
}
$ionicPlatform.registerBackButtonAction(function(e) {
@ -873,8 +830,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}, 5000);
}
e.preventDefault();
},
101);
}, 101);
$ionicPlatform.on('pause', function() {
// Nothing to do
@ -890,7 +846,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
setTimeout(function() {
navigator.splashscreen.hide();
}, 1000);
}, 500);
}

View File

@ -7,7 +7,7 @@
#shopping-24 {
content: url("../img/onboarding-welcome-shopping24.png");
position: absolute;
top: 2%;
top: 5%;
right: 5%;
width: 35px;
height: auto;
@ -17,7 +17,7 @@
@include center-block();
}
.logo {
margin-top: 15rem;
margin-top: 13rem;
}
button {
@include center-block(1rem);