pull/115/head
obscuren 10 years ago
parent ac14f002e6
commit 0c9c79a89b
  1. 222
      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) {

Loading…
Cancel
Save