From 85435c10c556cca9ac8edd93cad00207b9bc8278 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 4 Mar 2015 18:20:47 +0100 Subject: [PATCH 1/3] DeploymentDialog.qml Redesign --- mix/qml/DeploymentDialog.qml | 385 +++++++++++++++++++++++------------ mix/qml/StatusPane.qml | 2 +- mix/qml/img/help.png | Bin 0 -> 453 bytes mix/qml/img/openedfolder.png | Bin 0 -> 328 bytes mix/res.qrc | 2 + 5 files changed, 254 insertions(+), 135 deletions(-) create mode 100644 mix/qml/img/help.png create mode 100644 mix/qml/img/openedfolder.png diff --git a/mix/qml/DeploymentDialog.qml b/mix/qml/DeploymentDialog.qml index 5e55e9800..3cf037134 100644 --- a/mix/qml/DeploymentDialog.qml +++ b/mix/qml/DeploymentDialog.qml @@ -15,15 +15,19 @@ Window { id: modalDeploymentDialog modality: Qt.ApplicationModal - width: 930 - height: 350 + width: 735 + height: 480 + maximumWidth: width + minimumWidth: width + maximumHeight: height + minimumHeight: height visible: false property alias applicationUrlEth: applicationUrlEth.text property alias applicationUrlHttp: applicationUrlHttp.text - property string urlHintContract: "c83d3e22645fb015d02043a744921cc2f828c64d" /* TODO: replace with the good address */ + property string urlHintContract: urlHintAddr.text property string packageHash property alias packageBase64: base64Value.text - property string eth: "4c3f7330690ed3657d3fa20fe5717b84010528ae"; /* TODO: replace with the good address */ + property string eth: registrarAddr.text property string currentAccount property alias gasToUse: gasToUseInput.text @@ -150,187 +154,300 @@ Window { } } - Rectangle + Column { - anchors.fill : parent + spacing: 5 + anchors.fill: parent anchors.margins: 10 - color: Style.generic.layout.backgroundColor - GridLayout + ColumnLayout { - columns: 2 - anchors.top: parent.top - anchors.left: parent.left - width: parent.width - DefaultLabel + id: containerDeploy + Layout.fillWidth: true + Layout.preferredHeight: 500 + RowLayout { - text: qsTr("Account used to deploy:") + DefaultLabel + { + text: qsTr("DEPLOYING") + font.italic: true + font.underline: true + Layout.preferredWidth: 356 + } + + Button + { + action: displayHelpAction + iconSource: "qrc:/qml/img/help.png" + } + + Action { + id: displayHelpAction + tooltip: qsTr("Help") + onTriggered: { + Qt.openUrlExternally("https://github.com/ethereum/wiki/wiki/Mix:-The-DApp-IDE#deployment-to-network") + } + } } - Rectangle + GridLayout { - width: 300 - height: 25 - color: "transparent" - ComboBox { - id: comboAccounts - property var balances: [] - onCurrentIndexChanged : { - if (modelAccounts.count > 0) - { - currentAccount = modelAccounts.get(currentIndex).id; - balance.text = balances[currentIndex]; + columns: 2 + width: parent.width + + DefaultLabel + { + text: qsTr("Registrar address:") + } + + DefaultTextField + { + Layout.preferredWidth: 350 + id: registrarAddr + } + + DefaultLabel + { + text: qsTr("Account used to deploy:") + } + + Rectangle + { + width: 300 + height: 25 + color: "transparent" + ComboBox { + id: comboAccounts + property var balances: [] + onCurrentIndexChanged : { + if (modelAccounts.count > 0) + { + currentAccount = modelAccounts.get(currentIndex).id; + balance.text = balances[currentIndex]; + } + } + model: ListModel { + id: modelAccounts } } - model: ListModel { - id: modelAccounts + + DefaultLabel + { + anchors.verticalCenter: parent.verticalCenter + anchors.left: comboAccounts.right + anchors.leftMargin: 20 + id: balance; } } DefaultLabel { - anchors.verticalCenter: parent.verticalCenter - anchors.left: comboAccounts.right - anchors.leftMargin: 20 - id: balance; + text: qsTr("Amount of gas to use for each contract deployment: ") } - } + DefaultTextField + { + text: "20000" + Layout.preferredWidth: 350 + id: gasToUseInput + } - DefaultLabel - { - text: qsTr("Ethereum Application URL: ") - } + DefaultLabel + { + text: qsTr("Ethereum Application URL: ") + } - Rectangle - { - Layout.fillWidth: true - height: 25 - color: "transparent" - DefaultTextField + Rectangle { - width: 350 - id: applicationUrlEth + Layout.fillWidth: true + height: 25 + color: "transparent" + DefaultTextField + { + width: 300 + id: applicationUrlEth + } + + DefaultLabel + { + anchors.verticalCenter: parent.verticalCenter; + anchors.left: applicationUrlEth.right + text: "/" + projectModel.projectTitle + } } DefaultLabel { - anchors.verticalCenter: parent.verticalCenter; - anchors.left: applicationUrlEth.right - text: "/" + projectModel.projectTitle + text: qsTr("Package (Base64): ") } - } - DefaultLabel - { - text: qsTr("Web Application Ressources URL: ") + TextArea + { + Layout.preferredWidth: 350 + readOnly: true + id: base64Value + height: 60 + enabled: base64Value.text != "" + } } - DefaultTextField + Row { - Layout.fillWidth: true - id: applicationUrlHttp - } + Button { + text: qsTr("Deploy"); + tooltip: qsTr("Deploy contract and package resources files.") + onClicked: { + var inError = []; + var ethUrl = ProjectModelCode.formatAppUrl(applicationUrlEth.text); + for (var k in ethUrl) + { + if (ethUrl[k].length > 32) + inError.push(qsTr("Member too long: " + ethUrl[k]) + "\n"); + } + if (!stopForInputError(inError)) + { + if (contractRedeploy.checked) + deployWarningDialog.open(); + else + ProjectModelCode.startDeployProject(false); + } + } + } - DefaultLabel - { - text: qsTr("Amount of gas to use for each contract deployment: ") + CheckBox + { + id: contractRedeploy + enabled: Object.keys(projectModel.deploymentAddresses).length > 0 + checked: Object.keys(projectModel.deploymentAddresses).length == 0 + text: qsTr("Deploy Contract(s)") + anchors.verticalCenter: parent.verticalCenter + } } + } - DefaultTextField - { - text: "20000" - Layout.fillWidth: true - id: gasToUseInput - } + Rectangle + { + width: parent.width + height: 1 + color: "#5891d3" + } - DefaultLabel + ColumnLayout + { + id: containerRegister + Layout.fillWidth: true + Layout.preferredHeight: 500 + RowLayout { - text: qsTr("Package (Base64): ") + DefaultLabel + { + text: qsTr("REGISTERING") + font.italic: true + font.underline: true + Layout.preferredWidth: 356 + } + + Button + { + action: displayHelpAction + iconSource: "qrc:/qml/img/help.png" + } + + Button + { + action: openFolderAction + iconSource: "qrc:/qml/img/openedfolder.png" + } + + Action { + id: openFolderAction + enabled: deploymentDialog.packageBase64 !== "" + tooltip: qsTr("Open Package Folder") + onTriggered: { + fileIo.openFileBrowser(projectModel.deploymentDir); + } + } } - TextArea + GridLayout { + columns: 2 Layout.fillWidth: true - readOnly: true - id: base64Value - height: 60 - enabled: base64Value.text != "" - } - } - MessageDialog { - id: deployDialog - standardButtons: StandardButton.Ok - icon: StandardIcon.Warning - } + DefaultLabel + { + Layout.preferredWidth: 355 + text: qsTr("Url hint address:") + } - MessageDialog { - id: errorDialog - standardButtons: StandardButton.Ok - icon: StandardIcon.Critical - } + DefaultTextField + { + Layout.preferredWidth: 350 + id: urlHintAddr + enabled: rowRegister.isOkToRegister() + } - RowLayout - { - anchors.bottom: parent.bottom - anchors.right: parent.right; - anchors.bottomMargin: 10 - Button { - text: qsTr("Deploy contract / Package resources"); - tooltip: qsTr("Deploy contract and package resources files.") - onClicked: { - var inError = []; - var ethUrl = ProjectModelCode.formatAppUrl(applicationUrlEth.text); - for (var k in ethUrl) - { - if (ethUrl[k].length > 32) - inError.push(qsTr("Member too long: " + ethUrl[k]) + "\n"); - } - if (!stopForInputError(inError)) - deployWarningDialog.open(); + DefaultLabel + { + Layout.preferredWidth: 355 + text: qsTr("Web Application Ressources URL: ") } - } - Button { - text: qsTr("Package resources only"); - tooltip: qsTr("Package resources files.") - enabled: Object.keys(projectModel.deploymentAddresses).length > 0 - onClicked: { - ProjectModelCode.startDeployProject(false); + DefaultTextField + { + Layout.preferredWidth: 350 + id: applicationUrlHttp + enabled: rowRegister.isOkToRegister() } } - Button { - text: qsTr("Open Package Directory"); - enabled: projectModel.deploymentDir !== "" - onClicked: { - fileIo.openFileBrowser(projectModel.deploymentDir); + Rectangle + { + id: rowRegister + Layout.fillWidth: true + + function isOkToRegister() + { + return Object.keys(projectModel.deploymentAddresses).length > 0 && deploymentDialog.packageHash !== ""; } - } - Button { - text: qsTr("Register Web Application"); - tooltip: qsTr("Register hosted Web Application.") - onClicked: { - if (applicationUrlHttp.text === "" || deploymentDialog.packageHash === "") - { - deployDialog.title = text; - deployDialog.text = qsTr("Please provide the link where the resources are stored and ensure the package is aleary built using the deployment step.") - deployDialog.open(); - return; + Button { + text: qsTr("Register"); + tooltip: qsTr("Register hosted Web Application.") + enabled: rowRegister.isOkToRegister() + onClicked: { + if (applicationUrlHttp.text === "" || deploymentDialog.packageHash === "") + { + deployDialog.title = text; + deployDialog.text = qsTr("Please provide the link where the resources are stored and ensure the package is aleary built using the deployment step.") + deployDialog.open(); + return; + } + var inError = []; + if (applicationUrlHttp.text.length > 32) + inError.push(qsTr(applicationUrlHttp.text)); + if (!stopForInputError(inError)) + ProjectModelCode.registerToUrlHint(); } - var inError = []; - if (applicationUrlHttp.text.length > 32) - inError.push(qsTr(applicationUrlHttp.text)); - if (!stopForInputError(inError)) - ProjectModelCode.registerToUrlHint(); } - } - Button { - text: qsTr("Close"); - onClicked: close(); + Button { + anchors.right: parent.right + text: qsTr("Cancel"); + onClicked: close(); + } } } } + + MessageDialog { + id: deployDialog + standardButtons: StandardButton.Ok + icon: StandardIcon.Warning + } + + MessageDialog { + id: errorDialog + standardButtons: StandardButton.Ok + icon: StandardIcon.Critical + } } diff --git a/mix/qml/StatusPane.qml b/mix/qml/StatusPane.qml index 15db4d688..e526d65bd 100644 --- a/mix/qml/StatusPane.qml +++ b/mix/qml/StatusPane.qml @@ -46,7 +46,7 @@ Rectangle { Connections { target:clientModel onRunStarted: infoMessage(qsTr("Running transactions...")); - onRunFailed: errorMessage(qsTr("Error running transactions")); + onRunFailed: errorMessage(qsTr("Error running transactions: " + _message)); onRunComplete: infoMessage(qsTr("Run complete")); onNewBlock: infoMessage(qsTr("New block created")); } diff --git a/mix/qml/img/help.png b/mix/qml/img/help.png new file mode 100644 index 0000000000000000000000000000000000000000..06fffe9f8336b5ad2c9b9e71897bc48a14c61194 GIT binary patch literal 453 zcmV;$0XqJPP)LFPOWG?@KU0#7CG=SE$Y`bRPI*)|V zPc6V(kRnS0XJFcWa3W7YwAMt)q*{fj7_XI2S|um~C|wkVK&@_yNJ4{wz3aVIIVOoE zT99~)hoX~^;-U;BB>0L|PFS2f>paq(T(;<&o@7nSwxe_%lPhdhVXh2fSq1sXELyph8fsd$y+oMqARZYyS*}FTGky~y)?)#;igAR# zqYTa-Qf@@NCQbLMWfj6~>3-{w`q}+v^Tz)`jJQhHP`bQD$=Cs(F&8go?#b?P3R{$Q z&Nfipn3em_&ad2(5h%#CB{}|eekjeA3#LcNb v3`k-&%@+<$5{CU$V_nJIzd0dEp>pg4!5bq}7(DH%00000NkvXXu0mjfN8-P1 literal 0 HcmV?d00001 diff --git a/mix/qml/img/openedfolder.png b/mix/qml/img/openedfolder.png new file mode 100644 index 0000000000000000000000000000000000000000..728839de41ff24f0658da94e78ec1d898b6a3b5d GIT binary patch literal 328 zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2nC-wj^(N7l!{JxM1({$v_d#0*}aI z1_o|n5N2eUHAey{$X?><>&kwgnMFWb@u1`KSwNwyo-U3d8Ta1KxX620fyagSlhw`T z(J9mNCe~U7{Jz>BD zA!-lq8|*ZnprQM9T72mRQC+J^C)T{`H7Z<}_GRy>bm7Z!kDfU2EuXf_=9Gxk$J5*N zG*>%K`B=4nr&8#WR}=54bEmPh2m}hKF0Q|;?DgGUQd^FZWx}>quNS-!Uj40S(N+e= zCn_DcF1u_~y8LFV!ETj~RTrOXUHYZ}P|$&4Cd-qIsjv6@wSKU7F=be~o6mQl_zbJa Vg=R1BC;&ak;OXk;vd$@?2>^2+e=z_6 literal 0 HcmV?d00001 diff --git a/mix/res.qrc b/mix/res.qrc index 852983eae..18fbb1a42 100644 --- a/mix/res.qrc +++ b/mix/res.qrc @@ -103,5 +103,7 @@ qml/img/available_updates.png qml/DeploymentDialog.qml qml/img/search_filled.png + qml/img/help.png + qml/img/openedfolder.png From 36fd3a6276d5a6c82eee2774b3d39372e90a8f9d Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 4 Mar 2015 21:39:08 +0100 Subject: [PATCH 2/3] DeploymentDialog.qml Redesign (replace labels by icons) --- mix/qml/DeploymentDialog.qml | 155 ++++++++++++++++++++++------------- mix/qml/img/b64.png | Bin 0 -> 1131 bytes mix/qml/img/exit.png | Bin 0 -> 351 bytes mix/qml/img/note.png | Bin 0 -> 340 bytes mix/qml/img/run.png | Bin 0 -> 364 bytes mix/res.qrc | 4 + 6 files changed, 103 insertions(+), 56 deletions(-) create mode 100644 mix/qml/img/b64.png create mode 100644 mix/qml/img/exit.png create mode 100644 mix/qml/img/note.png create mode 100644 mix/qml/img/run.png diff --git a/mix/qml/DeploymentDialog.qml b/mix/qml/DeploymentDialog.qml index 3cf037134..07a6cc6d3 100644 --- a/mix/qml/DeploymentDialog.qml +++ b/mix/qml/DeploymentDialog.qml @@ -16,7 +16,7 @@ Window { id: modalDeploymentDialog modality: Qt.ApplicationModal width: 735 - height: 480 + height: 335 maximumWidth: width minimumWidth: width maximumHeight: height @@ -26,7 +26,7 @@ Window { property alias applicationUrlHttp: applicationUrlHttp.text property string urlHintContract: urlHintAddr.text property string packageHash - property alias packageBase64: base64Value.text + property string packageBase64 property string eth: registrarAddr.text property string currentAccount property alias gasToUse: gasToUseInput.text @@ -154,6 +154,11 @@ Window { } } + SourceSansProRegular + { + id: lightFont + } + Column { spacing: 5 @@ -166,12 +171,16 @@ Window { Layout.preferredHeight: 500 RowLayout { - DefaultLabel + Rectangle { - text: qsTr("DEPLOYING") - font.italic: true - font.underline: true - Layout.preferredWidth: 356 + Layout.preferredWidth: 357 + DefaultLabel + { + text: qsTr("Deployment") + font.family: lightFont.name + font.underline: true + anchors.centerIn: parent + } } Button @@ -187,6 +196,50 @@ Window { Qt.openUrlExternally("https://github.com/ethereum/wiki/wiki/Mix:-The-DApp-IDE#deployment-to-network") } } + + Button + { + action: openFolderAction + iconSource: "qrc:/qml/img/openedfolder.png" + } + + Action { + id: openFolderAction + enabled: deploymentDialog.packageBase64 !== "" + tooltip: qsTr("Open Package Folder") + onTriggered: { + fileIo.openFileBrowser(projectModel.deploymentDir); + } + } + + Button + { + action: b64Action + iconSource: "qrc:/qml/img/b64.png" + } + + Action { + id: b64Action + enabled: deploymentDialog.packageBase64 !== "" + tooltip: qsTr("Copy Base64 convertion to ClipBoard") + onTriggered: { + appContext.toClipboard(deploymentDialog.packageBase64); + } + } + + Button + { + action: exitAction + iconSource: "qrc:/qml/img/exit.png" + } + + Action { + id: exitAction + tooltip: qsTr("Exit") + onTriggered: { + close() + } + } } GridLayout @@ -274,28 +327,28 @@ Window { text: "/" + projectModel.projectTitle } } + } - DefaultLabel + RowLayout + { + Layout.fillWidth: true + Rectangle { - text: qsTr("Package (Base64): ") + Layout.preferredWidth: 357 + color: "transparent" } - TextArea + Button { - Layout.preferredWidth: 350 - readOnly: true - id: base64Value - height: 60 - enabled: base64Value.text != "" + id: deployButton + action: runAction + iconSource: "qrc:/qml/img/run.png" } - } - Row - { - Button { - text: qsTr("Deploy"); + Action { + id: runAction tooltip: qsTr("Deploy contract and package resources files.") - onClicked: { + onTriggered: { var inError = []; var ethUrl = ProjectModelCode.formatAppUrl(applicationUrlEth.text); for (var k in ethUrl) @@ -315,6 +368,7 @@ Window { CheckBox { + anchors.left: deployButton.right id: contractRedeploy enabled: Object.keys(projectModel.deploymentAddresses).length > 0 checked: Object.keys(projectModel.deploymentAddresses).length == 0 @@ -338,32 +392,16 @@ Window { Layout.preferredHeight: 500 RowLayout { - DefaultLabel + Layout.preferredHeight: 25 + Rectangle { - text: qsTr("REGISTERING") - font.italic: true - font.underline: true Layout.preferredWidth: 356 - } - - Button - { - action: displayHelpAction - iconSource: "qrc:/qml/img/help.png" - } - - Button - { - action: openFolderAction - iconSource: "qrc:/qml/img/openedfolder.png" - } - - Action { - id: openFolderAction - enabled: deploymentDialog.packageBase64 !== "" - tooltip: qsTr("Open Package Folder") - onTriggered: { - fileIo.openFileBrowser(projectModel.deploymentDir); + DefaultLabel + { + text: qsTr("Registration") + font.family: lightFont.name + font.underline: true + anchors.centerIn: parent } } } @@ -389,7 +427,7 @@ Window { DefaultLabel { Layout.preferredWidth: 355 - text: qsTr("Web Application Ressources URL: ") + text: qsTr("Web Application Resources URL: ") } DefaultTextField @@ -400,21 +438,32 @@ Window { } } - Rectangle + RowLayout { id: rowRegister Layout.fillWidth: true + Rectangle + { + Layout.preferredWidth: 357 + color: "transparent" + } + function isOkToRegister() { return Object.keys(projectModel.deploymentAddresses).length > 0 && deploymentDialog.packageHash !== ""; } Button { - text: qsTr("Register"); - tooltip: qsTr("Register hosted Web Application.") + action: registerAction + iconSource: "qrc:/qml/img/note.png" + } + + Action { + id: registerAction enabled: rowRegister.isOkToRegister() - onClicked: { + tooltip: qsTr("Register hosted Web Application.") + onTriggered: { if (applicationUrlHttp.text === "" || deploymentDialog.packageHash === "") { deployDialog.title = text; @@ -429,12 +478,6 @@ Window { ProjectModelCode.registerToUrlHint(); } } - - Button { - anchors.right: parent.right - text: qsTr("Cancel"); - onClicked: close(); - } } } } diff --git a/mix/qml/img/b64.png b/mix/qml/img/b64.png new file mode 100644 index 0000000000000000000000000000000000000000..2089c948eb380995605131f69c3f85f144a6a28a GIT binary patch literal 1131 zcmV-x1eE)UP)yz0Zp+g@w zElfM4X&(w&MF&2Jj?m4ADN+#``^#prqgk{#*x2;VQfs?5%{@OKOuDm>HEVL4+>IQ# zkb6naIiK_UeShcoJ2%8FT68caSml<8HPNZQ6sp*qTr3tF#K~2=)#RNRqpB8h(lV|9 zaRR1lAcfqi9GI$F#7UT{yOvWhuF!}RFs>1MxiGE)DHq07AmzZg4y05VSAvuR^ca24AuC;<jk6MXX6BDr}&P`3PSzMTX z4*-PNYWDMd-|+`LzQ7?8Ua>Pjq-Ul!UK;V9B+-zWcgKHj0+X3!|S!Cyx!x0>Bt>4#0B-^d$i7hudBl z6gzX}%5SGWT-W?`Z$&_!-G8RRUthN^>rA7DfC=)M|3BJ8lg9?;iU?c)NF<)z3Z*vL z^Z$g-5AVpV8%(XPMNH9)$h<&*YU$}7b7Cac1ArEujKnX-sn8`t4t9h!|V=0&sy08mQ3O~tnW-bJS8}%gN(?6-!ZaVpsN5P%qB4iXa80K99tc-3H?IEa+ODUT9JFR8XfES|Bn? z!Yh_q@_)O%We>=Zt-_9qjOzVR&#_^whAT0$1~g7A4P--T!aU99B%xtyethCe-Y z0VPE(4M15-k2AKm-_6~O?A$OK8AyFa@-zaB*L~H4mnDT^q(KemGF1yu1g1w}^(gOj_^ge9B4VXK%Bx z!fL1Rt6f;J0EBtD7DNoqDdVCsdD}=ZU45>l4GZKTEMvh`k#g8ohYxlhh&EPV%#{C5 xIiO3|&b4YFHIN!e4W#7oTZ#W|)huGP{{R`Xp}18*s2TtO002ovPDHLkV1mU23ta#J literal 0 HcmV?d00001 diff --git a/mix/qml/img/exit.png b/mix/qml/img/exit.png new file mode 100644 index 0000000000000000000000000000000000000000..1233765ae49637f5ebf78a291f83e91fda4d99f8 GIT binary patch literal 351 zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2nC-wj^(N7l!{JxM1({$v_d#0*}aI z1_o|n5N2eUHAey{$X?><>&kwgnMK%0L7$<)7bx_`)5S3)^P&<@y7DoQ?9SlI%w9lWAmK!mQP22?o10-O3d- sp=pBCgnvR^UzXmlW%LS8X;3egZAdKFbhg_5ALwrePgg&ebxsLQ05+<>&kwgnMFiKd)q9x9H7ucPZ!6KjC*fqUF1Dvz~hpveRuxGH6HvMh9;uz$meC?-LV>UpVOm|luVHgbGj+%A_g zJ6DdeNovU*BO4|bRgc{JpE(5D6;|}K+vVOnx9*6T06$yWm4q{8i#CL`8O%k edDm9As!zOMFGlsP-th+%ZVaBTelF{r5}E*>r+q>I literal 0 HcmV?d00001 diff --git a/mix/qml/img/run.png b/mix/qml/img/run.png new file mode 100644 index 0000000000000000000000000000000000000000..37ac046898bec5ae66603c01f1674bd27f691100 GIT binary patch literal 364 zcmeAS@N?(olHy`uVBq!ia0vp^Mj*_=1|;R|J2nC-wj^(N7l!{JxM1({$v_d#0*}aI z1_o|n5N2eUHAey{$X?><>&kwgnMK&t{PCp8zCfX$o-U3d8TZ~s+!j1+z;RgSaLRnX zNs(3_-(H%%&0n7$qj&6C;R|E=KGg{ucmp&2=6qOkG0b|;=k?kb zE~lk8srmkyRIco8-4-?_#(B>D(&e^Ef+y$5yV*&eo9L0-F4Z~l(}j#s*Guo7ie7zu z)xT}liY>ns^~3i5PhwkqU+IzQ(+i(vRjwMwX{B{b z?6v)9`02Ihi`9DSd6(Y=YYQbQO>0@SUsHsu)v2h4;m4z@hj$HE{09aCgQu&X%Q~lo FCIGA>knI2f literal 0 HcmV?d00001 diff --git a/mix/res.qrc b/mix/res.qrc index 18fbb1a42..fc1b2fb23 100644 --- a/mix/res.qrc +++ b/mix/res.qrc @@ -105,5 +105,9 @@ qml/img/search_filled.png qml/img/help.png qml/img/openedfolder.png + qml/img/b64.png + qml/img/exit.png + qml/img/run.png + qml/img/note.png From f719f879b47610a8886e2a411549b6e748df9124 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 5 Mar 2015 10:55:16 +0100 Subject: [PATCH 3/3] small changes --- mix/qml/DeploymentDialog.qml | 19 ++++++++++++------- mix/qml/js/ProjectModel.js | 2 ++ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/mix/qml/DeploymentDialog.qml b/mix/qml/DeploymentDialog.qml index 07a6cc6d3..046dd1689 100644 --- a/mix/qml/DeploymentDialog.qml +++ b/mix/qml/DeploymentDialog.qml @@ -16,7 +16,7 @@ Window { id: modalDeploymentDialog modality: Qt.ApplicationModal width: 735 - height: 335 + height: 320 maximumWidth: width minimumWidth: width maximumHeight: height @@ -221,7 +221,7 @@ Window { Action { id: b64Action enabled: deploymentDialog.packageBase64 !== "" - tooltip: qsTr("Copy Base64 convertion to ClipBoard") + tooltip: qsTr("Copy Base64 conversion to ClipBoard") onTriggered: { appContext.toClipboard(deploymentDialog.packageBase64); } @@ -249,7 +249,7 @@ Window { DefaultLabel { - text: qsTr("Registrar address:") + text: qsTr("Root Registrar address:") } DefaultTextField @@ -316,15 +316,20 @@ Window { color: "transparent" DefaultTextField { - width: 300 + width: 200 id: applicationUrlEth + onTextChanged: { + appUrlFormatted.text = ProjectModelCode.formatAppUrl(text).join('/'); + } } DefaultLabel { + id: appUrlFormatted anchors.verticalCenter: parent.verticalCenter; anchors.left: applicationUrlEth.right - text: "/" + projectModel.projectTitle + font.italic: true + font.pointSize: Style.absoluteSize(-1) } } } @@ -347,7 +352,7 @@ Window { Action { id: runAction - tooltip: qsTr("Deploy contract and package resources files.") + tooltip: qsTr("Deploy contract(s) and Package resources files.") onTriggered: { var inError = []; var ethUrl = ProjectModelCode.formatAppUrl(applicationUrlEth.text); @@ -414,7 +419,7 @@ Window { DefaultLabel { Layout.preferredWidth: 355 - text: qsTr("Url hint address:") + text: qsTr("URL Hint contract address:") } DefaultTextField diff --git a/mix/qml/js/ProjectModel.js b/mix/qml/js/ProjectModel.js index 1ebbf6ef6..d308119ae 100644 --- a/mix/qml/js/ProjectModel.js +++ b/mix/qml/js/ProjectModel.js @@ -609,6 +609,8 @@ function formatAppUrl(url) { if (url.toLowerCase().indexOf("eth://") === 0) url = url.substring(6); + if (url.toLowerCase().indexOf(projectModel.projectTitle + ".") === 0) + url = url.substring(projectModel.projectTitle.length + 1); if (url === "") return [projectModel.projectTitle];