forked from bitshares/bitshares1-webwallet
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
35 changed files
with
976 additions
and
195 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#dacplayblocks { | ||
border:0; | ||
min-height:300px; | ||
height:100em; width:100%; | ||
} | ||
|
||
.internal-explorer { | ||
// display:none; | ||
} |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,41 @@ | ||
angular.module("app").controller "MyPacketSearchController", ($scope, $location, $stateParams, $state, Blockchain, Wallet, Utils, $mdDialog, Observer, RpcService, account_id) -> | ||
$scope.selected_packet = null | ||
|
||
# get recent packets | ||
refresh_my_packets = (acct_id) -> | ||
Wallet.list_red_packets(acct_id).then (packets) -> | ||
if packets and packets.length > 0 | ||
|
||
# my created packets' ids | ||
ids = (packets.filter (p)-> p.is_sender ).map (p)-> [p.packet_id] | ||
|
||
RpcService.request('batch', ['blockchain_get_red_packet', ids]).then (response) -> | ||
ps = response.result | ||
for i in [0...ps.length] | ||
ps[i].is_sender = packets[i].is_sender | ||
ps[i].is_claimer = packets[i].is_claimer | ||
ps[i].index = packets[i].index | ||
|
||
ps[i].slots_count = ps[i].claim_statuses.length | ||
ps[i].claimed_count = (ps[i].claim_statuses.filter (s) -> s.account_id > -1).length | ||
|
||
asset = Blockchain.asset_records[ps[i].amount.asset_id] | ||
ps[i].amount.precision = asset?.precision | ||
ps[i].amount.symbol = asset?.symbol | ||
|
||
$scope.packets = ps | ||
console.log $scope.packets[0] | ||
|
||
$scope.selectPacket = (packet) -> | ||
$scope.selected_packet = packet | ||
|
||
$scope.sendPacket = -> | ||
$mdDialog.hide($scope.selected_packet) | ||
|
||
$scope.hide = -> | ||
$mdDialog.hide() | ||
$scope.cancel = -> | ||
$mdDialog.cancel() | ||
|
||
# init | ||
refresh_my_packets(account_id || Wallet.current_account?.id) |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<md-dialog aria-label="{{packet.id}}" class="packet-quick-search" flex="33"> | ||
<md-toolbar ng-init="form = packets_quick_search_form"> | ||
<div class="md-toolbar-tools"> | ||
<h2 translate>packet.select_from_mine</h2> | ||
<span flex></span> | ||
<md-button type="button" class="md-icon-button" ng-click="cancel()"> | ||
<md-icon md-svg-src="img/icons/ic_close_white_24px.svg" aria-label="Close dialog"></md-icon> | ||
</md-button> | ||
</div> | ||
</md-toolbar> | ||
|
||
|
||
<md-dialog-content layout="column"> | ||
<div> | ||
<md-input-container md-no-float> | ||
<md-icon md-svg-src="img/icons/ic_search_black_24px.svg"></md-icon> | ||
<input ng-model="searchString" type="text" placeholder="{{'packet.search_id_or_msg'|translate}}"> | ||
</md-input-container> | ||
</div> | ||
|
||
<md-list class="packets" ng-show="packets.length > 0"> | ||
|
||
<md-list-item ng-repeat="packet in packets | filter:searchString" ng-class="{mine: selected_packet.id == packet.id}" class="packet" ng-click="selectPacket(packet)"> | ||
<div flex> | ||
<i class="fa fa-envelope packet-cover"></i> {{ packet.message }} | ||
</div> | ||
|
||
<div flex="25" class="packet-stat text-center">{{packet.claimed_count}}/{{packet.slots_count}}</div> | ||
|
||
<div flex="25" class="md-list-item-text" style="text-align:right;"> | ||
{{ packet.amount | formatAsset }} | ||
</div> | ||
</md-list-item> | ||
</md-list> | ||
|
||
</md-dialog-content> | ||
|
||
<div class="md-actions" layout="row"> | ||
<md-button type="button" ng-click="cancel()" class="" >{{'packet.btn.close'|translate}}</md-button> | ||
<md-button type="submit" ng-click="sendPacket()" ng-disabled="selected_packet == null" class="md-primary" translate>btn.send</md-button> | ||
|
||
</div> | ||
</md-dialog> |
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