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
{
anchors.fill: parent
horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff
ColumnLayout
{
spacing: 0
ListModel
{
id: trListModel
@ -213,6 +215,13 @@ Rectangle {
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
spacing: 20
anchors.left: parent.left
anchors.leftMargin: 10
Label
{
anchors.top: parent.top
Layout.fillWidth: true
anchors.left: parent.left
anchors.leftMargin: 10
text: qsTr("Upload and update your Dapp assets")
}
@ -67,11 +68,11 @@ Rectangle {
Layout.preferredHeight: 20
Rectangle
{
Layout.preferredWidth: col.width / 2
Layout.preferredWidth: col.width / 5
Label
{
text: qsTr("Save Package to")
anchors.right: parent.right
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
}
}
@ -80,7 +81,7 @@ Rectangle {
{
id: packageFolder
visible: true
Layout.preferredWidth: 150
Layout.preferredWidth: 360
text: projectPath + "package/"
}
@ -102,7 +103,8 @@ Rectangle {
Button
{
id: generatePackageBtn
anchors.horizontalCenter: parent.horizontalCenter
anchors.left: parent.left
anchors.leftMargin: 10
text: qsTr("Generate Package")
onClicked:
{
@ -117,7 +119,6 @@ Rectangle {
anchors.top: generatePackageBtn.bottom
anchors.topMargin: 10
visible: root.lastDeployDate !== ""
anchors.horizontalCenter: parent.horizontalCenter
Label
{
id: lastPackage
@ -137,11 +138,11 @@ Rectangle {
Layout.preferredHeight: 20
Rectangle
{
Layout.preferredWidth: col.width / 2
Layout.preferredWidth: col.width / 5
Label
{
text: qsTr("Local package URL")
anchors.right: parent.right
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
}
}
@ -149,7 +150,7 @@ Rectangle {
DefaultTextField
{
id: localPackageUrl
Layout.preferredWidth: 235
Layout.preferredWidth: 450
readOnly: true
}
}
@ -157,7 +158,6 @@ Rectangle {
Label
{
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")
wrapMode: Text.WordWrap
clip: true
@ -171,8 +171,9 @@ Rectangle {
Button
{
Layout.preferredWidth: 200
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Copy Base64")
anchors.left: parent.left
anchors.leftMargin: 10
onClicked:
{
clipboard.text = deploymentDialog.packageStep.packageBase64;
@ -188,8 +189,9 @@ Rectangle {
Button
{
Layout.preferredWidth: 200
anchors.horizontalCenter: parent.horizontalCenter
text: qsTr("Open pastebin")
anchors.left: parent.left
anchors.leftMargin: 10
onClicked:
{
Qt.openUrlExternally("http://pastebin.com/");

32
mix/qml/RegisteringStep.qml

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

4
mix/qml/StateListModel.qml

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

Loading…
Cancel
Save