aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/assets/qml
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-08-12 18:03:06 +0800
committerobscuren <geffobscura@gmail.com>2014-08-12 18:03:06 +0800
commit0c9c79a89ba7579f6a8b8614cd1601b7f0ddaf60 (patch)
tree4f6e22a3c052cc51123e9e97df9a3b5a4285dbcd /ethereal/assets/qml
parentac14f002e6d861ed646fdcc2febb35b2a3ca57aa (diff)
downloaddexon-0c9c79a89ba7579f6a8b8614cd1601b7f0ddaf60.tar.gz
dexon-0c9c79a89ba7579f6a8b8614cd1601b7f0ddaf60.tar.zst
dexon-0c9c79a89ba7579f6a8b8614cd1601b7f0ddaf60.zip
UI update
Diffstat (limited to 'ethereal/assets/qml')
-rw-r--r--ethereal/assets/qml/wallet.qml222
1 files changed, 110 insertions, 112 deletions
diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml
index cbd3fdf18..b3fda0a58 100644
--- a/ethereal/assets/qml/wallet.qml
+++ b/ethereal/assets/qml/wallet.qml
@@ -47,7 +47,10 @@ ApplicationWindow {
MenuItem {
text: "Import App"
shortcut: "Ctrl+o"
- onTriggered: openAppDialog.open()
+ onTriggered: {
+ generalFileDialog.callback = importApp;
+ generalFileDialog.open()
+ }
}
MenuItem {
@@ -58,7 +61,10 @@ ApplicationWindow {
MenuItem {
text: "Add plugin"
onTriggered: {
- mainSplit.addPlugin("test")
+ generalFileDialog.callback = function(path) {
+ addPlugin(path, {canClose: true})
+ }
+ generalFileDialog.open()
}
}
@@ -67,16 +73,23 @@ ApplicationWindow {
MenuItem {
text: "Import key"
shortcut: "Ctrl+i"
- onTriggered: importDialog.open()
+ onTriggered: {
+ generalFileDialog.callback = function(path) {
+ ui.importKey(path)
+ }
+ generalFileDialog.open()
+ }
}
MenuItem {
text: "Export keys"
shortcut: "Ctrl+e"
- onTriggered: exportDialog.open()
+ onTriggered: {
+ generalFileDialog.callback = function(path) {
+ }
+ generalFileDialog.open()
+ }
}
-
- //MenuSeparator {}
}
Menu {
@@ -135,6 +148,81 @@ ApplicationWindow {
}
+ statusBar: StatusBar {
+ height: 32
+ RowLayout {
+ Button {
+ id: miningButton
+ text: "Start Mining"
+ onClicked: {
+ eth.toggleMining()
+ }
+ }
+
+ Button {
+ id: importAppButton
+ text: "Browser"
+ onClicked: {
+ ui.openBrowser()
+ }
+ }
+
+ RowLayout {
+ Label {
+ anchors.left: importAppButton.right
+ anchors.leftMargin: 5
+ id: walletValueLabel
+
+ font.pixelSize: 10
+ styleColor: "#797979"
+ }
+ }
+ }
+
+ Label {
+ y: 6
+ id: lastBlockLabel
+ objectName: "lastBlockLabel"
+ visible: true
+ text: ""
+ font.pixelSize: 10
+ anchors.right: peerGroup.left
+ anchors.rightMargin: 5
+ }
+
+ ProgressBar {
+ id: syncProgressIndicator
+ visible: false
+ objectName: "syncProgressIndicator"
+ y: 3
+ width: 140
+ indeterminate: true
+ anchors.right: peerGroup.left
+ anchors.rightMargin: 5
+ }
+
+ RowLayout {
+ id: peerGroup
+ y: 7
+ anchors.right: parent.right
+ MouseArea {
+ onDoubleClicked: peerWindow.visible = true
+ anchors.fill: parent
+ }
+
+ Label {
+ id: peerLabel
+ font.pixelSize: 8
+ text: "0 / 0"
+ }
+ Image {
+ id: peerImage
+ width: 10; height: 10
+ source: "../network.png"
+ }
+ }
+ }
+
property var blockModel: ListModel {
id: blockModel
@@ -168,6 +256,9 @@ ApplicationWindow {
return view
}
+ /*********************
+ * Main menu.
+ ********************/
Rectangle {
id: menu
Layout.minimumWidth: 80
@@ -201,9 +292,13 @@ ApplicationWindow {
y: 50
anchors.left: parent.left
anchors.right: parent.right
+ spacing: 10
}
}
+ /*********************
+ * Main view
+ ********************/
Rectangle {
id: mainView
color: "#00000000"
@@ -223,28 +318,18 @@ ApplicationWindow {
}
- FileDialog {
- id: openAppDialog
- title: "Open QML Application"
- onAccepted: {
- var path = openAppDialog.fileUrl.toString()
- var ext = path.split('.').pop()
- if(ext == "html" || ext == "htm") {
- ui.openHtml(path)
- }else if(ext == "qml"){
- ui.openQml(path)
- }
+ function importApp(path) {
+ var ext = path.split('.').pop()
+ if(ext == "html" || ext == "htm") {
+ ui.openHtml(path)
+ }else if(ext == "qml"){
+ ui.openQml(path)
}
}
- FileDialog {
- id: exportDialog
- title: "Export keys"
- onAccepted: {
- }
- }
-
-
+ /******************
+ * Dialogs
+ *****************/
FileDialog {
id: generalFileDialog
property var callback;
@@ -254,93 +339,6 @@ ApplicationWindow {
}
}
- FileDialog {
- id: importDialog
- title: "Import key"
- onAccepted: {
- var path = this.fileUrl.toString()
- ui.importKey(path)
- }
- }
-
- statusBar: StatusBar {
- height: 30
- RowLayout {
- Button {
- id: miningButton
- onClicked: {
- eth.toggleMining()
- }
- text: "Start Mining"
- }
-
- Button {
- property var enabled: true
- id: debuggerWindow
- onClicked: {
- ui.startDebugger()
- }
- text: "Debugger"
- }
-
- Button {
- id: importAppButton
- anchors.left: debuggerWindow.right
- anchors.leftMargin: 5
- onClicked: openAppDialog.open()
- text: "Import App"
- }
-
- Label {
- anchors.left: importAppButton.right
- anchors.leftMargin: 5
- id: walletValueLabel
- }
- }
-
- Label {
- y: 6
- id: lastBlockLabel
- objectName: "lastBlockLabel"
- visible: true
- text: ""
- font.pixelSize: 10
- anchors.right: peerGroup.left
- anchors.rightMargin: 5
- }
-
- ProgressBar {
- id: syncProgressIndicator
- visible: false
- objectName: "syncProgressIndicator"
- y: 3
- width: 140
- indeterminate: true
- anchors.right: peerGroup.left
- anchors.rightMargin: 5
- }
-
- RowLayout {
- id: peerGroup
- y: 7
- anchors.right: parent.right
- MouseArea {
- onDoubleClicked: peerWindow.visible = true
- anchors.fill: parent
- }
-
- Label {
- id: peerLabel
- font.pixelSize: 8
- text: "0 / 0"
- }
- Image {
- id: peerImage
- width: 10; height: 10
- source: "../network.png"
- }
- }
- }
function setWalletValue(value) {