Skip to content

Commit

Permalink
FEAT: some UI improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
qtxie committed Jul 5, 2019
1 parent f8f59ce commit 7544f90
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
21 changes: 14 additions & 7 deletions btc-ui.red
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ context [
reset-sign-button

accout-info: select keys/btc-accounts address-index
send-dialog/rate: 0:0:1
prepare-tx-dlg/rate: 0:0:1
label-unit/text: unit-name
fee-unit/text: unit-name
clear addr-to/text
clear amount-field/text

update-send-dialog no
view/flags send-dialog 'modal
center-face/with prepare-tx-dlg wallet/ui
view/flags prepare-tx-dlg 'modal
]
]

Expand Down Expand Up @@ -469,19 +469,26 @@ context [
pad 164x10 button "Cancel" [signed-data: none unview] button "Send" :do-confirm
]

prepare-tx-dlg: layout [
title "Preparing the transaction..."
below center
text font-size 12 {Preparing the transaction, Please wait a moment.}
button "Cancel" [unview]
]

setup-actors: does [
send-dialog/rate: 0:0:1
send-dialog/actors: make object! [
prepare-tx-dlg/rate: 0:0:1
prepare-tx-dlg/actors: make object! [
on-time: func [face event /local res][
face/rate: none
update-utxs
tx-rates: btc/get-rate 'all
update-send-dialog yes
unview
view/flags send-dialog 'modal
]
on-close: func [face event][
face/rate: 0:0:1
]
]
]

]
9 changes: 5 additions & 4 deletions wallet.red
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ wallet: context [

list-font: make font! [name: get 'font-fixed size: 11]

signed-data: addr-list: min-size: current-balance: none
signed-data: addr-list: min-size: current-balance: coin-unit: none
addr-per-page: 5
locked?: no

Expand Down Expand Up @@ -320,6 +320,7 @@ wallet: context [
if idx: find token-name " (" [
token-abbr: copy/part token-name idx
]
coin-unit/text: rejoin ["Balances (" token-abbr ")"]
coin-type: either token-abbr = "BTC" [
page: 0
page-info/selected: 1
Expand Down Expand Up @@ -670,15 +671,15 @@ wallet: context [
]

ui: layout compose [
title "RED Wallet"
title "RED Wallet v0.4.0"
text 50 "Device:" dev: drop-list 125 :do-select-device
btn-send: button "Send" :do-send disabled
token-list: drop-list data ["Add Tokens"] 80 select 4 :do-select-token
net-list: drop-list data ["Mainnet" "Testnet"] select 1 :do-select-network
btn-reload: button "Reload" :do-reload disabled
return

my-addr-text: text 185 bold "My Addresses" on-dbl-click [
my-addr-text: text 180 bold "My Addresses" on-dbl-click [
if all [coin-type = 'ETH keys/ledger-nano-s?][
keys/eth-path: either 4 = length? keys/eth-path [
keys/trezor-path
Expand All @@ -689,7 +690,7 @@ wallet: context [
do-reload
]
] pad 160x0
text bold "Balances" right return pad 0x-10
coin-unit: text 120 bold "Balances" right return pad 0x-10

addr-list: text-list font list-font 530x100 return middle

Expand Down

0 comments on commit 7544f90

Please sign in to comment.