|
9 | 9 | * @param {Storage} storage |
10 | 10 | * @return {ComponentWarningPlate} |
11 | 11 | */ |
12 | | - const controller = function ($scope, modalManager, utils, user, storage) { |
| 12 | + const controller = function ($scope, modalManager, utils, user, storage, configService) { |
13 | 13 |
|
14 | 14 | class ComponentWarningPlate { |
15 | 15 |
|
|
37 | 37 | * @type {string} |
38 | 38 | */ |
39 | 39 | newDexLink = WavesApp.network.wavesExchangeLink; |
| 40 | + isDesktop = WavesApp.isDesktop(); |
40 | 41 |
|
41 | 42 | constructor() { |
42 | 43 | this._initCanMoveAccounts(); |
|
51 | 52 | user.logoutSignal.on(this._initCanMoveAccounts, this); |
52 | 53 |
|
53 | 54 | utils.startTimer({ year: 2019, month: 12, day: 2, hours: 15 }, this._setTime.bind(this), 1000); |
| 55 | + |
| 56 | + this._getDistUrl(); |
54 | 57 | } |
55 | 58 |
|
56 | 59 | showMovingModal() { |
|
102 | 105 | $scope.$apply(); |
103 | 106 | }); |
104 | 107 | } |
| 108 | + _getDistUrl() { |
| 109 | + configService.configReadyPromise.then(() => { |
| 110 | + const urls = configService.get('DESKTOP_URLS'); |
| 111 | + this.distUrl = new URL(urls[WavesApp.platform]); |
| 112 | + }); |
| 113 | + } |
105 | 114 |
|
106 | 115 | } |
107 | 116 |
|
108 | 117 | return new ComponentWarningPlate(); |
109 | 118 |
|
110 | 119 | }; |
111 | 120 |
|
112 | | - controller.$inject = ['$scope', 'modalManager', 'utils', 'user', 'storage']; |
| 121 | + controller.$inject = ['$scope', 'modalManager', 'utils', 'user', 'storage', 'configService']; |
113 | 122 |
|
114 | 123 | angular.module('app').component('wWarningPlate', { |
115 | 124 | templateUrl: 'modules/app/directives/componentWarningPlate/componentWarningPlate.html', |
|
0 commit comments