Minor visual updates

This commit is contained in:
obscuren 2014-09-18 11:27:55 +02:00
parent 01863ebff0
commit 7280057228
3 changed files with 889 additions and 906 deletions

View File

@ -9,7 +9,7 @@ import Ethereum 1.0
Rectangle { Rectangle {
id: root id: root
property var title: "Wallet" property var title: "Wallet"
property var iconSource: "../wallet.png" property var iconSource: "../facet.png"
property var menuItem property var menuItem
objectName: "walletView" objectName: "walletView"

View File

@ -43,14 +43,14 @@ ApplicationWindow {
// Takes care of loading all default plugins // Takes care of loading all default plugins
Component.onCompleted: { Component.onCompleted: {
addPlugin("./views/wallet.qml", {noAdd: true, section: "ethereum", active: true}); addPlugin("./views/wallet.qml", {noAdd: true, close: false, section: "ethereum", active: true});
addPlugin("./webapp.qml", {noAdd: true, section: "ethereum", active: true}); addPlugin("./webapp.qml", {noAdd: true, close: false, section: "ethereum", active: true});
addPlugin("./views/transaction.qml", {noAdd: true, section: "legacy"}); addPlugin("./views/transaction.qml", {noAdd: true, close: false, section: "legacy"});
addPlugin("./views/chain.qml", {noAdd: true, section: "legacy"}); addPlugin("./views/chain.qml", {noAdd: true, close: false, section: "legacy"});
addPlugin("./views/info.qml", {noAdd: true, section: "legacy"}); addPlugin("./views/info.qml", {noAdd: true, close: false, section: "legacy"});
addPlugin("./views/pending_tx.qml", {noAdd: true, section: "legacy"}); addPlugin("./views/pending_tx.qml", {noAdd: true, close: false, section: "legacy"});
addPlugin("./views/javascript.qml", {noAdd: true, section: "legacy"}); addPlugin("./views/javascript.qml", {noAdd: true, close: false, section: "legacy"});
// Call the ready handler // Call the ready handler
gui.done(); gui.done();
@ -123,7 +123,7 @@ ApplicationWindow {
text: "Add plugin" text: "Add plugin"
onTriggered: { onTriggered: {
generalFileDialog.show(true, function(path) { generalFileDialog.show(true, function(path) {
addPlugin(path, {canClose: true, section: "apps"}) addPlugin(path, {close: true, section: "apps"})
}) })
} }
} }
@ -392,6 +392,7 @@ ApplicationWindow {
id: menuItem id: menuItem
property var view; property var view;
property var path; property var path;
property var closable;
property alias title: label.text property alias title: label.text
property alias icon: icon.source property alias icon: icon.source
@ -502,6 +503,8 @@ ApplicationWindow {
function closeApp() { function closeApp() {
if(!this.closable) { return; }
if(this.view.hasOwnProperty("onDestroy")) { if(this.view.hasOwnProperty("onDestroy")) {
this.view.onDestroy.call(this.view) this.view.onDestroy.call(this.view)
} }
@ -536,19 +539,9 @@ ApplicationWindow {
comp.view = view comp.view = view
comp.title = view.title comp.title = view.title
comp.icon = view.iconSource comp.icon = view.iconSource
/* comp.closable = options.close;
if(view.secondary !== undefined) {
comp.secondary = view.secondary
}
*/
return comp return comp
/*
if(options.canClose) {
//comp.closeButton.visible = options.canClose
}
*/
} }
ColumnLayout { ColumnLayout {
@ -655,7 +648,7 @@ ApplicationWindow {
} }
Keys.onReturnPressed: { Keys.onReturnPressed: {
addPlugin(this.text, {canClose: true, section: "apps"}) addPlugin(this.text, {close: true, section: "apps"})
} }
} }
@ -721,7 +714,7 @@ ApplicationWindow {
if(ext == "html" || ext == "htm") { if(ext == "html" || ext == "htm") {
eth.openHtml(path) eth.openHtml(path)
}else if(ext == "qml"){ }else if(ext == "qml"){
addPlugin(path, {canClose: true, section: "apps"}) addPlugin(path, {close: true, section: "apps"})
} }
} }
@ -815,8 +808,10 @@ ApplicationWindow {
Text { Text {
anchors.left: aboutIcon.right anchors.left: aboutIcon.right
anchors.leftMargin: 10 anchors.leftMargin: 10
anchors.top: parent.top
anchors.topMargin: 40
font.pointSize: 12 font.pointSize: 12
text: "<h2>Ethereal - Aitne</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Maran Hidskes<br>Viktor Trón<br>" text: "<h2>Mist - Amalthea</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Viktor Trón<br>"
} }
} }
@ -857,24 +852,8 @@ ApplicationWindow {
maximumWidth: 300 maximumWidth: 300
maximumHeight: 50 maximumHeight: 50
minimumHeight: 50 minimumHeight: 50
title: "Add peer" title: "Connect to peer"
/*
TextField {
id: addrField
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.right: addPeerButton.left
anchors.leftMargin: 10
anchors.rightMargin: 10
placeholderText: "address:port"
text: "54.76.56.74:30303"
onAccepted: {
eth.connectToPeer(addrField.text)
addPeerWin.visible = false
}
}
*/
ComboBox { ComboBox {
id: addrField id: addrField
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter

View File

@ -88,6 +88,10 @@ func (self *JSEthereum) GetStateObject(addr string) otto.Value {
return self.toVal(&JSStateObject{ethpipe.NewJSObject(self.JSPipe.World().SafeGet(ethutil.Hex2Bytes(addr))), self}) return self.toVal(&JSStateObject{ethpipe.NewJSObject(self.JSPipe.World().SafeGet(ethutil.Hex2Bytes(addr))), self})
} }
func (self *JSEthereum) Peers() otto.Value {
return self.toVal(self.JSPipe.Peers())
}
func (self *JSEthereum) Transact(key, recipient, valueStr, gasStr, gasPriceStr, dataStr string) otto.Value { func (self *JSEthereum) Transact(key, recipient, valueStr, gasStr, gasPriceStr, dataStr string) otto.Value {
r, err := self.JSPipe.Transact(key, recipient, valueStr, gasStr, gasPriceStr, dataStr) r, err := self.JSPipe.Transact(key, recipient, valueStr, gasStr, gasPriceStr, dataStr)
if err != nil { if err != nil {