aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist/assets/qml/views
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/mist/assets/qml/views')
-rw-r--r--cmd/mist/assets/qml/views/browser.qml69
-rw-r--r--cmd/mist/assets/qml/views/info.qml12
-rw-r--r--cmd/mist/assets/qml/views/miner.qml21
-rw-r--r--cmd/mist/assets/qml/views/transaction.qml4
-rw-r--r--cmd/mist/assets/qml/views/wallet.qml11
5 files changed, 79 insertions, 38 deletions
diff --git a/cmd/mist/assets/qml/views/browser.qml b/cmd/mist/assets/qml/views/browser.qml
index 3a35c2a65..6ded02fcb 100644
--- a/cmd/mist/assets/qml/views/browser.qml
+++ b/cmd/mist/assets/qml/views/browser.qml
@@ -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
-
- onLoadingChanged: {
-
- // this checks if your app has special header tags
+ z: 10
+
+ 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: {
diff --git a/cmd/mist/assets/qml/views/info.qml b/cmd/mist/assets/qml/views/info.qml
index 14ee0bce1..b2d2f521c 100644
--- a/cmd/mist/assets/qml/views/info.qml
+++ b/cmd/mist/assets/qml/views/info.qml
@@ -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
diff --git a/cmd/mist/assets/qml/views/miner.qml b/cmd/mist/assets/qml/views/miner.qml
index 193ce37be..6a199a925 100644
--- a/cmd/mist/assets/qml/views/miner.qml
+++ b/cmd/mist/assets/qml/views/miner.qml
@@ -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
diff --git a/cmd/mist/assets/qml/views/transaction.qml b/cmd/mist/assets/qml/views/transaction.qml
index 62c762956..df798a9c0 100644
--- a/cmd/mist/assets/qml/views/transaction.qml
+++ b/cmd/mist/assets/qml/views/transaction.qml
@@ -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)
diff --git a/cmd/mist/assets/qml/views/wallet.qml b/cmd/mist/assets/qml/views/wallet.qml
index 545098284..59dbae848 100644
--- a/cmd/mist/assets/qml/views/wallet.qml
+++ b/cmd/mist/assets/qml/views/wallet.qml
@@ -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
}