merge conflicts
This commit is contained in:
@@ -17,6 +17,7 @@ ApplicationWindow {
|
||||
// Use this to make the window frameless. But then you'll need to do move and resize by hand
|
||||
|
||||
property var ethx : Eth.ethx
|
||||
property var catalog;
|
||||
|
||||
width: 1200
|
||||
height: 820
|
||||
@@ -39,7 +40,7 @@ ApplicationWindow {
|
||||
// Takes care of loading all default plugins
|
||||
Component.onCompleted: {
|
||||
|
||||
var catalog = addPlugin("./views/catalog.qml", {noAdd: true, close: false, section: "begin"});
|
||||
catalog = addPlugin("./views/catalog.qml", {noAdd: true, close: false, section: "begin"});
|
||||
var wallet = addPlugin("./views/wallet.qml", {noAdd: true, close: false, section: "ethereum", active: true});
|
||||
|
||||
addPlugin("./views/miner.qml", {noAdd: true, close: false, section: "ethereum", active: true});
|
||||
@@ -66,6 +67,7 @@ ApplicationWindow {
|
||||
urlPane.visible = true;
|
||||
mainView.anchors.top = divider.bottom
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
function addViews(view, path, options) {
|
||||
@@ -145,28 +147,11 @@ ApplicationWindow {
|
||||
menuBar: MenuBar {
|
||||
Menu {
|
||||
title: "File"
|
||||
MenuItem {
|
||||
text: "Import App"
|
||||
shortcut: "Ctrl+o"
|
||||
onTriggered: {
|
||||
generalFileDialog.show(true, importApp)
|
||||
}
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
text: "Add plugin"
|
||||
onTriggered: {
|
||||
generalFileDialog.show(true, function(path) {
|
||||
addPlugin(path, {close: true, section: "apps"})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
text: "New tab"
|
||||
shortcut: "Ctrl+t"
|
||||
onTriggered: {
|
||||
newBrowserTab("http://etherian.io");
|
||||
activeView(catalog.view, catalog.menuItem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,18 +243,6 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Menu {
|
||||
title: "GLOBAL SHORTCUTS"
|
||||
visible: false
|
||||
MenuItem {
|
||||
visible: false
|
||||
shortcut: "Ctrl+l"
|
||||
onTriggered: {
|
||||
url.focus = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
statusBar: StatusBar {
|
||||
@@ -285,6 +258,7 @@ ApplicationWindow {
|
||||
styleColor: "#797979"
|
||||
}
|
||||
|
||||
/*
|
||||
Label {
|
||||
//y: 6
|
||||
objectName: "miningLabel"
|
||||
@@ -303,6 +277,7 @@ ApplicationWindow {
|
||||
anchors.right: peerGroup.left
|
||||
anchors.rightMargin: 5
|
||||
}
|
||||
*/
|
||||
|
||||
ProgressBar {
|
||||
visible: false
|
||||
@@ -335,7 +310,7 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
Label {
|
||||
id: peerLabel
|
||||
id: peerCounterLabel
|
||||
font.pixelSize: 10
|
||||
text: "0 / 0"
|
||||
}
|
||||
@@ -925,7 +900,6 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function setWalletValue(value) {
|
||||
walletValueLabel.text = value
|
||||
}
|
||||
@@ -935,17 +909,11 @@ ApplicationWindow {
|
||||
var view = mainView.addPlugin(name)
|
||||
}
|
||||
|
||||
function setPeers(text) {
|
||||
peerLabel.text = text
|
||||
}
|
||||
function clearPeers() { peerModel.clear() }
|
||||
function addPeer(peer) { peerModel.append(peer) }
|
||||
|
||||
function addPeer(peer) {
|
||||
// We could just append the whole peer object but it cries if you try to alter them
|
||||
peerModel.append({ip: peer.ip, port: peer.port, lastResponse:timeAgo(peer.lastSend), latency: peer.latency, version: peer.version, caps: peer.caps})
|
||||
}
|
||||
|
||||
function resetPeers(){
|
||||
peerModel.clear()
|
||||
function setPeerCounters(text) {
|
||||
peerCounterLabel.text = text
|
||||
}
|
||||
|
||||
function timeAgo(unixTs){
|
||||
@@ -983,9 +951,9 @@ ApplicationWindow {
|
||||
anchors.fill: parent
|
||||
id: peerTable
|
||||
model: peerModel
|
||||
TableViewColumn{width: 200; role: "ip" ; title: "IP" }
|
||||
TableViewColumn{width: 260; role: "version" ; title: "Version" }
|
||||
TableViewColumn{width: 180; role: "caps" ; title: "Capabilities" }
|
||||
TableViewColumn{width: 180; role: "addr" ; title: "Remote Address" }
|
||||
TableViewColumn{width: 280; role: "nodeID" ; title: "Node ID" }
|
||||
TableViewColumn{width: 180; role: "caps" ; title: "Capabilities" }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1053,37 +1021,25 @@ ApplicationWindow {
|
||||
Window {
|
||||
id: addPeerWin
|
||||
visible: false
|
||||
minimumWidth: 300
|
||||
maximumWidth: 300
|
||||
minimumWidth: 400
|
||||
maximumWidth: 400
|
||||
maximumHeight: 50
|
||||
minimumHeight: 50
|
||||
title: "Connect to peer"
|
||||
|
||||
ComboBox {
|
||||
TextField {
|
||||
id: addrField
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.right: addPeerButton.left
|
||||
anchors.leftMargin: 10
|
||||
anchors.rightMargin: 10
|
||||
placeholderText: "enode://<hex node id>:<IP address>:<port>"
|
||||
onAccepted: {
|
||||
eth.connectToPeer(addrField.currentText)
|
||||
addPeerWin.visible = false
|
||||
}
|
||||
|
||||
editable: true
|
||||
model: ListModel { id: pastPeers }
|
||||
|
||||
Component.onCompleted: {
|
||||
pastPeers.insert(0, {text: "poc-8.ethdev.com:30303"})
|
||||
/*
|
||||
var ips = eth.pastPeers()
|
||||
for(var i = 0; i < ips.length; i++) {
|
||||
pastPeers.append({text: ips.get(i)})
|
||||
}
|
||||
|
||||
pastPeers.insert(0, {text: "poc-7.ethdev.com:30303"})
|
||||
*/
|
||||
if(addrField.text.length != 0) {
|
||||
eth.connectToPeer(addrField.text)
|
||||
addPeerWin.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1092,14 +1048,16 @@ ApplicationWindow {
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.rightMargin: 10
|
||||
text: "Add"
|
||||
text: "Connect"
|
||||
onClicked: {
|
||||
eth.connectToPeer(addrField.currentText)
|
||||
addPeerWin.visible = false
|
||||
if(addrField.text.length != 0) {
|
||||
eth.connectToPeer(addrField.text)
|
||||
addPeerWin.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {
|
||||
addrField.focus = true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import QtQuick.Controls 1.0;
|
||||
import QtQuick.Controls.Styles 1.0
|
||||
import QtQuick.Layouts 1.0;
|
||||
import QtWebEngine 1.0
|
||||
//import QtWebEngine.experimental 1.0
|
||||
import QtWebEngine.experimental 1.0
|
||||
import QtQuick.Window 2.0;
|
||||
|
||||
Rectangle {
|
||||
@@ -340,41 +340,61 @@ Rectangle {
|
||||
WebEngineView {
|
||||
objectName: "webView"
|
||||
id: webview
|
||||
experimental.settings.javascriptCanAccessClipboard: true
|
||||
experimental.settings.localContentCanAccessRemoteUrls: true
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
top: navBar.bottom
|
||||
}
|
||||
z: 10
|
||||
|
||||
z: 10
|
||||
|
||||
onLoadingChanged: {
|
||||
|
||||
// this checks if your app has special header tags
|
||||
Timer {
|
||||
interval: 500; running: true; repeat: true
|
||||
onTriggered: {
|
||||
webview.runJavaScript("try{document.querySelector('meta[name=badge]').getAttribute('content')}catch(e){}", function(badge) {
|
||||
if (badge) {
|
||||
menuItem.secondaryTitle = badge;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onLoadingChanged: {
|
||||
if (loadRequest.status == WebEngineView.LoadSucceededStatus) {
|
||||
webview.runJavaScript("document.title", function(pageTitle) {
|
||||
menuItem.title = pageTitle;
|
||||
});
|
||||
|
||||
webView.runJavaScript("document.querySelector(\"meta[name='ethereum-dapp-url-bar-style']\").getAttribute(\"content\")", function(topBarStyle){
|
||||
|
||||
webView.runJavaScript("try{document.querySelector(\"meta[name='ethereum-dapp-url-bar-style']\").getAttribute(\"content\")}catch(e){}", function(topBarStyle){
|
||||
if (!topBarStyle) {
|
||||
showFullUrlBar(true);
|
||||
navBarBackground.visible = true;
|
||||
back.visible = true;
|
||||
appInfoPane.anchors.leftMargin = 0;
|
||||
appInfoPaneShadow.anchors.leftMargin = 0;
|
||||
webview.anchors.topMargin = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (topBarStyle=="transparent") {
|
||||
// Adjust for a transparent sidebar Dapp
|
||||
navBarBackground.visible = false;
|
||||
back.visible = false;
|
||||
appInfoPane.anchors.leftMargin = -16;
|
||||
appInfoPaneShadow.anchors.leftMargin = -16;
|
||||
webview.anchors.topMargin = -74;
|
||||
navBarBackground.visible = false;
|
||||
back.visible = false;
|
||||
appInfoPane.anchors.leftMargin = -16;
|
||||
appInfoPaneShadow.anchors.leftMargin = -16;
|
||||
webview.anchors.topMargin = -74;
|
||||
webview.runJavaScript("document.querySelector('body').classList.add('ethereum-dapp-url-bar-style-transparent')")
|
||||
|
||||
} else {
|
||||
navBarBackground.visible = true;
|
||||
back.visible = true;
|
||||
appInfoPane.anchors.leftMargin = 0;
|
||||
appInfoPaneShadow.anchors.leftMargin = 0;
|
||||
webview.anchors.topMargin = 0;
|
||||
|
||||
};
|
||||
navBarBackground.visible = true;
|
||||
back.visible = true;
|
||||
appInfoPane.anchors.leftMargin = 0;
|
||||
appInfoPaneShadow.anchors.leftMargin = 0;
|
||||
webview.anchors.topMargin = 0;
|
||||
};
|
||||
});
|
||||
|
||||
// webView.runJavaScript("document.querySelector(\"link[rel='icon']\").getAttribute(\"href\")", function(sideIcon){
|
||||
@@ -391,10 +411,13 @@ Rectangle {
|
||||
var matches = cleanTitle.match(/^[a-z]*\:\/\/([^\/?#]+)(?:[\/?#]|$)/i);
|
||||
var domain = matches && matches[1];
|
||||
|
||||
appDomain.text = domain
|
||||
appTitle.text = webview.title
|
||||
|
||||
showFullUrlBar(false);
|
||||
if (domain)
|
||||
appDomain.text = domain //webview.url.replace("a", "z")
|
||||
if (webview.title)
|
||||
appTitle.text = webview.title
|
||||
|
||||
showFullUrlBar(false);
|
||||
}
|
||||
}
|
||||
onJavaScriptConsoleMessage: {
|
||||
|
||||
@@ -32,18 +32,6 @@ Rectangle {
|
||||
width: 500
|
||||
}
|
||||
|
||||
Label {
|
||||
text: "Client ID"
|
||||
}
|
||||
TextField {
|
||||
text: gui.getCustomIdentifier()
|
||||
width: 500
|
||||
placeholderText: "Anonymous"
|
||||
onTextChanged: {
|
||||
gui.setCustomIdentifier(text)
|
||||
}
|
||||
}
|
||||
|
||||
TextArea {
|
||||
objectName: "statsPane"
|
||||
width: parent.width
|
||||
|
||||
@@ -14,6 +14,27 @@ Rectangle {
|
||||
|
||||
color: "#00000000"
|
||||
|
||||
Label {
|
||||
visible: false
|
||||
id: lastBlockLabel
|
||||
objectName: "lastBlockLabel"
|
||||
text: "---"
|
||||
onTextChanged: {
|
||||
//menuItem.secondaryTitle = text
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
objectName: "miningLabel"
|
||||
visible: false
|
||||
font.pixelSize: 10
|
||||
anchors.right: lastBlockLabel.left
|
||||
anchors.rightMargin: 5
|
||||
onTextChanged: {
|
||||
menuItem.secondaryTitle = text
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 10
|
||||
anchors.fill: parent
|
||||
|
||||
@@ -103,7 +103,7 @@ Rectangle {
|
||||
|
||||
ComboBox {
|
||||
id: valueDenom
|
||||
currentIndex: 6
|
||||
currentIndex: 5
|
||||
model: denomModel
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,7 @@ Rectangle {
|
||||
mainContractColumn.state = "ERROR"
|
||||
} else {
|
||||
txResult.text = "Your transaction has been submitted:\n"
|
||||
txOutput.text = res[0].address
|
||||
txOutput.text = res.toString()
|
||||
mainContractColumn.state = "DONE"
|
||||
|
||||
console.log(res)
|
||||
|
||||
@@ -15,6 +15,15 @@ Rectangle {
|
||||
objectName: "walletView"
|
||||
anchors.fill: parent
|
||||
|
||||
Label {
|
||||
objectName: "balanceLabel"
|
||||
visible: false
|
||||
onTextChanged: {
|
||||
balance.text = text
|
||||
menuItem.secondaryTitle = text
|
||||
}
|
||||
}
|
||||
|
||||
function onReady() {
|
||||
setBalance()
|
||||
}
|
||||
@@ -95,7 +104,7 @@ Rectangle {
|
||||
|
||||
ComboBox {
|
||||
id: valueDenom
|
||||
currentIndex: 6
|
||||
currentIndex: 5
|
||||
model: denomModel
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user