Browse Source

ui changes on deploydialog

cl-refactor
yann300 10 years ago
parent
commit
bb5568aa27
  1. 9
      mix/qml/DeployContractStep.qml
  2. 28
      mix/qml/PackagingStep.qml
  3. 32
      mix/qml/RegisteringStep.qml
  4. 4
      mix/qml/StateListModel.qml

9
mix/qml/DeployContractStep.qml

@ -136,9 +136,11 @@ Rectangle {
ScrollView ScrollView
{ {
anchors.fill: parent anchors.fill: parent
horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
ColumnLayout ColumnLayout
{ {
spacing: 0 spacing: 0
ListModel ListModel
{ {
id: trListModel id: trListModel
@ -213,6 +215,13 @@ Rectangle {
font.italic: true font.italic: true
} }
} }
Rectangle
{
Layout.preferredWidth: scenarioList.width
Layout.preferredHeight: 1
color: "#cccccc"
}
} }
} }
} }

28
mix/qml/PackagingStep.qml

@ -51,13 +51,14 @@ Rectangle {
id: col id: col
spacing: 20 spacing: 20
anchors.left: parent.left
anchors.leftMargin: 10
Label Label
{ {
anchors.top: parent.top anchors.top: parent.top
Layout.fillWidth: true Layout.fillWidth: true
anchors.left: parent.left
anchors.leftMargin: 10
text: qsTr("Upload and update your Dapp assets") text: qsTr("Upload and update your Dapp assets")
} }
@ -67,11 +68,11 @@ Rectangle {
Layout.preferredHeight: 20 Layout.preferredHeight: 20
Rectangle Rectangle
{ {
Layout.preferredWidth: col.width / 2 Layout.preferredWidth: col.width / 5
Label Label
{ {
text: qsTr("Save Package to") text: qsTr("Save Package to")
anchors.right: parent.right anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
} }
@ -80,7 +81,7 @@ Rectangle {
{ {
id: packageFolder id: packageFolder
visible: true visible: true
Layout.preferredWidth: 150 Layout.preferredWidth: 360
text: projectPath + "package/" text: projectPath + "package/"
} }
@ -102,7 +103,8 @@ Rectangle {
Button Button
{ {
id: generatePackageBtn id: generatePackageBtn
anchors.horizontalCenter: parent.horizontalCenter anchors.left: parent.left
anchors.leftMargin: 10
text: qsTr("Generate Package") text: qsTr("Generate Package")
onClicked: onClicked:
{ {
@ -117,7 +119,6 @@ Rectangle {
anchors.top: generatePackageBtn.bottom anchors.top: generatePackageBtn.bottom
anchors.topMargin: 10 anchors.topMargin: 10
visible: root.lastDeployDate !== "" visible: root.lastDeployDate !== ""
anchors.horizontalCenter: parent.horizontalCenter
Label Label
{ {
id: lastPackage id: lastPackage
@ -137,11 +138,11 @@ Rectangle {
Layout.preferredHeight: 20 Layout.preferredHeight: 20
Rectangle Rectangle
{ {
Layout.preferredWidth: col.width / 2 Layout.preferredWidth: col.width / 5
Label Label
{ {
text: qsTr("Local package URL") text: qsTr("Local package URL")
anchors.right: parent.right anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
} }
@ -149,7 +150,7 @@ Rectangle {
DefaultTextField DefaultTextField
{ {
id: localPackageUrl id: localPackageUrl
Layout.preferredWidth: 235 Layout.preferredWidth: 450
readOnly: true readOnly: true
} }
} }
@ -157,7 +158,6 @@ Rectangle {
Label Label
{ {
Layout.preferredWidth: 300 Layout.preferredWidth: 300
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("You have to upload the package to a remote folder, or use a service like pastebin") text: qsTr("You have to upload the package to a remote folder, or use a service like pastebin")
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
clip: true clip: true
@ -171,8 +171,9 @@ Rectangle {
Button Button
{ {
Layout.preferredWidth: 200 Layout.preferredWidth: 200
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Copy Base64") text: qsTr("Copy Base64")
anchors.left: parent.left
anchors.leftMargin: 10
onClicked: onClicked:
{ {
clipboard.text = deploymentDialog.packageStep.packageBase64; clipboard.text = deploymentDialog.packageStep.packageBase64;
@ -188,8 +189,9 @@ Rectangle {
Button Button
{ {
Layout.preferredWidth: 200 Layout.preferredWidth: 200
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Open pastebin") text: qsTr("Open pastebin")
anchors.left: parent.left
anchors.leftMargin: 10
onClicked: onClicked:
{ {
Qt.openUrlExternally("http://pastebin.com/"); Qt.openUrlExternally("http://pastebin.com/");

32
mix/qml/RegisteringStep.qml

@ -82,11 +82,11 @@ Rectangle {
anchors.topMargin: 10 anchors.topMargin: 10
id: col id: col
spacing: 20 spacing: 20
anchors.left: parent.left
anchors.leftMargin: 10
Label Label
{ {
anchors.top: parent.top anchors.top: parent.top
anchors.left: parent.left
anchors.leftMargin: 10
Layout.fillWidth: true Layout.fillWidth: true
text: qsTr("Register your Dapp on the Name registrar Contract") text: qsTr("Register your Dapp on the Name registrar Contract")
} }
@ -97,11 +97,11 @@ Rectangle {
Layout.preferredHeight: 20 Layout.preferredHeight: 20
Rectangle Rectangle
{ {
Layout.preferredWidth: col.width / 2 Layout.preferredWidth: col.width / 5
Label Label
{ {
text: qsTr("Root Registrar address") text: qsTr("Root Registrar address")
anchors.right: parent.right anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
} }
@ -111,7 +111,7 @@ Rectangle {
id: registrarAddr id: registrarAddr
text: "c6d9d2cd449a754c494264e1809c50e34d64562b" text: "c6d9d2cd449a754c494264e1809c50e34d64562b"
visible: true visible: true
Layout.preferredWidth: 235 Layout.preferredWidth: 450
} }
} }
@ -121,11 +121,11 @@ Rectangle {
Layout.preferredHeight: 20 Layout.preferredHeight: 20
Rectangle Rectangle
{ {
Layout.preferredWidth: col.width / 2 Layout.preferredWidth: col.width / 5
Label Label
{ {
text: qsTr("Http URL") text: qsTr("Http URL")
anchors.right: parent.right anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
} }
@ -133,7 +133,7 @@ Rectangle {
DefaultTextField DefaultTextField
{ {
id: applicationUrlHttpCtrl id: applicationUrlHttpCtrl
Layout.preferredWidth: 235 Layout.preferredWidth: 450
} }
Label Label
@ -150,11 +150,11 @@ Rectangle {
Layout.preferredHeight: 20 Layout.preferredHeight: 20
Rectangle Rectangle
{ {
Layout.preferredWidth: col.width / 2 Layout.preferredWidth: col.width / 5
Label Label
{ {
text: qsTr("Registration Cost") text: qsTr("Registration Cost")
anchors.right: parent.right anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
id: ctrRegisterLabel id: ctrRegisterLabel
function calculateRegisterGas() function calculateRegisterGas()
@ -192,11 +192,11 @@ Rectangle {
Layout.preferredHeight: 20 Layout.preferredHeight: 20
Rectangle Rectangle
{ {
Layout.preferredWidth: col.width / 2 Layout.preferredWidth: col.width / 5
Label Label
{ {
text: qsTr("Ethereum URL") text: qsTr("Ethereum URL")
anchors.right: parent.right anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
} }
@ -205,10 +205,10 @@ Rectangle {
{ {
height: 25 height: 25
color: "transparent" color: "transparent"
Layout.preferredWidth: 235 Layout.preferredWidth: 450
DefaultTextField DefaultTextField
{ {
width: 235 width: 450
id: applicationUrlEthCtrl id: applicationUrlEthCtrl
onTextChanged: { onTextChanged: {
ctrRegisterLabel.calculateRegisterGas(); ctrRegisterLabel.calculateRegisterGas();
@ -223,11 +223,11 @@ Rectangle {
Layout.preferredHeight: 20 Layout.preferredHeight: 20
Rectangle Rectangle
{ {
Layout.preferredWidth: col.width / 2 Layout.preferredWidth: col.width / 4
Label Label
{ {
text: qsTr("Formatted Ethereum URL") text: qsTr("Formatted Ethereum URL")
anchors.right: parent.right anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
} }
} }

4
mix/qml/StateListModel.qml

@ -298,7 +298,7 @@ Item {
var ctorTr = defaultTransactionItem(); var ctorTr = defaultTransactionItem();
ctorTr.functionId = c; ctorTr.functionId = c;
ctorTr.contractId = c; ctorTr.contractId = c;
ctorTr.label = qsTr("Deploy") + " " + ctorTr.contractId; ctorTr.label = ctorTr.contractId + "." + ctorTr.contractId + "()"
ctorTr.sender = item.accounts[0].secret; ctorTr.sender = item.accounts[0].secret;
item.transactions.push(ctorTr); item.transactions.push(ctorTr);
item.blocks[0].transactions.push(ctorTr) item.blocks[0].transactions.push(ctorTr)
@ -340,7 +340,7 @@ Item {
var ctorTr = defaultTransactionItem(); var ctorTr = defaultTransactionItem();
ctorTr.functionId = c; ctorTr.functionId = c;
ctorTr.contractId = c; ctorTr.contractId = c;
ctorTr.label = qsTr("Deploy") + " " + ctorTr.contractId; ctorTr.label = ctorTr.contractId + "." + ctorTr.contractId + "()";
ctorTr.sender = state.accounts[0].secret; ctorTr.sender = state.accounts[0].secret;
state.transactions.push(ctorTr); state.transactions.push(ctorTr);
changed = true; changed = true;

Loading…
Cancel
Save