Skip to content

Commit

Permalink
merge from remote
Browse files Browse the repository at this point in the history
hackfisher committed Mar 23, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents fa043aa + 6302c43 commit c4d9fd2
Showing 35 changed files with 976 additions and 195 deletions.
131 changes: 118 additions & 13 deletions AD.md
Original file line number Diff line number Diff line change
@@ -16,14 +16,20 @@ ref: http://google-styleguide.googlecode.com/svn/trunk/jsoncstyleguide.xml
{
"level":"info",
"title":"客户端更新",
"message":"最新版PLAY客户端0.1.4已经发布,请前往官网下载",
"url":"https://github.com/dacsunlimited/dac_play/releases/tag/pls%2F0.1.3",
"starts_at":"20150630T12:00:00",
"expires_at":"2015-07-01T00:00:00"
"message":"最新版PLAY客户端0.3.3 (Rebalance) 已经发布,请前往官网下载。硬分叉将发生于区块#1340000(约2015年9月3日16点30分)。Latest Client 0.3.3 (Rebalance) has been released. Please visit link to download. Hard fork is scheduled to take place at block height #1340000 (around 2015-09-03 08:30 UTC).",
"url":"https://github.com/dacsunlimited/dac_play/releases",
"starts_at":"20150901T00:00:00",
"expires_at":"2015-09-03T08:30:00"
}

wallet_note 5.1 XTS ann.dacplay '{"level":"info", "title":"客户端更新", "message":"最新版PLAY客户端0.1.4已经发布,请前往官网下载", "url":"https://github.com/dacsunlimited/dac_play/releases/tag/pls%2F0.1.3","starts_at":"20150630T12:00:00","expires_at":"2015-07-10T00:00:00"}' false

XTS:

wallet_note 5.1 XTS ann.dacplay '{"level":"info","title":"客户端更新","message":"最新版PLAY客户端0.3.3 (Rebalance) 已经发布,请前往官网下载。硬分叉将发生于区块#1340000(约2015年9月3日16点30分)。Latest Client 0.3.3 (Rebalance) has been released. Please visit link to download. Hard fork is scheduled to take place at block height #1340000 (around 2015-09-03 08:30 UTC).","url":"https://github.com/dacsunlimited/dac_play/releases","starts_at":"20150901T00:00:00","expires_at":"2015-09-03T08:30:00"}' false

PLS:

wallet_note 5.1 PLS ann.dacplay '{"level":"info","title":"客户端更新","message":"最新版PLAY客户端0.3.3 (Rebalance) 已经发布,请前往官网下载。硬分叉将发生于区块#1340000(约2015年9月3日16点30分)。Latest Client 0.3.3 (Rebalance) has been released. Please visit link to download. Hard fork is scheduled to take place at block height #1340000 (around 2015-09-03 08:30 UTC).","url":"https://github.com/dacsunlimited/dac_play/releases","starts_at":"20150901T00:00:00","expires_at":"2015-09-03T08:30:00"}' false

# AdCreative
{
version: Integer,
@@ -262,6 +268,7 @@ bid on ad.dacplay
1PLS per bid + 1 PLS * (message size / 400 bytes + 1) (transaction fee)

Ad Position setting
PLAIN TEXT

{
"ad": {
@@ -271,20 +278,90 @@ Ad Position setting
"width": "auto",
"height": "auto",
"pricing": [
{
"id": "plain1m",
"duration": "1m",
"price": 100000,
"asset": "XTS"
}
{
"id": "plain1m",
"duration": "1m",
"price": 100000,
"asset": "XTS"
}
]
}
}

XTS:

wallet_account_update_registration chat.dacplay dacplay "{\"ad\":{\"version\":0.1,\"desc\":\"Trollbox\",\"detail_link\":\"\",\"width\":\"auto\",\"height\":\"auto\",\"pricing\":[{\"id\":\"plain1m\",\"duration\":\"1m\",\"price\":100000,\"asset\":\"XTS\"}]}}"

PLS:

wallet_account_update_registration chat.dacplay dacplay "{\"ad\":{\"version\":0.1,\"desc\":\"Trollbox\",\"detail_link\":\"\",\"width\":\"auto\",\"height\":\"auto\",\"pricing\":[{\"id\":\"plain1m\",\"duration\":\"1m\",\"price\":100000,\"asset\":\"PLS\"}]}}"

RED PACKET

{
"ad": {
"version": 0.1,
"desc": "Trollbox",
"detail_link": "",
"width": "auto",
"height": "auto",
"pricing": [
{
"id": "packet1m",
"duration": "1m",
"price": 100000,
"asset": "XTS"
}
]
}
}

XTS:

wallet_account_update_registration chat.dacplay dacplay "{\"ad\":{\"version\":0.1,\"desc\":\"Trollbox\",\"detail_link\":\"\",\"width\":\"auto\",\"height\":\"auto\",\"pricing\":[{\"id\":\"packet1m\",\"duration\":\"1m\",\"price\":100000,\"asset\":\"XTS\"}]}}"

PLS:

wallet_account_update_registration chat.dacplay dacplay "{\"ad\":{\"version\":0.1,\"desc\":\"Trollbox\",\"detail_link\":\"\",\"width\":\"auto\",\"height\":\"auto\",\"pricing\":[{\"id\":\"packet1m\",\"duration\":\"1m\",\"price\":100000,\"asset\":\"PLS\"}]}}"


COMBINED

{
"ad": {
"version": 0.1,
"desc": "Trollbox",
"detail_link": "",
"width": "auto",
"height": "auto",
"pricing": [
{
"id": "plain1m",
"duration": "1m",
"price": 100000,
"asset": "XTS"
},
{
"id": "packet1m",
"duration": "1m",
"price": 100000,
"asset": "XTS"
}
]
}
}

XTS:

wallet_account_update_registration chat.dacplay chat.dacplay "{\"ad\":{\"version\":0.1,\"desc\":\"Trollbox\",\"detail_link\":\"\",\"width\":\"auto\",\"height\":\"auto\",\"pricing\":[{\"id\":\"plain1m\",\"duration\":\"1m\",\"price\":100000,\"asset\":\"XTS\"},{\"id\":\"packet1m\",\"duration\":\"1m\",\"price\":100000,\"asset\":\"XTS\"}]}}"

PLS:

wallet_account_update_registration chat.dacplay chat.dacplay "{\"ad\":{\"version\":0.1,\"desc\":\"Trollbox\",\"detail_link\":\"\",\"width\":\"auto\",\"height\":\"auto\",\"pricing\":[{\"id\":\"plain1m\",\"duration\":\"1m\",\"price\":100000,\"asset\":\"PLS\"},{\"id\":\"packet1m\",\"duration\":\"1m\",\"price\":100000,\"asset\":\"PLS\"}]}}"

# Post Chat Message

PLAINTEXT
{
"bidid": "plain1m",
"creative": {
@@ -297,4 +374,32 @@ Ad Position setting
"starts_at": "2015-07-09T00:00:00"
}

wallet_buy_ad 2 XTS alice chat.dacplay '{"bidid":"plain1m","creative":{"version":0.1,"type":"text","creative":{"text":"Hello World"}},"starts_at":"2015-07-09T00:00:00"}'
XTS:

wallet_buy_ad 2 XTS alice chat.dacplay {"bidid":"plain1m","creative":{"version":0.1,"type":"text","creative":{"text":"Hello World"}},"starts_at":"2015-07-09T00:00:00"}

PLS:

wallet_buy_ad 2 PLS alice chat.dacplay {"bidid":"plain1m","creative":{"version":0.1,"type":"text","creative":{"text":"Hello World"}},"starts_at":"2015-07-09T00:00:00"}

REDPACKET

{
"bidid": "packet1m",
"creative": {
"version": 0.1,
"type": "packet",
"creative": {
"id": "c808295907756b0a546c7ce707c189545d8e1fc4"
}
},
"starts_at": "2015-08-31T00:00:00"
}

XTS:

wallet_buy_ad 2 XTS alice chat.dacplay {"bidid":"packet1m","creative":{"version":0.1,"type":"packet","creative":{"id":"c808295907756b0a546c7ce707c189545d8e1fc4"}},"starts_at":"2015-08-31T00:00:00"}

PLS:

wallet_buy_ad 2 PLS alice chat.dacplay {"bidid":"packet1m","creative":{"version":0.1,"type":"packet","creative":{"id":"c808295907756b0a546c7ce707c189545d8e1fc4"}},"starts_at":"2015-08-31T00:00:00"}
9 changes: 9 additions & 0 deletions app/css/blocks.scss
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;
}
5 changes: 5 additions & 0 deletions app/css/main.scss
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ $default_blue: #3f51b5;
@import 'help';
@import 'splashpage';
@import 'layout';
@import 'blocks';
@import 'sidebar';
@import 'toolbar';
@import 'footer';
@@ -682,3 +683,7 @@ a.delegate-link {
[role="tabpanel"] {
transition: none;
}

.error-container {
color: red;
}
23 changes: 20 additions & 3 deletions app/css/packets.scss
Original file line number Diff line number Diff line change
@@ -8,8 +8,21 @@ $packet_red:#BD0000;

.packet-message {
position:absolute;
top:25px; left:5px; width:190px; height:40px; font-size:14px;
top:20px; left:0px; width:100%; height:40px; font-size:14px;
text-align:center; overflow:hidden; text-overflow:ellipsis;
padding:0 15px;
}

.packet-amount {
position: absolute;
top: 68px;
font-size: 18px; font-weight:bold;
text-align: center;
width: 100%;
color: gold;
.unit {
font-size:10px; font-weight:normal;
}
}

.packet-sender {
@@ -27,6 +40,11 @@ $packet_red:#BD0000;
}
}

.mine {
background-color:transparentize(red, 0.95);
font-weight:bold;
}
.packet-cover { color:$packet_red; }
.packet-show {
.packet-cover {
color:$packet_red; font-size:8em; line-height:75px;
@@ -35,8 +53,7 @@ $packet_red:#BD0000;
.claimers {
.claimer {
&.mine {
background-color:transparentize(red, 0.95);
font-weight:bold;
@extend .mine;
}
.claimer-icon {
margin-right:10px;
3 changes: 3 additions & 0 deletions app/css/splashpage.scss
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@
.splashpage-wrapper {
width: 380px;
// height: 458px;
margin:auto;

p {
text-align: center;
@@ -40,6 +41,8 @@
/* border-bottom: 1px solid rgba(255, 255, 255, .5);*/
-webkit-background-clip: padding-box;
background-clip: padding-box;

img { width:80%; }
}

.str-content {
3 changes: 3 additions & 0 deletions app/css/trollbox.scss
Original file line number Diff line number Diff line change
@@ -73,6 +73,9 @@
padding:10px 20px; display:inline-block;
@include border-radius(5px);
background-color: #eee; font-size:14px;
}

.packet-container {

}

4 changes: 4 additions & 0 deletions app/img/icons/ic_search_black_24px.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions app/img/icons/ic_search_white_24px.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions app/js/controllers/my-packets-search.coffee
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)
49 changes: 26 additions & 23 deletions app/js/controllers/packet.coffee
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
angular.module("app").controller "PacketController", ($scope, $q, Blockchain, Wallet, WalletAPI, Utils, RpcService, $mdDialog, Growl, $translate, id, packet) ->

$scope.packet = packet if packet
# $scope.claimers = []
angular.module("app").controller "PacketController", ($scope, $q, Blockchain, Wallet, WalletAPI, Utils, RpcService, $mdDialog, Growl, $translate, id, password) ->

$scope.form = null
$scope.frm_data =
id: packet?.id || null
id: id || null
to_account_name: Wallet.current_account?.name
password: packet.password || ""
password: password || ""

my_accounts = []

Wallet.get_current_or_first_account().then (acct)->
$scope.frm_data.to_account_name = acct.name
$scope.frm_data.to_account_name = acct?.name

# my registered accounts
for k, acct of Wallet.accounts
my_accounts.push acct.id if acct.id > 0


# refresh packet data
Blockchain.get_red_packet(id).then (data) ->
Blockchain.get_red_packets(id).then (data) ->
if data
# mark my claims
for status in data.claim_statuses
@@ -38,7 +35,7 @@ angular.module("app").controller "PacketController", ($scope, $q, Blockchain, Wa
$scope.$watch ->
Wallet.current_account
, ->
$scope.frm_data.to_account_name = Wallet.current_account.name
$scope.frm_data.to_account_name = Wallet.current_account?.name


$scope.hide = ->
@@ -49,24 +46,30 @@ angular.module("app").controller "PacketController", ($scope, $q, Blockchain, Wa
WalletAPI.claim_red_packet($scope.frm_data.id, $scope.frm_data.to_account_name, $scope.frm_data.password).then (response) =>
$translate('packet.tip.successful_claimed').then (val) -> Growl.notice "", val
$mdDialog.hide(true)
, (error) ->
code = error.response.data.error.code
, (err) ->

$scope.form.password.$dirty = true
$scope.form.password.$valid = false
$scope.form.password.$error = {}

if code == 31005
$scope.form.password.$error.badPassword = true
else if code == 20010
$scope.form.password.$error.insufficientFund = true
else if code == 10
error = err.data?.error || err.response?.data?.error
code = error.code

if code
if code == 10 or code == 31005

if code == 31005
$scope.form.password.$error.badPassword = true
else if error.message.indexOf("All of this red packet has already been claimed!") > -1
$scope.form.password.$error.allClaimed = true
else if error.message.indexOf("This account already claimed this packet!") > -1
$scope.form.password.$error.dupClaim = true
else if error.message.indexOf("to_account_rec.valid") > -1
$scope.form.password.$error.accountNotRegistered = true

else

if error.message.indexOf("All of this red packet has already been claimed!") > -1
$scope.form.password.$error.allClaimed = true
else if error.message.indexOf("This account already claimed this packet!") > -1
$scope.form.password.$error.dupClaim = true
else if error.message.indexOf("to_account_rec.valid") > -1
$scope.form.password.$error.accountNotRegistered = true
$scope.form.password.$error.errorMessage = error.locale_message

else
$scope.form.password.error_message = Utils.formatAssertException(error.data.error.message)
$scope.form.password.$error.errorMessage = Utils.formatAssertException(error.message)
47 changes: 21 additions & 26 deletions app/js/controllers/packet_new.coffee
Original file line number Diff line number Diff line change
@@ -5,15 +5,15 @@ angular.module("app").controller "PacketNewController", ($scope, $q, BlockchainA
amount:
amount: 100
symbol: Info.symbol
from_account_name: Wallet.current_account?.name
from_account_name: if Wallet.current_account?.registered then Wallet.current_account?.name else null
message: ""
password: ""
count: 1
count: 5

$scope.my_accounts = []

Wallet.get_current_or_first_account().then (acct)->
$scope.frm_data.from_account_name = acct.name
$scope.frm_data.from_account_name = acct?.name if acct?.registered

# get accounts with balance of given asset
# and filter with registered account only
@@ -26,20 +26,23 @@ angular.module("app").controller "PacketNewController", ($scope, $q, BlockchainA
acct.balance = balance[asset]
$scope.my_accounts.push acct

# if current account is not regisered
if !$scope.frm_data.from_account_name and $scope.my_accounts.length > 0
$scope.frm_data.from_account_name = $scope.my_accounts[0].name

getAccountsWithBalance(Info.symbol)

# check claim statuses
$scope.$watch ->
Wallet.current_account
, (newVal, oldVal, scope)->
$scope.frm_data.from_account_name = newVal?.name
$scope.frm_data.from_account_name = newVal?.name if newVal?.registered

$scope.checkForm = ->
if $scope.form.$valid
return true
else
for err_type, objs of $scope.form.$error
objs[0].$setDirty()
objs[0]?.$setDirty()
return false

$scope.hide = ->
@@ -53,23 +56,15 @@ angular.module("app").controller "PacketNewController", ($scope, $q, BlockchainA
WalletAPI.create_red_packet(frm.amount.amount, frm.amount.symbol, frm.from_account_name, frm.message, frm.password, frm.count).then (response) =>
$translate('packet.tip.successful_created').then (val) -> Growl.notice "", val
$mdDialog.hide(true)
, (error) ->
# code = error.response.data.error.code
# $scope.form.password.$dirty = true
# $scope.form.password.$valid = false
#
# if code == 31005
# $scope.form.password.$error.badPassword = true
# else if code == 20010
# $scope.form.password.$error.insufficientFund = true
# else if code == 10
#
# if error.message.indexOf("All of this red packet has already been claimed!") > -1
# $scope.form.password.$error.allClaimed = true
# else if error.message.indexOf("This account already claimed this packet!") > -1
# $scope.form.password.$error.dupClaim = true
# else if error.message.indexOf("to_account_rec.valid") > -1
# $scope.form.password.$error.accountNotRegistered = true
#
# else
# $scope.form.password.error_message = Utils.formatAssertException(error.data.error.message)
, (err) ->
error = err.data?.error || err.response?.data?.error
code = error.code
error_message = error.locale_message || error.message

if code == 20010
$scope.form.amount.$dirty = true
$scope.form.amount.$error.remoteError = error_message
else if code == 10 and error.message.indexOf("The paid amount must larger than the sum") > -1
$scope.form.amount.$error.remoteError = Utils.formatAssertException(error_message)
else
$scope.form.$error.remoteError = Utils.formatAssertException(error_message)
35 changes: 20 additions & 15 deletions app/js/controllers/packets.coffee
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ angular.module("app").controller "PacketsController", ($scope, $location, $state

[id, pwd] = patten.split('|')

Blockchain.get_red_packet(id).then (data) ->
Blockchain.get_red_packets(id).then (data) ->
$scope.search_packet = null

if data
@@ -23,12 +23,22 @@ angular.module("app").controller "PacketsController", ($scope, $location, $state
else
$scope.form_search_packet.id.$valid = false
$scope.form_search_packet.id.$error.notFound = true

, (err) ->
$scope.form_search_packet.id.error_message = Utils.formatAssertException(error.data.error.message)
error = err.data?.error || err.response?.data?.error
error_message = error.locale_message || error.message

$scope.form_search_packet.id.error_message = Utils.formatAssertException(error_message)



# get recent packets
refresh_recent_packets = ->
Blockchain.refresh_recent_packets().then (result) -> $scope.packets = result
Blockchain.refresh_recent_packets().then (result) ->
if result
$scope.packets =
created: result.created?.reverse()
claimed: result.claimed?.reverse()

# monitor every block update
recent_packets_observer =
@@ -43,22 +53,16 @@ angular.module("app").controller "PacketsController", ($scope, $location, $state


$scope.showPacket = (evt, id, pwd = null) ->
# get packet cache from collection
for p in $scope.packets.created
packet = p if p.id == id

unless packet
for p in $scope.packets.claimed
packet = p if p.id == id

$mdDialog.show
controller: "PacketController",
templateUrl: 'packets/packet.show.html',
parent: angular.element(document.body),
targetEvent: evt,
controller: "PacketController"
templateUrl: 'packets/packet.show.html'
parent: angular.element(document.body)
targetEvent: evt
clickOutsideToClose:true
locals:
id: id
packet: (packet.password = pwd if pwd; packet)
password: pwd

.then (succ) ->
refresh_recent_packets()
@@ -71,6 +75,7 @@ angular.module("app").controller "PacketsController", ($scope, $location, $state
templateUrl: 'packets/packet.new.html'
parent: angular.element(document.body)
targetEvent: evt
clickOutsideToClose:true

.then (succ) ->
refresh_recent_packets()
3 changes: 2 additions & 1 deletion app/js/controllers/root.coffee
Original file line number Diff line number Diff line change
@@ -98,7 +98,8 @@ angular.module("app").controller "RootController", ($scope, $location, $modal, $
when off
Observer.unregisterObserver Wallet.observer_config()

navigate_to('unlockwallet') if Info.info.wallet_open and !unlocked
# navigate_to('unlockwallet') if Info.info.wallet_open and !unlocked
navigate_to('unlockwallet') if !Info.info.wallet_open or !unlocked
, true

$scope.clear_form_errors = (form) ->
2 changes: 1 addition & 1 deletion app/js/controllers/sidenav.coffee
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ angular.module("app").controller "SidenavController", ($scope, $state, $rootScop

Wallet.get_current_or_first_account().then (acct) ->
$scope.current_account = acct
$scope.current_account_name = acct.name
$scope.current_account_name = acct?.name

# Wallet.refresh_accounts().then (accts) ->
# debugger
12 changes: 8 additions & 4 deletions app/js/controllers/transfer.coffee
Original file line number Diff line number Diff line change
@@ -145,15 +145,19 @@ angular.module("app").controller "TransferController", ($scope, $stateParams, $m
my_transfer_form?.payto.tip_registered = ""
$scope.account_registration_date = ""
Growl.notice "", "Transfer transaction broadcasted"
, (error) ->
if error.data.error.code == 20005
, (err) ->
error = err.data?.error || err.response?.data?.error
code = error.code
error_message = error.locale_message || error.message

if error.code == 20005
$translate('account.unknown').then (val) ->
my_transfer_form.payto.error_message = val
else if error.data.error.code == 20010
else if error.code == 20010
$translate('market.tip.insufficient_balances').then (val) ->
my_transfer_form.amount.error_message = val
else
my_transfer_form.payto.error_message = Utils.formatAssertException(error.data.error.message)
my_transfer_form.payto.error_message = Utils.formatAssertException error_message

$scope.send = ->
my_transfer_form.amount.error_message = null
145 changes: 120 additions & 25 deletions app/js/controllers/trollbox.coffee
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
angular.module("app").controller "TrollboxController", ($scope, $modal, $log, $q, RpcService, Wallet, WalletAPI, BlockchainAPI, Blockchain, Growl, Info, Utils, Observer, $timeout, $mdDialog, AD) ->
chatAdPositionAcct = Info.CHAT_ADD_POSITION_ACCT
chatAdPricingID = "plain1m"


textPriceID = "plain1m"
packetPriceID = "packet1m"

chatListLimit = 50
chatSepBlockInterval = 120 # 2 minutes

adSpec = null
pricing = null
pricings = {}
$scope.accounts = []
$scope.registered_accounts = {}
$scope.from =
@@ -15,15 +20,26 @@ angular.module("app").controller "TrollboxController", ($scope, $modal, $log, $q
$scope.symbol = Info.symbol
$scope.precision = Info.PRECISION

# plain text chat
$scope.chatBid =
bidid: "#{chatAdPricingID}"
bidid: "#{textPriceID}"
creative:
version: 0.1
type: 'text'
creative:
text: null
starts_at: null

# packet chat
$scope.packetBid =
bidid: "#{packetPriceID}"
creative:
version: 0.1
type: 'packet'
creative:
id: null
starts_at: null

$scope.messages = []
message_trx = []
$scope.staged_messages = []
@@ -119,9 +135,21 @@ angular.module("app").controller "TrollboxController", ($scope, $modal, $log, $q
if ad_spec and ad_spec.ad and ad_spec.ad.pricing?.length > 0
adSpec = ad_spec

plain1m = ad_spec.ad.pricing.filter (p) -> p.id == chatAdPricingID
plain1m = ad_spec.ad.pricing.filter (p) -> p.id == textPriceID
pricing = plain1m[0]

for p in ad_spec.ad.pricing
pricings[p.id] = p

# based on bid type, return descriptiontive message, eg text or id
getBidMsg = (bid) ->
switch bid.creative.type
when 'text'
bid.creative.creative.text
when 'packet'
bid.creative.creative.id
else
bid.creative.creative.text

is_mine = (id, myids) ->
# console.log id, myids, (id > 0 and myids.indexOf(id) > -1)
@@ -134,12 +162,13 @@ angular.module("app").controller "TrollboxController", ($scope, $modal, $log, $q
if response?.length > 0
my_account_ids = $scope.accounts.map (acct) -> acct.account_id
# min amount is 200000
for message in (response.filter (r) -> checkMessageFee(r)).reverse()
for message in response.reverse() #(response.filter (r) -> checkMessageFee(r)).reverse()
bid = try angular.fromJson(message.message.replace(/\\\"/g,'\"'))
catch err
null

# console.log bid.creative.creative.text
# if json parse error or didn't pay enough fee, skip
continue unless bid && checkMessageFee(bid.bidid, message)

trx_id = message.index.transaction_id

@@ -150,7 +179,7 @@ angular.module("app").controller "TrollboxController", ($scope, $modal, $log, $q

# if it's my message, find it in staged message and clear it
if mine and $scope.staged_messages.length > 0
fp = Utils.hashString bid.creative.creative.text
fp = Utils.hashString getBidMsg(bid)
foundIndex = ($scope.staged_messages.map (m) -> m.fp).indexOf(fp)
if foundIndex > -1
$scope.staged_messages.splice foundIndex, 1
@@ -159,7 +188,8 @@ angular.module("app").controller "TrollboxController", ($scope, $modal, $log, $q
userid: message.publisher_id
username: message.publisher_id
rp: null
message: bid.creative.creative.text
# message: bid.creative.creative.text
creative: bid.creative
timestamp: bid.starts_at
is_mine: mine
txid: trx_id
@@ -175,9 +205,14 @@ angular.module("app").controller "TrollboxController", ($scope, $modal, $log, $q
accts: RpcService.request("batch", [ "blockchain_get_account", (new_messages.map (m)-> [m.userid]) ])
trxs: RpcService.request("batch", [ "blockchain_get_transaction", (new_messages.map (m)-> [m.txid]) ])

packet_messages = new_messages.filter (m) -> m.creative.type == 'packet'
if packet_messages.length > 0
requests.packets = Blockchain.get_red_packets(packet_messages.map (m)-> m.creative.creative.id)

$q.all(requests).then (response) ->
accts = response.accts.result
trxs = response.trxs.result
packets = response.packets

for i in [0...new_messages.length]
msg = new_messages[i]
@@ -191,6 +226,19 @@ angular.module("app").controller "TrollboxController", ($scope, $modal, $log, $q

msg.is_fresh = (i == 0 or (i > 0 and chain.block_num - new_messages[i-1].block_num > chatSepBlockInterval))

# packets
if packets?.length > 0
# packets mapping
packets_mapping = {}
for p in packets
packets_mapping[p.id] = p

for msg in new_messages
if msg.creative.type == 'packet'
msg.creative.creative.packet = packets_mapping[msg.creative.creative.id]

packets_mapping = null

# sort message by block_num, trx_num
new_messages

@@ -200,19 +248,23 @@ angular.module("app").controller "TrollboxController", ($scope, $modal, $log, $q
keep_chat_down()
, 300

getRequiredFee = (message_str) ->
(pricing?.price + AD.getMessageFee(message_str) * Info.PRECISION) / Info.PRECISION
getRequiredFee = (bidid, bidJSON) ->
# if bidid is not identified, give a large enough price
# so that it will fail and be skipped
bid_price = pricings[bidid]?.price || 100000000

(bid_price + AD.getMessageFee(bidJSON) * Info.PRECISION) / Info.PRECISION

checkMessageFee = (message) ->
checkMessageFee = (bidid, message) ->
# msgSize = Utils.byteLength JSON.stringify(message.message) - 20 # deal with marginal length problem
feeRequired = getRequiredFee(message.message)
feeRequired = getRequiredFee(bidid, message.message)

return message.amount.amount / Info.PRECISION >= feeRequired

$scope.setForm = (frm) -> form = frm

$scope.checkFee = ->
message = $scope.chatBid.creative.creative.text
$scope.checkFee = (bid)->
message = getBidMsg(bid)
if !message || message == ''
$scope.feeRequired = 0
return false
@@ -221,7 +273,7 @@ angular.module("app").controller "TrollboxController", ($scope, $modal, $log, $q
form.$setValidity "message", false
form.message.$error.reg_acct_required = true

$scope.feeRequired = getRequiredFee($scope.chatBid)
$scope.feeRequired = getRequiredFee(textPriceID, bid)

if $scope.feeRequired > $scope.from.account.balance.amount / $scope.precision
form.$setValidity "message", false
@@ -230,29 +282,31 @@ angular.module("app").controller "TrollboxController", ($scope, $modal, $log, $q

return true

$scope.doSend = (bid) ->
bid.starts_at = Utils.formatUTCDate(new Date())

$scope.doSend = ->
$scope.chatBid.starts_at = Utils.formatUTCDate(new Date())

unless $scope.checkFee()
unless $scope.checkFee(bid)
return false

# do api call
public_message = JSON.stringify( $scope.chatBid )#.replace(/"/g,'\\\"')
public_message = JSON.stringify( bid )#.replace(/"/g,'\\\"')
WalletAPI.buy_ad($scope.feeRequired, $scope.symbol, $scope.from.account.account_name, chatAdPositionAcct, public_message).then (response) ->

# notify staging
angular.element('.troll-staging').removeClass('hide')
msg = getBidMsg(bid)
$scope.staged_messages.push
fp: Utils.hashString($scope.chatBid.creative.creative.text),
message: $scope.chatBid.creative.creative.text
fp: Utils.hashString( msg ),
message: msg.substr(0,20)

# reset form
$scope.chatBid.creative.creative.text = ''
$scope.chatBid.creative.creative.text = null
$scope.packetBid.creative.creative.id = null
form.message.$dirty = false

, (error) ->
if (error.response.data.error.code == 20010)
, (err) ->
error = err.data?.error || err.response?.data?.error
if (error.code == 20010)
$translate('market.tip.insufficient_balances').then (val) ->
Growl.notice "", val
else
@@ -263,7 +317,48 @@ angular.module("app").controller "TrollboxController", ($scope, $modal, $log, $q
$scope.chatBid.creative.creative.text = chat_form.message.value
$scope.chatBid.starts_at = Utils.formatUTCDate(new Date())

$scope.doSend()
$scope.doSend($scope.chatBid)

$scope.showSearchPakcetDialog = (evt) ->
$mdDialog.show
controller: "MyPacketSearchController"
templateUrl: 'packets/packets.my.search.html'
parent: angular.element(document.body)
targetEvent: evt
clickOutsideToClose:true
locals:
account_id: $scope.from.account.account_id

.then (packet) ->
if packet
console.log 'searchPacketDialog successfully submitted'
console.log 'packet', packet

$scope.packetBid.creative.creative.id = packet.id
$scope.packetBid.starts_at = Utils.formatUTCDate(new Date())

$scope.doSend($scope.packetBid)
, () ->
# cancelled, do nothing

$scope.showPacket = (evt, id, pwd = null) ->

$mdDialog.show
controller: "PacketController"
templateUrl: 'packets/packet.show.html'
parent: angular.element(document.body)
targetEvent: evt
clickOutsideToClose:true
locals:
id: id
password: pwd

.then (succ) ->
# TODO
# update specific packet message
console.log 'packet claimed', succ
, () ->
# cancelled, do nothing

if !$scope.symbol and Info.symbol == ''
Info.refresh_info().then ->
100 changes: 62 additions & 38 deletions app/js/services/blockchain.coffee
Original file line number Diff line number Diff line change
@@ -59,7 +59,11 @@ class Blockchain
# # # # #
# Asset Records

asset_records: {}
asset_records:
0:
symbol: 'XTS'
precision: 100000

asset_records_array: []
market_asset_records_array: []
symbol2records: {}
@@ -307,6 +311,10 @@ class Blockchain
account_ids.push p.from_account_id
p.slots_count = p.claim_statuses.length
p.claimed_count = (p.claim_statuses.filter (s) -> s.account_id > -1).length
# get amount asset
amount_asset = @asset_records[p.amount.asset_id]
p.amount.symbol = amount_asset.symbol
p.amount.precision = amount_asset.precision

# get from account account/name
account_ids = @utils.unique_array(account_ids).map (a)-> [a]
@@ -321,54 +329,70 @@ class Blockchain

return deferred.promise

get_red_packet: (id) ->
deferred = @q.defer()
# @param ids: id string or array of id string
#
# @return Packet or [Packet]: based on input ids is string or array
get_red_packets: (ids) ->
deferred = @q.defer()

if ids instanceof Array
param_ids = ids.map (id)-> [id]
else
param_ids = [[ids]]

@blockchain_api.get_red_packet(id).then (data) =>
deferred.resolve false unless data
@rpc.request("batch", ["blockchain_get_red_packet", param_ids]).then (data) =>
# not found or other exceptions
deferred.resolve false unless (data?.result?.length > 0 and data.result[0]?)

packet = data
account_mapping = {}
account_ids = []

for packet in (data.result.filter (d)-> d?)
packet.claimed_count ||= 0
packet.slots_count ||= packet.claim_statuses.length

# get amount asset
amount_asset = @asset_records[packet.amount.asset_id]
packet.amount.symbol = amount_asset.symbol
packet.amount.precision = amount_asset.precision

@blockchain_api.get_account(data.from_account_id).then (res) =>
packet.from_account = res

# claimers
account_mapping = {}
claimer_ids = (packet.claim_statuses.filter (s) -> s.account_id != -1).map (s) -> [s.account_id]

if claimer_ids.length > 0
packet.claimers = []

@rpc.request('batch', ['blockchain_get_account', claimer_ids]).then (d) =>
if d.result.length > 0
account_mapping[account.id] = account for account in d.result

for status in packet.claim_statuses
if status.account_id != -1
status.amount.symbol = packet.amount.symbol
status.amount.precision = packet.amount.precision
status.claimer = account_mapping[status.account_id]
# status.claimer.is_mine = my_accounts.indexOf(status.account_id) > -1
packet.claimers.push status

# update claimed_count
packet.claimed_count = packet.claimers.length

account_mapping = null

deferred.resolve packet
packet.claimers = [] if packet.claim_statuses.length > 0

account_ids.push packet.from_account_id
for claimer in packet.claim_statuses
account_ids.push claimer.account_id if claimer.account_id != -1

account_ids = @utils.unique_array(account_ids).map (a)-> [a]
if account_ids.length > 0
@rpc.request("batch", ["blockchain_get_account", account_ids]).then (acct_data) =>
account_mapping[acct.id] = acct for acct in acct_data.result

for packet in data.result
packet.from_account = account_mapping[packet.from_account_id]

for status in packet.claim_statuses
if status.account_id != -1
status.amount.symbol = packet.amount.symbol
status.amount.precision = packet.amount.precision
status.claimer = account_mapping[status.account_id]
# status.claimer.is_mine = my_accounts.indexOf(status.account_id) > -1
packet.claimers.push status

# update claimed_count
packet.claimed_count = packet.claimers.length

account_mapping = null
account_ids = null

# if querying ids, return array
# if querying specific id, return a simply object
if ids instanceof Array
deferred.resolve data.result
else
deferred.resolve packet

return deferred.promise
deferred.resolve data.result[0]
, (err) ->
deferred.reject err

return deferred.promise


angular.module("app").service("Blockchain", ["Client", "NetworkAPI", "RpcService", "BlockchainAPI", "Utils", "$q", "$interval", Blockchain])
41 changes: 28 additions & 13 deletions app/js/services/error.coffee
Original file line number Diff line number Diff line change
@@ -16,15 +16,24 @@ servicesModule.config ($httpProvider, $provide) ->
delegate(exception, cause)
]

processRpcError = (response, Shared) ->
logOrThrow = (error_msg, response, stack) ->
if magic_unicorn?
magic_unicorn.log_message("rpc error: #{error_msg} (#{response.status})\n#{stack}")
else
throw new RpcException(error_msg, response)

processRpcError = (response, $injector, Shared) ->
dont_report = false
method = null
error_msg = if response.data?.error?.message? then response.data.error.message else response.data
error_msg = if response.data?.error?.message? then response.data.error.message else response.data
error_code = response.data?.error?.code

if error_msg and response.config?.url? and response.config.url.match(/\/rpc$/)
if error_msg.match(/No such wallet exists/) or error_msg.match(/wallet does not exist/)
if error_msg and error_code and response.config?.url? and response.config.url.match(/\/rpc$/)
# if error_msg.match(/No such wallet exists/) or error_msg.match(/wallet does not exist/)
if error_code == 20004 or error_msg.match(/No such wallet exists/)
navigate_to("createwallet") unless window.location.hash == "#/createwallet"
dont_report = true

if error_msg.match(/The wallet must be opened/) or error_msg.match(/spending key must be unlocked before executing this command/)
navigate_to("unlockwallet") unless window.location.hash == "#/unlockwallet" or window.location.hash == "#/createwallet"
dont_report = true
@@ -40,14 +49,20 @@ processRpcError = (response, Shared) ->
delete response.config.stack
error_msg = JSON.stringify(response) unless error_msg
console.log "RPC Server Error: #{error_msg} (#{response.status})\n#{response.config?.stack}"
Shared.addError(error_msg, stack, response.data?.error?.detail)
if magic_unicorn?
magic_unicorn.log_message("rpc error: #{error_msg} (#{response.status})\n#{stack}")

if error_code and error_code > 10
$injector.get('$translate')("error.#{error_code}").then (locale_msg)->
error_msg = locale_msg
if response.data?.error?.message?
response.data.error.locale_message = locale_msg
Shared.addError(error_msg, stack, response.data?.error?.detail)

logOrThrow(error_msg, response, stack)
else
throw new RpcException(error_msg, response)
logOrThrow(error_msg, response, stack)


servicesModule.factory "myHttpInterceptor", ($q, Shared) ->
servicesModule.factory "myHttpInterceptor", ($q, $injector, Shared) ->
response: (response) ->
return response until window.rpc_calls_performance_data
method = response.config.data?.method
@@ -58,7 +73,7 @@ servicesModule.factory "myHttpInterceptor", ($q, Shared) ->
window.rpc_calls_performance_data[method] = method_data = { duration: 0.0, calls: 0, stack: response.config.stack}
method_data.duration += duration
++method_data.calls
#console.log "------ response method ------>", method, duration
# console.log "------ response method ------>", method, duration
return response

responseError: (response) ->
@@ -68,7 +83,7 @@ servicesModule.factory "myHttpInterceptor", ($q, Shared) ->
return '' if response.status == 403
if response.config?.error_handler
res = response.config.error_handler(response)
processRpcError(response, Shared) unless res
processRpcError(response, $injector, Shared) unless res
return $q.reject(response)
processRpcError(response, Shared)
return $q.reject(response)
processRpcError(response, $injector, Shared)
return $q.reject(response)
2 changes: 1 addition & 1 deletion app/js/services/info.coffee
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ class Info
@interval (=>
if !@is_refreshing
@refresh_info()
), 2500
), 3000

constructor: (@q, @log, @location, @growl, @common_api, @blockchain, @blockchain_api, @wallet, @interval, @utils) ->

18 changes: 18 additions & 0 deletions app/js/services/wallet.coffee
Original file line number Diff line number Diff line change
@@ -523,6 +523,24 @@ class Wallet

return deferred.promise

# list my involved packets, included:
# created
# claimed
list_red_packets: (acct_id = null) ->
deferred = @q.defer()

@wallet_api.list_packets().then (packets) ->
if !packets or packets.length == 0
deferred.resolve []

packets = (packets.filter (p) -> p.account_id == acct_id) if acct_id
deferred.resolve packets
, (err) ->
deferred.reject err

return deferred.promise


constructor: (@q, @log, @location, @translate, @growl, @rpc, @blockchain, @utils, @wallet_api, @blockchain_api, @RpcService, @interval, @idle) ->
@wallet_name = ""
@timeout = @idle._options().idleDuration
3 changes: 2 additions & 1 deletion app/static/locale-de.json
Original file line number Diff line number Diff line change
@@ -150,7 +150,8 @@
"blocks": {
"load_more_blocks": "Weitere Blöcke laden",
"info": "Details zu den bisherigen Blöcken",
"trxs_only": "Nur Blöcke mit Transaktionen zeigen"
"trxs_only": "Nur Blöcke mit Transaktionen zeigen",
"simple_view": "Simple View"
},
"unlock": {
"btn_unlock": "Anmelden",
178 changes: 174 additions & 4 deletions app/static/locale-en.json
Original file line number Diff line number Diff line change
@@ -52,7 +52,8 @@
"required": "This is required",
"too_short": "Too short",
"maxlength": "Too long",
"number": "Please input number"
"number": "Please input number",
"need_at_least_amount": "至少需要{{value}}"
},
"th": {
"date": "DATE",
@@ -152,7 +153,8 @@
"blocks": {
"load_more_blocks": "Load more blocks",
"info": "More detailed info about blocks",
"trxs_only": "Only show blocks with transactions"
"trxs_only": "Only show blocks with transactions",
"simple_view": "Simple View"
},
"unlock": {
"btn_unlock": "unlock",
@@ -693,7 +695,7 @@
"claimed": "Recently Claimed"
},
"search_string": "Red Packet ID Code",
"from_title": "Red Pakcet From {{sender}}",
"from_title": "Red Packet From {{sender}}",
"from": "From",
"total": "Total",
"input_password": "Red Packet Password",
@@ -704,6 +706,9 @@
"default_message": "This is a small gift, hope you like it.",
"create_packet_title": "Create Red Packet",
"select_from_accounts": "From Account",
"send_red_packet": "Send Red Packet",
"select_from_mine": "Select Red Packet",
"search_id_or_msg": "Search ID or message",
"tip": {
"password_allow_blank": "If no password is required for the red packet, leave it blank",
"bad_password": "Incorrect Password",
@@ -713,7 +718,8 @@
"successful_claimed": "Claim Success",
"not_found": "Red Packet Not Found",
"account_not_registered": "Your current account must be a blockchain-registered account",
"successful_created": "Red Packet is created with success and being submitted to the blockchain"
"successful_created": "Red Packet is created with success and being submitted to the blockchain",
"count_min_tmp": "Minimum count is 2"
},
"btn":{
"search": "Search",
@@ -730,5 +736,169 @@
"tip": {
"reg_acct_required": "Please select registered account to chat"
}
},
"error": {
"10000": "level_map failure" ,
"10001": "level_map open failure" ,
"11000": "level_pod_map failure" ,
"11001": "level_pod_map open failure" ,
"20000": "wallet error" ,
"20001": "invalid password" ,
"20002": "wallet locked" ,
"20003": "wallet already exists" ,
"20004": "wallet does not exist" ,
"20005": "unknown local account" ,
"20006": "unknown account" ,
"20007": "wallet closed" ,
"20008": "negative bid" ,
"20009": "invalid price" ,
"20010": "insufficient funds" ,
"20011": "unknown market order" ,
"20012": "fee greater than amount" ,
"20013": "unknown address" ,
"20014": "brain key is too short" ,
"20015": "password too short" ,
"20016": "invalid timestamp" ,
"20017": "invalid account name" ,
"20018": "file already exists" ,
"20019": "file not found" ,
"20020": "invalid timeout" ,
"20021": "invalid operation" ,
"20022": "transaction not found" ,
"20023": "invalid transaction id" ,
"20024": "invalid asset symbol" ,
"20025": "duplicate account name" ,
"20026": "not contact account" ,
"20027": "memo too long" ,
"20028": "invalid pay rate" ,
"20029": "invalid wallet name" ,
"20030": "unsupported version" ,
"20031": "invalid fee" ,
"20032": "key belongs to other account" ,
"20033": "double cover" ,
"20034": "stupid order" ,
"20035": "invalid expiration time" ,
"20036": "bad collateral amount" ,
"20037": "unknown slate" ,
"20038": "duplicate key" ,
"20039": "unauthorized child account" ,
"20040": "invalid slate" ,
"20041": "private key not found" ,
"20042": "invalid cancel" ,
"20043": "account not registered" ,
"20044": "invalid contact" ,
"20045": "label already in use" ,
"20046": "account retracted" ,
"20047": "asset issuer not found" ,
"30000": "Blockchain Exception" ,
"30001": "invalid pts address" ,
"30002": "addition overflow" ,
"30003": "subtraction overflow" ,
"30004": "asset/price mismatch" ,
"30005": "unsupported chain operation" ,
"30006": "unknown transaction" ,
"30007": "duplicate transaction" ,
"30008": "zero amount" ,
"30009": "zero price" ,
"30010": "asset divide by self" ,
"30011": "asset divide by zero" ,
"30012": "new database version" ,
"30013": "unlinkable block" ,
"30014": "price out of range" ,
"30015": "block numbers not sequential" ,
"30016": "invalid previous block" ,
"30017": "invalid block time" ,
"30018": "time is in the past" ,
"30019": "time is in the future" ,
"30020": "invalid block digest" ,
"30021": "invalid delegate signee" ,
"30022": "failed checkpoint verification" ,
"30023": "wrong chain id" ,
"30024": "unknown block" ,
"30025": "block is older than our undo history allows us to process",
"30026": "unexpected supply change" ,
"31000": "Evaluation Error" ,
"31001": "negative deposit" ,
"31002": "not a delegate" ,
"31003": "unknown balance record" ,
"31004": "insufficient funds" ,
"31005": "missing signature" ,
"31006": "invalid claim password" ,
"31007": "invalid withdraw condition" ,
"31008": "negative withdraw" ,
"31009": "not an active delegate" ,
"31010": "expired transaction" ,
"31011": "invalid transaction expiration" ,
"31012": "transaction exceeded the maximum transaction size" ,
"32001": "invalid account name" ,
"32002": "unknown account id" ,
"32003": "unknown account name" ,
"32004": "missing parent account signature" ,
"32005": "parent account retracted" ,
"32006": "account expired" ,
"32007": "account already registered" ,
"32008": "account key already in use" ,
"32009": "account retracted" ,
"32010": "unknown parent account name" ,
"32011": "unknown delegate slate" ,
"32012": "too many delegates in slate" ,
"32013": "pay balance remaining" ,
"33002": "not delegates signature" ,
"35001": "invalid precision" ,
"35002": "invalid asset symbol" ,
"35003": "unknown asset id" ,
"35004": "asset symbol in use" ,
"35005": "invalid asset amount" ,
"35006": "negative issue" ,
"35007": "over issue" ,
"35008": "unknown asset symbol" ,
"35009": "asset id in use" ,
"35010": "not user issued" ,
"35011": "invalid asset name" ,
"35012": "amount too large" ,
"35013": "outstanding shares exist" ,
"35014": "invalid fee rate" ,
"35015": "invalid authority" ,
"35016": "permission not available" ,
"36001": "delegate_vote_limit" ,
"36002": "insufficient fee" ,
"36003": "negative fee" ,
"36004": "missing deposit" ,
"36005": "insufficient relay fee" ,
"36006": "fee greater than max" ,
"37001": "invalid market" ,
"37002": "unknown market order" ,
"37003": "shorting base shares" ,
"37004": "insufficient collateral" ,
"37005": "insufficient depth" ,
"37006": "insufficient feeds" ,
"37007": "invalid feed price" ,
"38001": "price multiplication overflow" ,
"38002": "price multiplication underflow" ,
"38003": "price multiplication undefined product 0*inf" ,
"100000": "invalid dice odds" ,
"100001": "duplicate dice in transactions" ,
"100002": "invalid chip symbol" ,
"100003": "game symbol in use" ,
"100004": "invalid game name" ,
"100005": "game id in use" ,
"100006": "unknown game id" ,
"100007": "unknown game" ,
"100008": "unsupported note type" ,
"60000": "RPC Error" ,
"60001": "Missing Parameter" ,
"60002": "Unknown Method" ,
"60003": "Login Required" ,
"70000": "Mail Exception",
"70001": "timestamp too old",
"70002": "timestamp in future",
"70003": "invalid proof-of-work",
"70004": "message too large",
"70005": "message already stored",
"90000": "P2P Networking Exception" ,
"90001": "send queue for this peer exceeded maximum size" ,
"90002": "insufficient relay fee" ,
"90003": "already connected to requested peer" ,
"90004": "block is older than our undo history allows us to process"
}
}
3 changes: 2 additions & 1 deletion app/static/locale-es.json
Original file line number Diff line number Diff line change
@@ -151,7 +151,8 @@
"blocks": {
"load_more_blocks": "Cargar mas Bloques",
"info": "Información mas detallada acerca de los Bloques",
"trxs_only": "Mostrar Solo Bloques con Transacciones"
"trxs_only": "Mostrar Solo Bloques con Transacciones",
"simple_view": "Simple View"
},
"unlock": {
"btn_unlock": "Desbloquear",
3 changes: 2 additions & 1 deletion app/static/locale-it.json
Original file line number Diff line number Diff line change
@@ -150,7 +150,8 @@
"blocks": {
"load_more_blocks": "Carica altri blocchi",
"info": "Informazioni dettagliate sui blocchi",
"trxs_only": "Mostra solo blocchi con transazioni"
"trxs_only": "Mostra solo blocchi con transazioni",
"simple_view": "Simple View"
},
"unlock": {
"btn_unlock": "Sblocca",
3 changes: 2 additions & 1 deletion app/static/locale-ko.json
Original file line number Diff line number Diff line change
@@ -152,7 +152,8 @@
"blocks": {
"load_more_blocks": "블록 더 가져오기",
"info": "블록 상세 정보",
"trxs_only": "트랜잭션이 있는 블록만 보기"
"trxs_only": "트랜잭션이 있는 블록만 보기",
"simple_view": "Simple View"
},
"unlock": {
"btn_unlock": "잠금 해제",
3 changes: 2 additions & 1 deletion app/static/locale-ru.json
Original file line number Diff line number Diff line change
@@ -150,7 +150,8 @@
"blocks": {
"load_more_blocks": "Загрузить еще",
"info": "Более подробная информация о блоках",
"trxs_only": "Показывать только блоки с транзакциями"
"trxs_only": "Показывать только блоки с транзакциями",
"simple_view": "Simple View"
},
"unlock": {
"btn_unlock": "Разблокировать",
176 changes: 173 additions & 3 deletions app/static/locale-zh-CN.json
Original file line number Diff line number Diff line change
@@ -52,7 +52,8 @@
"required": "必填项",
"too_short": "太短",
"maxlength": "太长",
"number": "请输入数字"
"number": "请输入数字",
"need_at_least_amount": "至少需要{{value}}"
},
"th": {
"date": "日期",
@@ -152,7 +153,8 @@
"blocks": {
"load_more_blocks": "更多区块",
"info": "更多关于区块的信息",
"trxs_only": "只显示带有交易的那些区块"
"trxs_only": "只显示带有交易的那些区块",
"simple_view": "简单视图"
},
"unlock": {
"btn_unlock": "解 锁",
@@ -685,6 +687,9 @@
"default_message": "大家开开心心",
"create_packet_title": "创建红包",
"select_from_accounts": "发送账户",
"send_red_packet": "发送红包",
"select_from_mine": "从我创建的红包中选择",
"search_id_or_msg": "ID或消息",
"tip": {
"password_allow_blank": "如果红包没有设置密码,可留空",
"bad_password": "密码错误",
@@ -694,7 +699,8 @@
"successful_claimed": "红包领取成功",
"not_found": "红包未找到",
"account_not_registered": "你的当前账户必须是在区块链上注册过的账户",
"successful_created": "红包创建成功,正在提交至网络"
"successful_created": "红包创建成功,正在提交至网络",
"count_min_tmp": "红包数量至少2个"
},
"btn":{
"search": "搜索",
@@ -711,5 +717,169 @@
"tip": {
"reg_acct_required": "请选择注册账户进行聊天"
}
},
"error": {
"10000": "level_map 失败" ,
"10001": "level_map 打开失败" ,
"11000": "level_pod_map 失败" ,
"11001": "level_pod_map 打开失败" ,
"20000": "钱包错误" ,
"20001": "错误的密码" ,
"20002": "钱包锁定" ,
"20003": "钱包已经存在" ,
"20004": "钱包不存在" ,
"20005": "未知的本地账户" ,
"20006": "未知的账户" ,
"20007": "钱包关闭" ,
"20008": "出价为负数" ,
"20009": "非法价格" ,
"20010": "资金余额不足" ,
"20011": "未知的市场订单" ,
"20012": "手续费超过金额" ,
"20013": "未知的地址" ,
"20014": "脑钱包密钥过短" ,
"20015": "密码太短" ,
"20016": "错误的时间戳" ,
"20017": "错误的账户名" ,
"20018": "文件已存在" ,
"20019": "文件未找到" ,
"20020": "错误的超时时间设置" ,
"20021": "非法操作" ,
"20022": "交易未找到" ,
"20023": "错误的交易ID" ,
"20024": "错误的资产符号" ,
"20025": "重复的账户名" ,
"20026": "不是联系人账户" ,
"20027": "备注过长" ,
"20028": "错误的支付率" ,
"20029": "非法的钱包名" ,
"20030": "不支持的版本" ,
"20031": "手续费错误" ,
"20032": "私钥属于其他账户" ,
"20033": "重复的平仓" ,
"20034": "不明智的订单" ,
"20035": "错误的过期时间" ,
"20036": "错误的抵押金额" ,
"20037": "未知的受托人名单" ,
"20038": "重复的键值" ,
"20039": "未授权的子账户" ,
"20040": "非法受托人名单" ,
"20041": "私钥未找到" ,
"20042": "无效的取消" ,
"20043": "账户未在区块链上注册" ,
"20044": "非法的联系人" ,
"20045": "标签已经被使用" ,
"20046": "账户已撤回" ,
"20047": "资产发行人未找到" ,
"30000": "区块链异常" ,
"30001": "非法的PTS地址" ,
"30002": "增加溢出" ,
"30003": "扣减溢出" ,
"30004": "资产/价格不匹配" ,
"30005": "不支持的区块链操作" ,
"30006": "未知的交易" ,
"30007": "重复的交易" ,
"30008": "0金额" ,
"30009": "0价格" ,
"30010": "资产被自身除" ,
"30011": "资产被0除" ,
"30012": "新的数据库版本" ,
"30013": "无法链接的块" ,
"30014": "价格超出范围" ,
"30015": "块序号不连续" ,
"30016": "非法的前序块" ,
"30017": "非法的块时间" ,
"30018": "过去的时间" ,
"30019": "未来的时间" ,
"30020": "非法的块摘要" ,
"30021": "非法的签署受托人" ,
"30022": "失败的检查点验证" ,
"30023": "错误的区块链ID" ,
"30024": "未知的块" ,
"30025": "区块太老,超过取消历史允许的范围,而无法处理",
"30026": "意外的供给变化" ,
"31000": "赋值错误" ,
"31001": "存款金额为负数" ,
"31002": "不是受托人" ,
"31003": "未知的余额记录" ,
"31004": "资金余额不足" ,
"31005": "签名缺失" ,
"31006": "错误的领取密码" ,
"31007": "错误的提取条件" ,
"31008": "提取金额为负数" ,
"31009": "不是活跃的受托人" ,
"31010": "过期的交易" ,
"31011": "非法的交易过期" ,
"31012": "交易超过允许的最大交易大小" ,
"32001": "非法的账户名" ,
"32002": "未知的账户ID" ,
"32003": "未知的账户名" ,
"32004": "父账户签名缺失" ,
"32005": "父账户已撤销" ,
"32006": "账户已过期" ,
"32007": "账户已注册" ,
"32008": "账户私钥已使用" ,
"32009": "账户已撤销" ,
"32010": "未知的父账户" ,
"32011": "未知的受托人名单" ,
"32012": "名单中受托人数量过多" ,
"32013": "支付余额剩余" ,
"33002": "不是受托人的签名" ,
"35001": "非法的精度" ,
"35002": "非法的资产符合" ,
"35003": "未知的资产ID" ,
"35004": "资产代码已被使用" ,
"35005": "非法的资产金额" ,
"35006": "发行量为负数" ,
"35007": "发行量过多" ,
"35008": "未知的资产符号" ,
"35009": "资产ID已被使用" ,
"35010": "不是用户发行的" ,
"35011": "非法的资产名" ,
"35012": "数量过大" ,
"35013": "存在未处理的股份" ,
"35014": "非法的手续费率" ,
"35015": "非法的授权" ,
"35016": "权限不可用" ,
"36001": "受托人投票限制" ,
"36002": "手续费不足" ,
"36003": "手续费为负数" ,
"36004": "缺失的存款" ,
"36005": "中继手续费不足" ,
"36006": "手续费超过最大值" ,
"37001": "非法的市场" ,
"37002": "未知的市场订单" ,
"37003": "做空基础股份" ,
"37004": "抵押不足" ,
"37005": "深度不足" ,
"37006": "喂价不足" ,
"37007": "非法的喂价" ,
"38001": "价格增加溢出" ,
"38002": "价格增加下溢" ,
"38003": "price multiplication undefined product 0*inf" ,
"100000": "非法的概率" ,
"100001": "重复的Dice操作" ,
"100002": "非法的筹码符号" ,
"100003": "游戏符号已被使用" ,
"100004": "非法的游戏名称" ,
"100005": "游戏ID已被使用 use" ,
"100006": "未知的游戏ID" ,
"100007": "未知的游戏" ,
"100008": "不支持的日志类型" ,
"60000": "RPC 错误" ,
"60001": "参数缺失" ,
"60002": "未知的方法" ,
"60003": "要求登录" ,
"70000": "邮件异常",
"70001": "时间戳太久",
"70002": "未来的时间戳",
"70003": "无效的工作量证明",
"70004": "消息过大",
"70005": "消息已储存",
"90000": "P2P 网络异常" ,
"90001": "该节点发送队列超出最大值" ,
"90002": "中继手续费不足" ,
"90003": "已连接到请求的节点" ,
"90004": "区块太老,超过取消历史允许的范围,而无法处理"
}
}
12 changes: 6 additions & 6 deletions app/templates/advanced/preferences.html
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ <h3 class="header-title" translate>pref.title</h3>
<!-- wallet lock timeout -->
<label class="col-sm-offset-1 col-sm-3 control-label" for="timeout" translate>pref.logout_timeout</label>
<md-input-container>
<div class="col-sm-3 input-group">
<div class="col-sm-4 input-group">
<input id="timeout" numonly autofocus ng-model="model.timeout" name="timeout" class="form-control" />
<span class="input-group-addon">{{ 'utils.seconds' | translate}}</span>
</div>
@@ -20,7 +20,7 @@ <h3 class="header-title" translate>pref.title</h3>
<label class="col-sm-offset-1 col-sm-3 control-label" for="transaction_fee" translate>pref.trx_fee</label>

<md-input-container>
<div class="col-sm-3 input-group">
<div class="col-sm-4 input-group">
<input id="transaction_fee" decimalonly ng-model="model.transaction_fee" name="transaction_fee"
class="form-control" ng-disabled="is_bitshares_js"/>
<span class="input-group-addon">{{model.symbol}}</span>
@@ -30,7 +30,7 @@ <h3 class="header-title" translate>pref.title</h3>
<!-- voting options -->
<label class="col-sm-offset-1 col-sm-3 control-label" translate>pref.default_vote</label>
<md-input-container>
<div class="col-sm-3 input-group">
<div class="col-sm-4 input-group">
<div class="btn-group" dropdown is-open="status3.isopen">
<button type="button" class="btn dropdown-toggle" dropdown-toggle>
{{ ('account.vote.' + voting.vote_options[voting.default_vote]) | translate }} <span class="caret"></span>
@@ -48,7 +48,7 @@ <h3 class="header-title" translate>pref.title</h3>
<!-- interface language -->
<label class="col-sm-offset-1 col-sm-3 control-label" for="language" translate>pref.language</label>
<md-input-container>
<div class="col-sm-3 input-group" dropdown is-open="status2.isopen">
<div class="col-sm-4 input-group" dropdown is-open="status2.isopen">
<button type="button" class="btn dropdown-toggle" dropdown-toggle>
{{model.language_name}} <span class="caret"></span>
</button>
@@ -62,7 +62,7 @@ <h3 class="header-title" translate>pref.title</h3>

<!-- timezone -->
<label class="col-sm-offset-1 col-sm-3 control-label" translate>pref.timezone</label>
<md-autocomplete class="col-sm-3 input-group"
<md-autocomplete class="col-sm-4 input-group"
md-search-text-change="searchTextChange()"
md-selected-item="model.timezone"
md-search-text="search_text"
@@ -81,7 +81,7 @@ <h3 class="header-title" translate>pref.title</h3>

<!-- <md-input-container>
<label translate>pref.theme</label>
<div class="col-sm-3 no-lr-padding">
<div class="col-sm-4 no-lr-padding">
<div class="btn-group" dropdown is-open="status3.isopen">
<button type="button" class="btn dropdown-toggle" dropdown-toggle>
{{model.theme_name}} <span class="caret"></span>
21 changes: 17 additions & 4 deletions app/templates/blocks.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
<md-card>
<md-card-content>
<div class="pull-right">
<a class="btn btn-primary btn-success btn-top-right"
href="#/blocks/round/{{last_block_round + 1}}?withtrxs={{filter_zero_trxs}}"><i class="fa fa-cubes"></i>
{{'blocks.load_more_blocks' | translate}}...</a>
<div class="checkbox">
<label>
<div class="checker">
<input type="checkbox" name="simple_view" ng-model="simple_view">{{ 'blocks.simple_view' | translate }}</input>
</div>
</label>
</div>
</div>

<div class="header">
<h3 class="header-title" translate>block.block_explorer</h3>
<p class="header-info" translate>blocks.info</p>
</div>

<iframe ng-if="!simple_view" width="100%" id="dacplayblocks" name="dacplayblocks" ng-src="http://blocks.dacplay.org/"></iframe>

<div class="internal-explorer" ng-show="simple_view">

<a class="btn btn-primary btn-success btn-top-right"
href="#/blocks/round/{{last_block_round + 1}}?withtrxs={{filter_zero_trxs}}"><i class="fa fa-cubes"></i>
{{'blocks.load_more_blocks' | translate}}...
</a>
<div class="p-inner pull-right">

<div class="checkbox">
<label>
<div class="checker">
@@ -60,5 +72,6 @@ <h3 class="header-title" translate>block.block_explorer</h3>
</tr>
</tbody>
</table>
</div>
</md-card-content>
</md-card>
13 changes: 10 additions & 3 deletions app/templates/packets/packet.new.html
Original file line number Diff line number Diff line change
@@ -28,10 +28,12 @@ <h2 translate>packet.create_packet_title</h2>
<div flex="1" layout="row">
<md-input-container flex>
<label translate>packet.total</label>
<input required type="number" step="1" name="amount" ng-model="frm_data.amount.amount" min="1" minlength="1">
<input required type="number" step="1" name="amount" ng-model="frm_data.amount.amount" ng-min="(frm_data.count + 1) || 1">
<div ng-messages="form.amount.$error" ng-show="form.amount.$dirty">
<div ng-message="required">{{'tip.required'|translate}}</div>
<div ng-message="number">{{'tip.number'|translate}}</div>
<div ng-message="min">{{'tip.need_at_least_amount' | translate }} {{ (frm_data.count + 1) || 1 }}</div>
<div ng-message="remoteError">{{form.amount.$error.remoteError}}</div>
</div>
</md-input-container>

@@ -48,18 +50,19 @@ <h2 translate>packet.create_packet_title</h2>

<md-input-container flex="1">
<label translate>packet.count</label>
<input required type="number" step="1" name="count" ng-model="frm_data.count" min="1" max="50">
<input required type="number" step="1" name="count" ng-model="frm_data.count" min="1" max="30">
<div ng-messages="form.count.$error" ng-show="form.count.$dirty">
<div ng-message="required">{{'tip.required'|translate}}</div>
<div ng-message="number">{{'tip.number'|translate}}</div>
<div ng-message="min">{{'packet.tip.count_min_tmp'|translate}}</div>
</div>
</md-input-container>
</md-content>

<md-content layout="row">
<md-input-container flex="1">
<label translate>packet.select_from_accounts</label>
<md-select name="from_account" required ng-model="frm_data.from_account_name" layout-align="center">
<md-select name="from_account" required ng-model="frm_data.from_account_name" layout-align="center" required>
<md-option ng-repeat="(name, account) in my_accounts track by name" ng-value="account.name">
<identicon account="{{account.name}}" size="32" class="identicon" /> {{account.name}}: <span class="text-muted">{{account.balance|formatAsset}}</span>
</md-option>
@@ -85,6 +88,10 @@ <h2 translate>packet.create_packet_title</h2>
</md-input-container>
</md-content>

<div ng-messages="form.$error.remoteError" class="error-container" ng-show="form.$error.remoteError">
<div>{{form.$error.remoteError}}</div>
</div>

</md-dialog-content>

<div class="md-actions" layout="row">
1 change: 1 addition & 0 deletions app/templates/packets/packet.show.html
Original file line number Diff line number Diff line change
@@ -37,6 +37,7 @@ <h2 translate translate-values="{sender:packet.from_account.name}">packet.from_t
<div ng-message="dupClaim">{{'packet.tip.dup_claim'|translate}}</div>
<div ng-message="insufficientFund">{{'packet.tip.insufficient_balances'|translate}}</div>
<div ng-message="accountNotRegistered">{{'packet.tip.account_not_registered'|translate}}</div>
<div ng-message="errorMessage">{{form.password.$error.errorMessage}}</div>
</div>
<div flex-order="4" ng-show="form.password.$pristine && form.password.$valid" translate>packet.tip.password_allow_blank</div>
</md-input-container>
2 changes: 2 additions & 0 deletions app/templates/packets/packets.html
Original file line number Diff line number Diff line change
@@ -23,6 +23,7 @@ <h3 class="header-title">搜索红包</h3>
<div class="packet-item" ng-show="search_packet" ng-click="showPacket($event, search_packet.id, search_packet.password)">
<i class="fa fa-envelope"></i>
<div class="packet-message" ng-bind-html="search_packet.message | simpleFormat"></div>
<div class="packet-amount">{{search_packet.amount.amount/search_packet.amount.precision}} <span class="unit">{{search_packet.amount.symbol}}</span></div>
<div class="packet-sender">{{'packet.from'|translate}} {{search_packet.from_account.name}}</div>
<div class="packet-stat">{{search_packet.claimed_count}}/{{search_packet.slots_count}}</div>
</div>
@@ -39,6 +40,7 @@ <h3 class="header-title">{{"packet.type."+type | translate}}</h3>
<div class="packet-item" ng-show="packets[type].length>0" ng-repeat="p in packets[type]" ng-click="showPacket($event, p.id)">
<i class="fa fa-envelope"></i>
<div class="packet-message" ng-bind-html="p.message | simpleFormat"></div>
<div class="packet-amount">{{p.amount.amount/p.amount.precision}} <span class="unit">{{p.amount.symbol}}</span></div>
<div class="packet-sender">{{'packet.from'|translate}} {{p.from_account.name}}</div>
<div class="packet-stat">{{p.claimed_count}}/{{p.slots_count}}</div>
</div>
43 changes: 43 additions & 0 deletions app/templates/packets/packets.my.search.html
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>
29 changes: 24 additions & 5 deletions app/templates/trollbox.html
Original file line number Diff line number Diff line change
@@ -3,21 +3,35 @@

<div class="troll-box" id="troll_box">
<ul>
<li layout="column" class="troll-item" ng-repeat="message in messages track by message.txid" ng-class="{'my-message': message.is_mine}">
<li layout="column" class="troll-item" ng-repeat="message in messages track by message.txid" ng-class="{'my-message': message.is_mine}" ng-switch="message.creative.type">
<div class="chat-sep" ng-if="message.is_fresh" flex="100">{{message.timestamp | localTime}}</div>
<div layout="row" layout-align="start start">
<identicon account="{{message.username}}" size="60" class="identicon" flex-order="{{message.is_mine ? 3 : 1}}" />
<div flex flex-order="2" class="troll-item-can">
<div class="username" data-id="{{message.userid}}">
<a ui-sref="account({name:message.username})">{{message.username}} </a>
<span class="rp" ng-show="message.rp" title="{{message.rp}}">(RP: {{message.rp/100000|number:0}})</span></div>
<div class="message-container">{{message.message}}</div>
<span class="rp" ng-show="message.rp" title="{{message.rp}}">(RP: {{message.rp/100000|number:0}})</span>
</div>

<div ng-switch-when="text" class="message-container">{{message.creative.creative.text}}</div>

<div ng-switch-when="packet" class="packet-container" ng-init="packet = message.creative.creative.packet">
<div class="packet-item" ng-click="showPacket($event, packet.id)">
<i class="fa fa-envelope"></i>
<div class="packet-message" ng-bind-html="packet.message | simpleFormat"></div>
<div class="packet-amount">{{packet.amount.amount/packet.amount.precision}} <span class="unit">{{packet.amount.symbol}}</span></div>
<div class="packet-sender">{{'packet.from'|translate}} {{packet.from_account.name}} </div>
<div class="packet-stat">{{packet.claimed_count}}/{{packet.slots_count}}</div>
</div>
</div>

</div>
<div flex="25" flex-order="{{message.is_mine ? 1 : 3}}"></div>
</div>
</li>
</ul>
</div>

<div class="troll-staging alert alert-warning hide"
ng-class="{'slidedUp': staged_messages.length > 0, 'slidedDown': staged_messages.length == 0}">
<span class="label label-warning">{{'tip.pending'|translate}}</span>
@@ -42,7 +56,7 @@

<md-input-container flex>
<label>{{'ad.write_sth'|translate}}</label>
<input name="message" ng-model="chatBid.creative.creative.text" ng-change="checkFee();" required minlength="1">
<input name="message" ng-model="chatBid.creative.creative.text" ng-change="checkFee(chatBid);" required minlength="1">
<div ng-messages="chat_form.message.$error" ng-show="chat_form.message.$dirty">
<div ng-message="required">{{'tip.required'|translate}}</div>
<div ng-message="minlength">{{'tip.too_short'|translate}}</div>
@@ -53,7 +67,12 @@
<div class="hint text-muted" style="order:5;text-align:right;" ng-show="chatBid.creative.creative.text">{{feeRequired}} {{symbol}}</div>
</md-input-container>

<md-button class="md-primary md-mini">{{'btn.send'|translate}}</md-button>
<md-button type="button" class="md-icon-button"
aria-label="{{'packet.send_red_packet'|translate}}"
ng-click="showSearchPakcetDialog($event)">
<i class="fa fa-envelope packet-cover"></i>
</md-button>
<md-button type="submit" class="md-primary md-mini">{{'btn.send'|translate}}</md-button>
</div>

</form>
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
@@ -33,13 +33,13 @@
"angular-translate-loader-static-files": "~2.4.2",
"angular-pageslide-directive": "~0.1.8",
"ng-idle": "~0.3.5",
"angular-bootstrap": ">=0.12.0",
"angular-bootstrap": "0.13.0",
"angular-ui-grid": "~3.0.0",
"angular-ui-utils": "validate-0.1.0",
"angular-xeditable": "~0.1.8",
"moment": "~2.10.3",
"moment-timezone": "~0.4.0",
"angular-material": "0.10.1",
"angular-material": "0.11.2",
"ng-mfb": "~0.6.0",
"iconfonts": "~0.7.0",
"ionicons": "~2.0.1",

0 comments on commit c4d9fd2

Please sign in to comment.