Skip to content

Commit 5dad951

Browse files
author
Vusal Gakhramanov
committed
DEXW-2225: fix warning-plate
1 parent d0bec2c commit 5dad951

5 files changed

Lines changed: 35 additions & 11 deletions

File tree

‎src/index.hbs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -524,9 +524,7 @@
524524
<w-container-alert-notification type="userNotification"></w-container-alert-notification>
525525
</div>
526526

527-
<div class="warning-timer">
528-
<w-warning-plate></w-warning-plate>
529-
</div>
527+
<w-warning-plate class="warning-timer"></w-warning-plate>
530528

531529
<div class="app-preloader">
532530
<div class="progress"></div>

‎src/modules/app/directives/componentWarningPlate/ComponentWarningPlate.js‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@
88
* @param {app.utils} utils
99
* @param {User} user
1010
* @param {Storage} storage
11+
* @param {ng.IAugmentedJQuery} $element
1112
* @return {ComponentWarningPlate}
1213
*/
13-
const controller = function ($scope, $transitions, modalManager, utils, user, storage) {
14+
const controller = function ($scope, $transitions, modalManager, utils, user, storage, $element) {
1415

1516
class ComponentWarningPlate {
1617

@@ -119,6 +120,7 @@
119120
} else {
120121
this.canMoveAccounts = false;
121122
}
123+
$element.toggleClass('warning-timer_active', this.canMoveAccounts);
122124
$scope.$apply();
123125
});
124126
}
@@ -139,7 +141,7 @@
139141

140142
};
141143

142-
controller.$inject = ['$scope', '$transitions', 'modalManager', 'utils', 'user', 'storage'];
144+
controller.$inject = ['$scope', '$transitions', 'modalManager', 'utils', 'user', 'storage', '$element'];
143145

144146
angular.module('app').component('wWarningPlate', {
145147
templateUrl: 'modules/app/directives/componentWarningPlate/componentWarningPlate.html',

‎src/modules/app/directives/componentWarningPlate/componentWarningPlate.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</div>
1616
<div>
1717
<span class="warning-plate__timer-value">{{$ctrl.minutes}}</span>
18-
<span w-i18n="warningPlate.min"> m </span>
18+
<span w-i18n="warningPlate.min"> m : </span>
1919
</div>
2020
<div>
2121
<span class="warning-plate__timer-value">{{$ctrl.seconds}}</span>

‎src/modules/app/directives/componentWarningPlate/componentWarningPlate.less‎

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
w-warning-plate {
55
.warning-plate {
6+
display: block;
7+
68
&__content {
79
display: flex;
810
flex-direction: row;
@@ -95,11 +97,23 @@ w-warning-plate {
9597
}
9698
}
9799

98-
.warning-timer {
100+
.warning-timer_active {
99101
position: relative;
100102
z-index: 11;
103+
display: block;
104+
101105
&+ .ui-view {
102106
height: calc(100% ~"- 40px");
107+
108+
.main-header_new-user {
109+
top: 40px;
110+
111+
&.fixed {
112+
.main-header__header {
113+
top: 40px;
114+
}
115+
}
116+
}
103117
}
104118
}
105119

@@ -155,9 +169,19 @@ w-warning-plate {
155169
}
156170
}
157171

158-
.warning-timer {
172+
.warning-timer_active {
159173
&+ .ui-view {
160174
height: calc(100% ~"- 72px");
175+
176+
.main-header_new-user {
177+
top: 72px;
178+
179+
&.fixed {
180+
.main-header__header {
181+
top: 72px;
182+
}
183+
}
184+
}
161185
}
162186
}
163-
}
187+
}

‎src/modules/ui/directives/mainHeader/less/largeHeader/largeHeader.less‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@
165165
position: fixed;
166166
z-index: 10;
167167
width: 100%;
168-
top: 40px;
168+
top: 0;
169169
left: 0;
170170

171171
.main-header__header::after {
@@ -175,7 +175,7 @@
175175

176176
&.fixed .main-header__header {
177177
position: fixed;
178-
top: 40px;
178+
top: 0;
179179

180180
&::after {
181181
opacity: 1;

0 commit comments

Comments
 (0)