removed old windows & added websockets to mist

pull/136/head
obscuren 10 years ago
parent e100aa3c6c
commit 4ed94d3d51
  1. 2
      ethereum/main.go
  2. 17
      mist/assets/qml/main.qml
  3. 31
      mist/assets/qml/views/chain.qml
  4. 1
      mist/assets/qml/views/history.qml
  5. 3
      mist/assets/qml/views/info.qml
  6. 45
      mist/assets/qml/views/javascript.qml
  7. 1
      mist/assets/qml/views/pending_tx.qml
  8. 1
      mist/assets/qml/views/transaction.qml
  9. 44
      mist/flags.go
  10. 6
      mist/main.go

@ -13,7 +13,7 @@ import (
const (
ClientIdentifier = "Ethereum(G)"
Version = "0.6.7"
Version = "0.6.8"
)
var logger = ethlog.NewLogger("CLI")

@ -51,9 +51,8 @@ ApplicationWindow {
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"});
addPlugin("./views/info.qml", {noAdd: true, close: false, section: "legacy"});
addPlugin("./views/jeffcoin/jeffcoin.qml", {noAdd: true, close: false, section: "apps"})
@ -363,12 +362,7 @@ ApplicationWindow {
view.visible = false
view.anchors.fill = mainView
if( !view.hasOwnProperty("iconSource") ) {
console.log("Could not load plugin. Property 'iconSourc' not found on view.");
return;
}
var menuItem = menu.createMenuItem(view.iconSource, view, options);
var menuItem = menu.createMenuItem(view, options);
if( view.hasOwnProperty("menuItem") ) {
view.menuItem = menuItem;
}
@ -525,7 +519,7 @@ ApplicationWindow {
}
}
function createMenuItem(icon, view, options) {
function createMenuItem(view, options) {
if(options === undefined) {
options = {};
}
@ -547,7 +541,10 @@ ApplicationWindow {
comp.view = view
comp.title = view.title
comp.icon = view.iconSource
if(view.hasOwnProperty("iconSource")) {
comp.icon = view.iconSource;
}
comp.closable = options.close;
return comp

@ -8,8 +8,7 @@ import Ethereum 1.0
Rectangle {
id: root
property var title: "Network"
property var iconSource: "../net.png"
property var title: "Block chain"
property var menuItem
objectName: "chainView"
@ -102,22 +101,18 @@ Rectangle {
initial = false
}
/*
var txs = JSON.parse(block.transactions);
if(txs != null){
amount = txs.length
}
*/
var txs = block.transactions;
var amount = block.transactions.length;
var txs = [];
for(var i = 0; i < block.transactions.length; i++) {
var tx = JSON.parse(block.transactions.getAsJson(i));
txs.push(tx);
}
if(initial){
blockModel.append({size: block.size, number: block.number, name: block.name, gasLimit: block.gasLimit, gasUsed: block.gasUsed, coinbase: block.coinbase, hash: block.hash, txs: txs, txAmount: amount, time: block.time, prettyTime: convertToPretty(block.time)})
} else {
blockModel.insert(0, {size: block.size, number: block.number, name: block.name, gasLimit: block.gasLimit, gasUsed: block.gasUsed, coinbase: block.coinbase, hash: block.hash, txs: txs, txAmount: amount, time: block.time, prettyTime: convertToPretty(block.time)})
}
//root.secondary.text = "#" + block.number;
}
Window {
@ -240,16 +235,16 @@ Rectangle {
property var singleBlock: ListModel {
id: singleBlock
}
function setDetails(block){
singleBlock.set(0,block)
function setDetails(bl){
singleBlock.set(0, bl)
popup.height = 300
transactionModel.clear()
if(block.txs !== undefined){
for(var i = 0; i < block.txs.length; i++) {
transactionModel.insert(0, block.txs.get(i))
if(bl.txs !== undefined){
for(var i = 0; i < bl.txs.count; i++) {
transactionModel.insert(0, bl.txs.get(i))
}
if(block.txs.length > 0 && block.txs.get(0).data){
popup.showContractData(block.txs.get(0))
if(bl.txs.count > 0 && bl.txs.get(0).data){
popup.showContractData(bl.txs.get(0))
}
}
txView.forceActiveFocus()

@ -7,7 +7,6 @@ import QtQuick.Controls.Styles 1.1
import Ethereum 1.0
Rectangle {
property var iconSource: "../tx.png"
property var title: "Transactions"
property var menuItem

@ -7,8 +7,7 @@ import QtQuick.Controls.Styles 1.1
import Ethereum 1.0
Rectangle {
property var title: "Information"
property var iconSource: "../heart.png"
property var title: "Debug Info"
property var menuItem
objectName: "infoView"

@ -1,45 +0,0 @@
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
}
}
}

@ -8,7 +8,6 @@ import Ethereum 1.0
Rectangle {
property var title: "Pending Transactions"
property var iconSource: "../tx.png"
property var menuItem
objectName: "pendingTxView"

@ -7,7 +7,6 @@ import QtQuick.Controls.Styles 1.1
import Ethereum 1.0
Rectangle {
property var iconSource: "../new.png"
property var title: "New transaction"
property var menuItem

@ -13,26 +13,29 @@ import (
"github.com/ethereum/eth-go/ethlog"
)
var Identifier string
var KeyRing string
var KeyStore string
var StartRpc bool
var RpcPort int
var UseUPnP bool
var OutboundPort string
var ShowGenesis bool
var AddPeer string
var MaxPeer int
var GenAddr bool
var UseSeed bool
var SecretFile string
var ExportDir string
var NonInteractive bool
var Datadir string
var LogFile string
var ConfigFile string
var DebugFile string
var LogLevel int
var (
Identifier string
KeyRing string
KeyStore string
StartRpc bool
StartWebSockets bool
RpcPort int
UseUPnP bool
OutboundPort string
ShowGenesis bool
AddPeer string
MaxPeer int
GenAddr bool
UseSeed bool
SecretFile string
ExportDir string
NonInteractive bool
Datadir string
LogFile string
ConfigFile string
DebugFile string
LogLevel int
)
// flags specific to gui client
var AssetPath string
@ -83,6 +86,7 @@ func Init() {
flag.IntVar(&MaxPeer, "maxpeer", 10, "maximum desired peers")
flag.IntVar(&RpcPort, "rpcport", 8080, "port to start json-rpc server on")
flag.BoolVar(&StartRpc, "rpc", false, "start rpc server")
flag.BoolVar(&StartWebSockets, "ws", false, "start websocket server")
flag.BoolVar(&NonInteractive, "y", false, "non-interactive mode (say yes to confirmations)")
flag.BoolVar(&UseSeed, "seed", true, "seed peers")
flag.BoolVar(&GenAddr, "genaddr", false, "create a new priv/pub key")

@ -12,7 +12,7 @@ import (
const (
ClientIdentifier = "Mist"
Version = "0.6.7"
Version = "0.6.8"
)
var ethereum *eth.Ethereum
@ -80,6 +80,10 @@ func main() {
utils.HandleInterrupt()
if StartWebSockets {
utils.StartWebSockets(ethereum)
}
// we need to run the interrupt callbacks in case gui is closed
// this skips if we got here by actual interrupt stopping the GUI
if !interrupted {

Loading…
Cancel
Save