1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-06-22 09:55:55 +02:00

short body for small screens

This commit is contained in:
Kyle Spearrin 2017-08-23 09:57:04 -04:00
parent 220703a9d7
commit 26f75845bc
3 changed files with 11 additions and 3 deletions

View File

@ -1,11 +1,13 @@
angular
.module('bit.global')
.controller('mainController', function ($scope, $state, authService, toastr, i18nService, $analytics, utilsService) {
.controller('mainController', function ($scope, $state, authService, toastr, i18nService, $analytics, utilsService,
$window) {
var self = this;
self.currentYear = new Date().getFullYear();
self.animation = '';
self.lgBody = !utilsService.isFirefox();
self.shBody = $window.screen.availHeight < 600;
self.lgBody = !utilsService.isFirefox() && !self.shBody;
$scope.$on('$stateChangeSuccess', function (event, toState, toParams, fromState, fromParams) {
if (toParams.animation) {

View File

@ -95,7 +95,8 @@
<script src="app/lock/lockModule.js"></script>
<script src="app/lock/lockController.js"></script>
</head>
<body ng-controller="mainController as main" class="{{main.animation}}" ng-class="{lg: main.lgBody}">
<body ng-controller="mainController as main" class="{{main.animation}}"
ng-class="{lg: main.lgBody, sh: main.shBody }">
<div ui-view class="main-view"></div>
</body>
</html>

View File

@ -23,6 +23,11 @@ body.lg {
height: 667px !important;
}
body.sh {
width: 375px !important;
height: 500px !important;
}
.main-view {
position: absolute;
width: 100%;