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 {
id: root
property var title: "Wallet"
property var iconSource: "../wallet.png"
property var iconSource: "../facet.png"
property var menuItem
objectName: "walletView"

View File

@ -43,14 +43,14 @@ ApplicationWindow {
// Takes care of loading all default plugins
Component.onCompleted: {
addPlugin("./views/wallet.qml", {noAdd: true, section: "ethereum", active: true});
addPlugin("./webapp.qml", {noAdd: true, section: "ethereum", active: true});
addPlugin("./views/wallet.qml", {noAdd: true, close: false, 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/chain.qml", {noAdd: true, section: "legacy"});
addPlugin("./views/info.qml", {noAdd: true, section: "legacy"});
addPlugin("./views/pending_tx.qml", {noAdd: true, section: "legacy"});
addPlugin("./views/javascript.qml", {noAdd: true, section: "legacy"});
addPlugin("./views/transaction.qml", {noAdd: true, close: false, section: "legacy"});
addPlugin("./views/chain.qml", {noAdd: true, close: false, section: "legacy"});
addPlugin("./views/info.qml", {noAdd: true, close: false, section: "legacy"});
addPlugin("./views/pending_tx.qml", {noAdd: true, close: false, section: "legacy"});
addPlugin("./views/javascript.qml", {noAdd: true, close: false, section: "legacy"});
// Call the ready handler
gui.done();
@ -123,7 +123,7 @@ ApplicationWindow {
text: "Add plugin"
onTriggered: {
generalFileDialog.show(true, function(path) {
addPlugin(path, {canClose: true, section: "apps"})
addPlugin(path, {close: true, section: "apps"})
})
}
}
@ -392,6 +392,7 @@ ApplicationWindow {
id: menuItem
property var view;
property var path;
property var closable;
property alias title: label.text
property alias icon: icon.source
@ -502,6 +503,8 @@ ApplicationWindow {
function closeApp() {
if(!this.closable) { return; }
if(this.view.hasOwnProperty("onDestroy")) {
this.view.onDestroy.call(this.view)
}
@ -536,19 +539,9 @@ ApplicationWindow {
comp.view = view
comp.title = view.title
comp.icon = view.iconSource
/*
if(view.secondary !== undefined) {
comp.secondary = view.secondary
}
*/
comp.closable = options.close;
return comp
/*
if(options.canClose) {
//comp.closeButton.visible = options.canClose
}
*/
}
ColumnLayout {
@ -655,7 +648,7 @@ ApplicationWindow {
}
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") {
eth.openHtml(path)
}else if(ext == "qml"){
addPlugin(path, {canClose: true, section: "apps"})
addPlugin(path, {close: true, section: "apps"})
}
}
@ -815,8 +808,10 @@ ApplicationWindow {
Text {
anchors.left: aboutIcon.right
anchors.leftMargin: 10
anchors.top: parent.top
anchors.topMargin: 40
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
maximumHeight: 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 {
id: addrField
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})
}
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 {
r, err := self.JSPipe.Transact(key, recipient, valueStr, gasStr, gasPriceStr, dataStr)
if err != nil {