aboutsummaryrefslogtreecommitdiffstats
path: root/Mist/assets/qml/views/javascript.qml
blob: ea05c41485ec7314f049c26fefd99d0053f37232 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 iconSource: "../tx.png"
    property var menuItem

    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
        text: "> JSRE Ready..."
        anchors {
            top: parent.top
            left: parent.left
            right: parent.right
            bottom: input.top
        }
    }
}