aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/assets/qml/wallet.qml
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-08-10 21:57:42 +0800
committerobscuren <geffobscura@gmail.com>2014-08-10 21:57:42 +0800
commit51a2087081ec0c8a9d0d739c344929c8494e13b6 (patch)
tree25c81e5b0d75d54a904da33036cda29c36f1f8a8 /ethereal/assets/qml/wallet.qml
parent4dc5855dfe08bd427e931d03f2c7ae9105688f67 (diff)
downloaddexon-51a2087081ec0c8a9d0d739c344929c8494e13b6.tar.gz
dexon-51a2087081ec0c8a9d0d739c344929c8494e13b6.tar.zst
dexon-51a2087081ec0c8a9d0d739c344929c8494e13b6.zip
Minor issues
Diffstat (limited to 'ethereal/assets/qml/wallet.qml')
-rw-r--r--ethereal/assets/qml/wallet.qml111
1 files changed, 94 insertions, 17 deletions
diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml
index 92641fb3e..e3ef148b0 100644
--- a/ethereal/assets/qml/wallet.qml
+++ b/ethereal/assets/qml/wallet.qml
@@ -56,6 +56,13 @@ ApplicationWindow {
shortcut: "Ctrl+d"
onTriggered: ui.startDebugger()
}
+
+ MenuItem {
+ text: "Import Tx"
+ onTriggered: {
+ txImportDialog.visible = true
+ }
+ }
}
Menu {
@@ -98,6 +105,7 @@ ApplicationWindow {
historyView.visible = false
newTxView.visible = false
infoView.visible = false
+ pendingTxView.visible = false
view.visible = true
//root.title = "Ethereal - " = view.title
}
@@ -161,6 +169,17 @@ ApplicationWindow {
}
}
}
+
+ Image {
+ source: "../tx.png"
+ anchors.horizontalCenter: parent.horizontalCenter
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ setView(pendingTxView)
+ }
+ }
+ }
}
}
@@ -365,6 +384,28 @@ ApplicationWindow {
}
}
+ Rectangle {
+ anchors.fill: parent
+ visible: false
+ id: pendingTxView
+ property var title: "Pending Transactions"
+
+ property var pendingTxModel: ListModel {
+ id: pendingTxModel
+ }
+
+ TableView {
+ id: pendingTxTableView
+ anchors.fill: parent
+ TableViewColumn{ role: "value" ; title: "Value" ; width: 100 }
+ TableViewColumn{ role: "from" ; title: "sender" ; width: 230 }
+ TableViewColumn{ role: "to" ; title: "Reciever" ; width: 230 }
+ TableViewColumn{ role: "contract" ; title: "Contract" ; width: 100 }
+
+ model: pendingTxModel
+ }
+ }
+
/*
signal addPlugin(string name)
Component {
@@ -501,6 +542,36 @@ ApplicationWindow {
}
Window {
+ id: txImportDialog
+ minimumWidth: 270
+ maximumWidth: 270
+ maximumHeight: 50
+ minimumHeight: 50
+ TextField {
+ id: txImportField
+ width: 170
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.leftMargin: 10
+ onAccepted: {
+ }
+ }
+ Button {
+ anchors.left: txImportField.right
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.leftMargin: 5
+ text: "Import"
+ onClicked: {
+ eth.importTx(txImportField.text)
+ txImportField.visible = false
+ }
+ }
+ Component.onCompleted: {
+ addrField.focus = true
+ }
+ }
+
+ Window {
id: popup
visible: false
//flags: Qt.CustomizeWindowHint | Qt.Tool | Qt.WindowCloseButtonHint
@@ -719,7 +790,7 @@ ApplicationWindow {
walletValueLabel.text = value
}
- function addTx(tx, inout) {
+ function addTx(type, tx, inout) {
var isContract
if (tx.contract == true){
isContract = "Yes"
@@ -727,13 +798,19 @@ ApplicationWindow {
isContract = "No"
}
- var address;
- if(inout == "recv") {
- address = tx.sender;
- } else {
- address = tx.address;
+
+ if(type == "post") {
+ var address;
+ if(inout == "recv") {
+ address = tx.sender;
+ } else {
+ address = tx.address;
+ }
+
+ txModel.insert(0, {inout: inout, hash: tx.hash, address: address, value: tx.value, contract: isContract})
+ } else if(type == "pre") {
+ pendingTxModel.insert(0, {hash: tx.hash, to: tx.address, from: tx.sender, value: tx.value, contract: isContract})
}
- txModel.insert(0, {inout: inout, hash: tx.hash, address: address, value: tx.value, contract: isContract})
}
function addBlock(block, initial) {
@@ -749,7 +826,7 @@ ApplicationWindow {
if(initial){
blockModel.append({number: block.number, name: block.name, gasLimit: block.gasLimit, gasUsed: block.gasUsed, coinbase: block.coinbase, hash: block.hash, txs: txs, txAmount: amount, time: block.time, prettyTime: convertToPretty(block.time)})
- }else{
+ } else {
blockModel.insert(0, {number: block.number, name: block.name, gasLimit: block.gasLimit, gasUsed: block.gasUsed, coinbase: block.coinbase, hash: block.hash, txs: txs, txAmount: amount, time: block.time, prettyTime: convertToPretty(block.time)})
}
}
@@ -805,7 +882,7 @@ ApplicationWindow {
// ******************************************
Window {
id: peerWindow
- //flags: Qt.CustomizeWindowHint | Qt.Tool | Qt.WindowCloseButtonHint
+ //flags: Qt.CustomizeWindowHint | Qt.Tool | Qt.WindowCloseButtonHint
height: 200
width: 700
Rectangle {
@@ -932,10 +1009,10 @@ ApplicationWindow {
placeholderText: "Gas"
text: "500"
/*
- onTextChanged: {
- contractFormReady()
- }
- */
+ onTextChanged: {
+ contractFormReady()
+ }
+ */
}
Label {
id: atLabel
@@ -949,10 +1026,10 @@ ApplicationWindow {
text: "10"
validator: RegExpValidator { regExp: /\d*/ }
/*
- onTextChanged: {
- contractFormReady()
- }
- */
+ onTextChanged: {
+ contractFormReady()
+ }
+ */
}
ComboBox {