From 95ba340d07a02da40000d4bcf2b1bb24bd7856ef Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 14 Aug 2014 00:18:37 +0200 Subject: Tweaks and fixes + added webview debugger * Require better icons .. someone? :-) --- ethereal/assets/qml/views/history.qml | 2 +- ethereal/assets/qml/views/info.qml | 27 ++----------------- ethereal/assets/qml/views/javascript.qml | 45 ++++++++++++++++++++++++++++++++ ethereal/assets/qml/views/pending_tx.qml | 2 +- 4 files changed, 49 insertions(+), 27 deletions(-) create mode 100644 ethereal/assets/qml/views/javascript.qml (limited to 'ethereal/assets/qml/views') diff --git a/ethereal/assets/qml/views/history.qml b/ethereal/assets/qml/views/history.qml index f50ae8004..a73b7367d 100644 --- a/ethereal/assets/qml/views/history.qml +++ b/ethereal/assets/qml/views/history.qml @@ -29,7 +29,7 @@ Rectangle { model: txModel } - function addTx(type, tx, inout) { + function addTx(tx, inout) { var isContract if (tx.contract == true){ isContract = "Yes" diff --git a/ethereal/assets/qml/views/info.qml b/ethereal/assets/qml/views/info.qml index 9e05e2f8e..fcddd46e2 100644 --- a/ethereal/assets/qml/views/info.qml +++ b/ethereal/assets/qml/views/info.qml @@ -17,6 +17,7 @@ Rectangle { color: "#00000000" Column { + id: info spacing: 3 anchors.fill: parent anchors.topMargin: 5 @@ -49,7 +50,7 @@ Rectangle { } TableView { id: addressView - width: parent.width - 200 + width: parent.width height: 200 anchors.bottom: logLayout.top TableViewColumn{ role: "name"; title: "name" } @@ -58,30 +59,6 @@ Rectangle { model: addressModel } - Rectangle { - anchors.top: addressView.top - anchors.left: addressView.right - anchors.leftMargin: 20 - - TextField { - placeholderText: "Name to register" - id: nameToReg - width: 150 - } - - Button { - anchors.top: nameToReg.bottom - text: "Register" - MouseArea{ - anchors.fill: parent - onClicked: { - gui.registerName(nameToReg.text) - nameToReg.text = "" - } - } - } - } - property var logModel: ListModel { id: logModel } diff --git a/ethereal/assets/qml/views/javascript.qml b/ethereal/assets/qml/views/javascript.qml new file mode 100644 index 000000000..376397130 --- /dev/null +++ b/ethereal/assets/qml/views/javascript.qml @@ -0,0 +1,45 @@ +import QtQuick 2.0 +import QtQuick.Controls 1.0; +import QtQuick.Layouts 1.0; +import QtQuick.Dialogs 1.0; +import QtQuick.Window 2.1; +import QtQuick.Controls.Styles 1.1 +import Ethereum 1.0 + +Rectangle { + property var title: "JavaScript" + property var iconFile: "../tx.png" + + objectName: "javascriptView" + visible: false + anchors.fill: parent + + TextField { + id: input + anchors { + left: parent.left + right: parent.right + bottom: parent.bottom + } + height: 20 + + Keys.onReturnPressed: { + var res = eth.evalJavascriptString(this.text); + this.text = ""; + + output.append(res) + } + } + + TextArea { + id: output + verticalAlignment: TextEdit.AlignBottom + text: "> JSRE Ready..." + anchors { + top: parent.top + left: parent.left + right: parent.right + bottom: input.top + } + } +} diff --git a/ethereal/assets/qml/views/pending_tx.qml b/ethereal/assets/qml/views/pending_tx.qml index 18572e3e2..5c5c496d6 100644 --- a/ethereal/assets/qml/views/pending_tx.qml +++ b/ethereal/assets/qml/views/pending_tx.qml @@ -30,7 +30,7 @@ Rectangle { model: pendingTxModel } - function addTx(type, tx, inout) { + function addTx(tx, inout) { var isContract if (tx.contract == true){ isContract = "Yes" -- cgit