mirror of https://github.com/BTCPrivate/copay.git
support wide screens
This commit is contained in:
parent
27f3ebf376
commit
2c300d422e
|
@ -1,5 +1,5 @@
|
||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<widget id="com.bitpay.copay"
|
<widget id="com.bitpay.copay"
|
||||||
version="%APP-VERSION%"
|
version="%APP-VERSION%"
|
||||||
android-versionCode="%ANDROID-VERSION-CODE%"
|
android-versionCode="%ANDROID-VERSION-CODE%"
|
||||||
ios-CFBundleVersion="%APP-VERSION%">
|
ios-CFBundleVersion="%APP-VERSION%">
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
<preference name="DisallowOverscroll" value="true"/>
|
<preference name="DisallowOverscroll" value="true"/>
|
||||||
<preference name="HideKeyboardFormAccessoryBar" value="true"/>
|
<preference name="HideKeyboardFormAccessoryBar" value="true"/>
|
||||||
<preference name="SplashScreen" value="copayscreen" />
|
<preference name="SplashScreen" value="copayscreen" />
|
||||||
<preference name="ShowSplashScreenSpinner" value="false" />
|
<preference name="ShowSplashScreenSpinner" value="false" />
|
||||||
<preference name="AutoHideSplashScreen" value="false" />
|
<preference name="AutoHideSplashScreen" value="false" />
|
||||||
<preference name="FadeSplashScreen" value="true" />
|
<preference name="FadeSplashScreen" value="true" />
|
||||||
<preference name="FadeSplashScreenDuration" value="1" />
|
<preference name="FadeSplashScreenDuration" value="1" />
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
<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"/>
|
<preference name="windows-target-version" value="8.1"/>
|
||||||
<preference name="Orientation" value="portrait" />
|
<preference name="Orientation" value="default" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
<icon src="../ios/icons/icon-small@3x.png" width="87" height="87" />
|
<icon src="../ios/icons/icon-small@3x.png" width="87" height="87" />
|
||||||
<!-- iPad Spotlight and Settings Icon -->
|
<!-- iPad Spotlight and Settings Icon -->
|
||||||
<icon src="../ios/icons/icon-50.png" width="50" height="50" />
|
<icon src="../ios/icons/icon-50.png" width="50" height="50" />
|
||||||
<icon src="../ios/icons/icon-50@2x.png" width="100" height="100" />
|
<icon src="../ios/icons/icon-50@2x.png" width="100" height="100" />
|
||||||
|
|
||||||
<!-- Splash -->
|
<!-- Splash -->
|
||||||
<splash src="../ios/splash/Default~iphone.png" width="320" height="480"/>
|
<splash src="../ios/splash/Default~iphone.png" width="320" height="480"/>
|
||||||
|
@ -71,5 +71,3 @@
|
||||||
<splash src="../ios/splash/Default-736h.png" width="1242" height="2208"/>
|
<splash src="../ios/splash/Default-736h.png" width="1242" height="2208"/>
|
||||||
</platform>
|
</platform>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -158,6 +158,9 @@ if [ ! -d $PROJECT ]; then
|
||||||
cordova plugin add cordova-plugin-android-fingerprint-auth
|
cordova plugin add cordova-plugin-android-fingerprint-auth
|
||||||
checkOK
|
checkOK
|
||||||
|
|
||||||
|
cordova plugin add cordova-plugin-screen-orientation
|
||||||
|
checkOK
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $DBGJS
|
if $DBGJS
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version='1.0' encoding='utf-8'?>
|
<?xml version='1.0' encoding='utf-8'?>
|
||||||
<widget id="com.bitpay.copay"
|
<widget id="com.bitpay.copay"
|
||||||
version="2.1.0"
|
version="2.1.0"
|
||||||
android-versionCode="109"
|
android-versionCode="109"
|
||||||
ios-CFBundleVersion="2.1.0">
|
ios-CFBundleVersion="2.1.0">
|
||||||
|
@ -17,9 +17,9 @@
|
||||||
<preference name="DisallowOverscroll" value="true"/>
|
<preference name="DisallowOverscroll" value="true"/>
|
||||||
<preference name="HideKeyboardFormAccessoryBar" value="true"/>
|
<preference name="HideKeyboardFormAccessoryBar" value="true"/>
|
||||||
<preference name="SplashScreen" value="copayscreen" />
|
<preference name="SplashScreen" value="copayscreen" />
|
||||||
<preference name="ShowSplashScreenSpinner" value="false" />
|
<preference name="ShowSplashScreenSpinner" value="false" />
|
||||||
<preference name="AutoHideSplashScreen" value="false" />
|
<preference name="AutoHideSplashScreen" value="false" />
|
||||||
<preference name="FadeSplashScreen" value="true" />
|
<preference name="FadeSplashScreen" value="true" />
|
||||||
<preference name="FadeSplashScreenDuration" value="1" />
|
<preference name="FadeSplashScreenDuration" value="1" />
|
||||||
<preference name="BackgroundColor" value="#2C3E50" />
|
<preference name="BackgroundColor" value="#2C3E50" />
|
||||||
<preference name="StatusBarOverlaysWebView" value="false" />
|
<preference name="StatusBarOverlaysWebView" value="false" />
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
<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"/>
|
<preference name="windows-target-version" value="8.1"/>
|
||||||
<preference name="Orientation" value="portrait" />
|
<preference name="Orientation" value="default" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
<icon src="../ios/icons/icon-small@3x.png" width="87" height="87" />
|
<icon src="../ios/icons/icon-small@3x.png" width="87" height="87" />
|
||||||
<!-- iPad Spotlight and Settings Icon -->
|
<!-- iPad Spotlight and Settings Icon -->
|
||||||
<icon src="../ios/icons/icon-50.png" width="50" height="50" />
|
<icon src="../ios/icons/icon-50.png" width="50" height="50" />
|
||||||
<icon src="../ios/icons/icon-50@2x.png" width="100" height="100" />
|
<icon src="../ios/icons/icon-50@2x.png" width="100" height="100" />
|
||||||
|
|
||||||
<!-- Splash -->
|
<!-- Splash -->
|
||||||
<splash src="../ios/splash/Default~iphone.png" width="320" height="480"/>
|
<splash src="../ios/splash/Default~iphone.png" width="320" height="480"/>
|
||||||
|
@ -71,5 +71,3 @@
|
||||||
<splash src="../ios/splash/Default-736h.png" width="1242" height="2208"/>
|
<splash src="../ios/splash/Default-736h.png" width="1242" height="2208"/>
|
||||||
</platform>
|
</platform>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
<ion-side-menus class="page" ng-controller="indexController as index">
|
<ion-side-menus class="page" ng-controller="indexController as index">
|
||||||
|
|
||||||
<!-- Left menu -->
|
<!-- Left menu -->
|
||||||
<ion-side-menu side="left">
|
<ion-side-menu side="left" expose-aside-when="large">
|
||||||
<div ng-include="'views/includes/sidebar.html'" ng-if="index.hasProfile"></div>
|
<div ng-include="'views/includes/sidebar.html'" ng-if="index.hasProfile"></div>
|
||||||
</ion-side-menu>
|
</ion-side-menu>
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<nav ng-controller="topbarController as topbar"
|
<nav ng-controller="topbarController as topbar"
|
||||||
class="tab-bar" ng-style="{'background-color': noColor ? '#4B6178' : index.backgroundColor}">
|
class="tab-bar" ng-style="{'background-color': noColor ? '#4B6178' : index.backgroundColor}">
|
||||||
<section class="left-small">
|
<section class="left-small">
|
||||||
<a id="hamburger" class="p10" ng-show="!goBackToState && !closeToHome && !index.noFocusedWallet"
|
<a id="hamburger" class="p10" ng-show="!goBackToState && !closeToHome && !index.noFocusedWallet && index.physicalScreenWidth < 768"
|
||||||
on-tap="index.toggleLeftMenu()"><i class="fi-list size-24"></i>
|
on-tap="index.toggleLeftMenu()"><i class="fi-list size-24"></i>
|
||||||
</a>
|
</a>
|
||||||
<a ng-show="goBackToState" ng-click="$root.go(goBackToState); goBackToState = null"><i class="icon-arrow-left3 icon-back"></i>
|
<a ng-show="goBackToState" ng-click="$root.go(goBackToState); goBackToState = null"><i class="icon-arrow-left3 icon-back"></i>
|
||||||
|
|
|
@ -18,6 +18,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
ret.historyShowMoreLimit = 10;
|
ret.historyShowMoreLimit = 10;
|
||||||
ret.isSearching = false;
|
ret.isSearching = false;
|
||||||
ret.prevState = 'walletHome';
|
ret.prevState = 'walletHome';
|
||||||
|
ret.physicalScreenWidth = ((window.innerWidth > 0) ? window.innerWidth : screen.width);
|
||||||
|
|
||||||
ret.menu = [{
|
ret.menu = [{
|
||||||
'title': gettext('Receive'),
|
'title': gettext('Receive'),
|
||||||
|
@ -1677,6 +1678,10 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
self.setTab(tab, reset);
|
self.setTab(tab, reset);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$rootScope.$on('Local/WindowResize', function() {
|
||||||
|
self.physicalScreenWidth = ((window.innerWidth > 0) ? window.innerWidth : screen.width);
|
||||||
|
});
|
||||||
|
|
||||||
$rootScope.$on('Local/NeedsConfirmation', function(event, txp, cb) {
|
$rootScope.$on('Local/NeedsConfirmation', function(event, txp, cb) {
|
||||||
|
|
||||||
function openConfirmationPopup(txp, cb) {
|
function openConfirmationPopup(txp, cb) {
|
||||||
|
|
|
@ -510,9 +510,34 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
})
|
})
|
||||||
.run(function($rootScope, $state, $location, $log, $timeout, $ionicPlatform, platformInfo, profileService, uxLanguage, go, gettextCatalog) {
|
.run(function($rootScope, $state, $location, $log, $timeout, $ionicPlatform, platformInfo, profileService, uxLanguage, go, gettextCatalog) {
|
||||||
|
|
||||||
|
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', function() {
|
||||||
|
$rootScope.$emit('Local/WindowResize');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$ionicPlatform.ready(function() {
|
$ionicPlatform.ready(function() {
|
||||||
if (platformInfo.isCordova) {
|
if (platformInfo.isCordova) {
|
||||||
|
|
||||||
|
ionic.Platform.fullScreen(true, false);
|
||||||
|
|
||||||
$ionicPlatform.registerBackButtonAction(function(event) {
|
$ionicPlatform.registerBackButtonAction(function(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
Loading…
Reference in New Issue