forked from wavesplatform/WavesGUI
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#205: add modal output box to get basic info from tx type 17
- Loading branch information
MrTurtle
committed
Nov 17, 2021
1 parent
e562750
commit 3356a18
Showing
9 changed files
with
154 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/modules/ui/directives/transactionInfo/types/update-asset/UpdateAssetHeader.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
/** | ||
* @return {UpdateAssetHeader} | ||
*/ | ||
const controller = function () { | ||
|
||
class UpdateAssetHeader { | ||
|
||
/** | ||
* @type {Signable} | ||
*/ | ||
signable; | ||
/** | ||
* @type {*} | ||
* @private | ||
*/ | ||
_tx; | ||
|
||
$postLink() { | ||
this._tx = this.signable.getTxData(); | ||
this.name = this._tx.name; | ||
this.description = this._tx.description; | ||
} | ||
|
||
} | ||
|
||
return new UpdateAssetHeader(); | ||
}; | ||
|
||
controller.$inject = []; | ||
|
||
angular.module('app.ui').component('wUpdateAssetHeader', { | ||
bindings: { | ||
signable: '<', | ||
isScam: '<' | ||
}, | ||
controller, | ||
templateUrl: 'modules/ui/directives/transactionInfo/types/update-asset/update-asset-header.html' | ||
}); | ||
})(); |
61 changes: 61 additions & 0 deletions
61
src/modules/ui/directives/transactionInfo/types/update-asset/UpdateAssetInfo.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
(function () { | ||
'use strict'; | ||
|
||
/** | ||
* @param {$rootScope.Scope} $scope | ||
* @param {JQuery} $element | ||
* @return {UpdateAssetInfo} | ||
*/ | ||
const controller = function ($scope, $element) { | ||
|
||
class UpdateAssetInfo { | ||
|
||
/** | ||
* @type {Signable} | ||
*/ | ||
signable; | ||
/** | ||
* @type {Asset} | ||
*/ | ||
asset; | ||
/** | ||
* @type {boolean} | ||
*/ | ||
shownScript = false; | ||
/** | ||
* @type {JQuery} | ||
*/ | ||
$container; | ||
|
||
|
||
$postLink() { | ||
this.$container = $element.find('.js-script-container'); | ||
this.$container.hide(); | ||
this.transaction = this.signable.getTxData(); | ||
(this.transaction.id ? Promise.resolve(this.transaction.id) : this.signable.getId()) | ||
.then(id => { | ||
this.id = id; | ||
$scope.$apply(); | ||
}); | ||
} | ||
|
||
toggleScript() { | ||
this.shownScript = !this.shownScript; | ||
this.$container.stop(true, true).slideToggle(100); | ||
} | ||
|
||
} | ||
|
||
return new UpdateAssetInfo(); | ||
}; | ||
|
||
controller.$inject = ['$scope', '$element']; | ||
|
||
angular.module('app.ui').component('wUpdateAssetInfo', { | ||
bindings: { | ||
signable: '<' | ||
}, | ||
controller, | ||
templateUrl: 'modules/ui/directives/transactionInfo/types/update-asset/update-asset-info.html' | ||
}); | ||
})(); |
10 changes: 10 additions & 0 deletions
10
src/modules/ui/directives/transactionInfo/types/update-asset/update-asset-header.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<div class="txinfo__lead"> | ||
<div class="txinfo__header-wrapper"> | ||
<h3 class="basic-700" | ||
w-i18n="transaction.amounts.issue" | ||
params="{description: $ctrl.description, name: $ctrl.name}"></h3> | ||
<span ng-if="$ctrl.isScam" | ||
class="status-label-min inactive" | ||
w-i18n="transaction.headers.suspicious"></span> | ||
</div> | ||
</div> |
19 changes: 19 additions & 0 deletions
19
src/modules/ui/directives/transactionInfo/types/update-asset/update-asset-info.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<div class="txinfo__row" ng-if="::$ctrl.transaction.assetId"> | ||
<div class="txinfo__key" w-i18n="transaction.modals.assetId"></div> | ||
<div class="txinfo__value">{{::$ctrl.transaction.assetId}}</div> | ||
</div> | ||
|
||
<div class="txinfo__row txinfo__row-contains-text" ng-if="::$ctrl.transaction.name"> | ||
<div class="txinfo__key" w-i18n="transaction.modals.name"></div> | ||
<div class="txinfo__value txinfo__text">{{$ctrl.transaction.name}}</div> | ||
</div> | ||
|
||
<div class="txinfo__row txinfo__row-contains-text" ng-if="::$ctrl.transaction.description"> | ||
<div class="txinfo__key" w-i18n="transaction.modals.description"></div> | ||
<div class="txinfo__value txinfo__text">{{$ctrl.transaction.description}}</div> | ||
</div> | ||
|
||
<w-transaction-info-general height="$ctrl.transaction.height" | ||
timestamp="$ctrl.transaction.timestamp" | ||
id="$ctrl.id" | ||
fee="$ctrl.transaction.fee"></w-transaction-info-general> |