|
|
@ -40,10 +40,14 @@ ApplicationWindow { |
|
|
|
// Takes care of loading all default plugins |
|
|
|
// Takes care of loading all default plugins |
|
|
|
Component.onCompleted: { |
|
|
|
Component.onCompleted: { |
|
|
|
|
|
|
|
|
|
|
|
catalog = addPlugin("./views/catalog.qml", {noAdd: true, close: false, section: "begin"}); |
|
|
|
catalog = addPlugin("./views/catalog.qml", {noAdd: true, close: false, section: "begin", active: true}); |
|
|
|
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}); |
|
|
|
var walletWeb = addPlugin("./views/browser.qml", {noAdd: true, close: false, section: "ethereum", active: false}); |
|
|
|
|
|
|
|
walletWeb.view.url = "http://ethereum-dapp-wallet.meteor.com/"; |
|
|
|
|
|
|
|
walletWeb.menuItem.title = "Wallet"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addPlugin("./views/wallet.qml", {noAdd: true, close: false, section: "legacy"}); |
|
|
|
|
|
|
|
addPlugin("./views/miner.qml", {noAdd: true, close: false, section: "ethereum", active: false}); |
|
|
|
addPlugin("./views/transaction.qml", {noAdd: true, close: false, section: "legacy"}); |
|
|
|
addPlugin("./views/transaction.qml", {noAdd: true, close: false, section: "legacy"}); |
|
|
|
addPlugin("./views/whisper.qml", {noAdd: true, close: false, section: "legacy"}); |
|
|
|
addPlugin("./views/whisper.qml", {noAdd: true, close: false, section: "legacy"}); |
|
|
|
addPlugin("./views/chain.qml", {noAdd: true, close: false, section: "legacy"}); |
|
|
|
addPlugin("./views/chain.qml", {noAdd: true, close: false, section: "legacy"}); |
|
|
@ -60,13 +64,14 @@ ApplicationWindow { |
|
|
|
|
|
|
|
|
|
|
|
function activeView(view, menuItem) { |
|
|
|
function activeView(view, menuItem) { |
|
|
|
mainSplit.setView(view, menuItem) |
|
|
|
mainSplit.setView(view, menuItem) |
|
|
|
if (view.hideUrl) { |
|
|
|
/*if (view.hideUrl) { |
|
|
|
//urlPane.visible = false; |
|
|
|
urlPane.visible = false; |
|
|
|
//mainView.anchors.top = rootView.top |
|
|
|
mainView.anchors.top = rootView.top |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
//urlPane.visible = true; |
|
|
|
urlPane.visible = true; |
|
|
|
//mainView.anchors.top = divider.bottom |
|
|
|
mainView.anchors.top = divider.bottom |
|
|
|
} |
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function addViews(view, path, options) { |
|
|
|
function addViews(view, path, options) { |
|
|
@ -121,13 +126,10 @@ ApplicationWindow { |
|
|
|
|
|
|
|
|
|
|
|
var domainAlreadyOpen = false; |
|
|
|
var domainAlreadyOpen = false; |
|
|
|
|
|
|
|
|
|
|
|
console.log("requested: " + requestedDomain ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(var i = 0; i < mainSplit.views.length; i++) { |
|
|
|
for(var i = 0; i < mainSplit.views.length; i++) { |
|
|
|
if (mainSplit.views[i].view.url) { |
|
|
|
if (mainSplit.views[i].view.url) { |
|
|
|
var matches = mainSplit.views[i].view.url.toString().match(/^[a-z]*\:\/\/(?:www\.)?([^\/?#]+)(?:[\/?#]|$)/i); |
|
|
|
var matches = mainSplit.views[i].view.url.toString().match(/^[a-z]*\:\/\/(?:www\.)?([^\/?#]+)(?:[\/?#]|$)/i); |
|
|
|
var existingDomain = matches && matches[1]; |
|
|
|
var existingDomain = matches && matches[1]; |
|
|
|
console.log("exists: " + existingDomain); |
|
|
|
|
|
|
|
if (requestedDomain == existingDomain) { |
|
|
|
if (requestedDomain == existingDomain) { |
|
|
|
domainAlreadyOpen = true; |
|
|
|
domainAlreadyOpen = true; |
|
|
|
mainSplit.views[i].view.url = url; |
|
|
|
mainSplit.views[i].view.url = url; |
|
|
@ -247,79 +249,6 @@ ApplicationWindow { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
statusBar: StatusBar { |
|
|
|
|
|
|
|
//height: 32 |
|
|
|
|
|
|
|
visible: false |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
id: statusBar |
|
|
|
|
|
|
|
Label { |
|
|
|
|
|
|
|
//y: 6 |
|
|
|
|
|
|
|
id: walletValueLabel |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
font.pixelSize: 10 |
|
|
|
|
|
|
|
styleColor: "#797979" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
|
|
|
Label { |
|
|
|
|
|
|
|
//y: 6 |
|
|
|
|
|
|
|
objectName: "miningLabel" |
|
|
|
|
|
|
|
visible: true |
|
|
|
|
|
|
|
font.pixelSize: 10 |
|
|
|
|
|
|
|
anchors.right: lastBlockLabel.left |
|
|
|
|
|
|
|
anchors.rightMargin: 5 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Label { |
|
|
|
|
|
|
|
id: lastBlockLabel |
|
|
|
|
|
|
|
objectName: "lastBlockLabel" |
|
|
|
|
|
|
|
visible: true |
|
|
|
|
|
|
|
text: "---" |
|
|
|
|
|
|
|
font.pixelSize: 10 |
|
|
|
|
|
|
|
anchors.right: peerGroup.left |
|
|
|
|
|
|
|
anchors.rightMargin: 5 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ProgressBar { |
|
|
|
|
|
|
|
visible: false |
|
|
|
|
|
|
|
id: downloadIndicator |
|
|
|
|
|
|
|
value: 0 |
|
|
|
|
|
|
|
objectName: "downloadIndicator" |
|
|
|
|
|
|
|
y: -4 |
|
|
|
|
|
|
|
x: statusBar.width / 2 - this.width / 2 |
|
|
|
|
|
|
|
width: 160 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Label { |
|
|
|
|
|
|
|
visible: false |
|
|
|
|
|
|
|
objectName: "downloadLabel" |
|
|
|
|
|
|
|
//y: 7 |
|
|
|
|
|
|
|
anchors.left: downloadIndicator.right |
|
|
|
|
|
|
|
anchors.leftMargin: 5 |
|
|
|
|
|
|
|
font.pixelSize: 10 |
|
|
|
|
|
|
|
text: "0 / 0" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RowLayout { |
|
|
|
|
|
|
|
id: peerGroup |
|
|
|
|
|
|
|
//y: 7 |
|
|
|
|
|
|
|
anchors.right: parent.right |
|
|
|
|
|
|
|
MouseArea { |
|
|
|
|
|
|
|
onDoubleClicked: peerWindow.visible = true |
|
|
|
|
|
|
|
anchors.fill: parent |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Label { |
|
|
|
|
|
|
|
id: peerCounterLabel |
|
|
|
|
|
|
|
font.pixelSize: 10 |
|
|
|
|
|
|
|
text: "0 / 0" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
property var blockModel: ListModel { |
|
|
|
property var blockModel: ListModel { |
|
|
|
id: blockModel |
|
|
|
id: blockModel |
|
|
|
} |
|
|
|
} |
|
|
@ -445,10 +374,14 @@ ApplicationWindow { |
|
|
|
property var view; |
|
|
|
property var view; |
|
|
|
property var path; |
|
|
|
property var path; |
|
|
|
property var closable; |
|
|
|
property var closable; |
|
|
|
|
|
|
|
property var badgeContent; |
|
|
|
|
|
|
|
|
|
|
|
property alias title: label.text |
|
|
|
property alias title: label.text |
|
|
|
property alias icon: icon.source |
|
|
|
property alias icon: icon.source |
|
|
|
property alias secondaryTitle: secondary.text |
|
|
|
property alias secondaryTitle: secondary.text |
|
|
|
|
|
|
|
property alias badgeNumber: badgeNumberLabel.text |
|
|
|
|
|
|
|
property alias badgeIcon: badgeIconLabel.text |
|
|
|
|
|
|
|
|
|
|
|
function setSelection(on) { |
|
|
|
function setSelection(on) { |
|
|
|
sel.visible = on |
|
|
|
sel.visible = on |
|
|
|
|
|
|
|
|
|
|
@ -462,7 +395,7 @@ ApplicationWindow { |
|
|
|
label.visible = !on |
|
|
|
label.visible = !on |
|
|
|
buttonLabel.visible = on |
|
|
|
buttonLabel.visible = on |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
width: 192 |
|
|
|
width: 192 |
|
|
|
height: 55 |
|
|
|
height: 55 |
|
|
|
color: "#00000000" |
|
|
|
color: "#00000000" |
|
|
@ -541,7 +474,6 @@ ApplicationWindow { |
|
|
|
if (parent.closable == true) { |
|
|
|
if (parent.closable == true) { |
|
|
|
closeIcon.visible = sel.visible |
|
|
|
closeIcon.visible = sel.visible |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
onExited: { |
|
|
|
onExited: { |
|
|
|
closeIcon.visible = false |
|
|
|
closeIcon.visible = false |
|
|
@ -550,8 +482,8 @@ ApplicationWindow { |
|
|
|
|
|
|
|
|
|
|
|
Image { |
|
|
|
Image { |
|
|
|
id: icon |
|
|
|
id: icon |
|
|
|
height: 24 |
|
|
|
height: 28 |
|
|
|
width: 24 |
|
|
|
width: 28 |
|
|
|
anchors { |
|
|
|
anchors { |
|
|
|
left: parent.left |
|
|
|
left: parent.left |
|
|
|
verticalCenter: parent.verticalCenter |
|
|
|
verticalCenter: parent.verticalCenter |
|
|
@ -574,18 +506,24 @@ ApplicationWindow { |
|
|
|
id: label |
|
|
|
id: label |
|
|
|
font.family: sourceSansPro.name |
|
|
|
font.family: sourceSansPro.name |
|
|
|
font.weight: Font.DemiBold |
|
|
|
font.weight: Font.DemiBold |
|
|
|
|
|
|
|
elide: Text.ElideRight |
|
|
|
|
|
|
|
x:250 |
|
|
|
|
|
|
|
color: "#665F5F" |
|
|
|
|
|
|
|
font.pixelSize: 14 |
|
|
|
anchors { |
|
|
|
anchors { |
|
|
|
left: icon.right |
|
|
|
left: icon.right |
|
|
|
|
|
|
|
right: parent.right |
|
|
|
verticalCenter: parent.verticalCenter |
|
|
|
verticalCenter: parent.verticalCenter |
|
|
|
leftMargin: 6 |
|
|
|
leftMargin: 6 |
|
|
|
// verticalCenterOffset: -10 |
|
|
|
rightMargin: 8 |
|
|
|
|
|
|
|
verticalCenterOffset: (secondaryTitle == "") ? 0 : -10; |
|
|
|
} |
|
|
|
} |
|
|
|
x:250 |
|
|
|
|
|
|
|
color: "#665F5F" |
|
|
|
|
|
|
|
font.pixelSize: 14 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Text { |
|
|
|
Text { |
|
|
|
id: secondary |
|
|
|
id: secondary |
|
|
|
font.family: sourceSansPro.name |
|
|
|
font.family: sourceSansPro.name |
|
|
@ -604,7 +542,7 @@ ApplicationWindow { |
|
|
|
visible: false |
|
|
|
visible: false |
|
|
|
width: 10 |
|
|
|
width: 10 |
|
|
|
height: 10 |
|
|
|
height: 10 |
|
|
|
color: "#FFFFFF" |
|
|
|
color: "#FAFAFA" |
|
|
|
anchors { |
|
|
|
anchors { |
|
|
|
fill: icon |
|
|
|
fill: icon |
|
|
|
} |
|
|
|
} |
|
|
@ -623,9 +561,49 @@ ApplicationWindow { |
|
|
|
centerIn: parent |
|
|
|
centerIn: parent |
|
|
|
} |
|
|
|
} |
|
|
|
color: "#665F5F" |
|
|
|
color: "#665F5F" |
|
|
|
font.pixelSize: 18 |
|
|
|
font.pixelSize: 20 |
|
|
|
text: "\ue082" |
|
|
|
text: "\ue082" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
|
|
|
id: badge |
|
|
|
|
|
|
|
visible: (badgeContent == "icon" || badgeContent == "number" )? true : false |
|
|
|
|
|
|
|
width: 32 |
|
|
|
|
|
|
|
color: "#05000000" |
|
|
|
|
|
|
|
anchors { |
|
|
|
|
|
|
|
right: parent.right; |
|
|
|
|
|
|
|
top: parent.top; |
|
|
|
|
|
|
|
bottom: parent.bottom; |
|
|
|
|
|
|
|
rightMargin: 4; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Text { |
|
|
|
|
|
|
|
id: badgeIconLabel |
|
|
|
|
|
|
|
visible: (badgeContent == "icon") ? true : false; |
|
|
|
|
|
|
|
font.family: simpleLineIcons.name |
|
|
|
|
|
|
|
anchors { |
|
|
|
|
|
|
|
centerIn: parent |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
horizontalAlignment: Text.AlignCenter |
|
|
|
|
|
|
|
color: "#AAA0A0" |
|
|
|
|
|
|
|
font.pixelSize: 20 |
|
|
|
|
|
|
|
text: badgeIcon |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Text { |
|
|
|
|
|
|
|
id: badgeNumberLabel |
|
|
|
|
|
|
|
visible: (badgeContent == "number") ? true : false; |
|
|
|
|
|
|
|
anchors { |
|
|
|
|
|
|
|
centerIn: parent |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
horizontalAlignment: Text.AlignCenter |
|
|
|
|
|
|
|
font.family: sourceSansPro.name |
|
|
|
|
|
|
|
font.weight: Font.Light |
|
|
|
|
|
|
|
color: "#AAA0A0" |
|
|
|
|
|
|
|
font.pixelSize: 18 |
|
|
|
|
|
|
|
text: badgeNumber |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|