Browse Source

DeploymentDialog.qml Redesign (replace labels by icons)

cl-refactor
yann300 10 years ago
parent
commit
36fd3a6276
  1. 155
      mix/qml/DeploymentDialog.qml
  2. BIN
      mix/qml/img/b64.png
  3. BIN
      mix/qml/img/exit.png
  4. BIN
      mix/qml/img/note.png
  5. BIN
      mix/qml/img/run.png
  6. 4
      mix/res.qrc

155
mix/qml/DeploymentDialog.qml

@ -16,7 +16,7 @@ Window {
id: modalDeploymentDialog id: modalDeploymentDialog
modality: Qt.ApplicationModal modality: Qt.ApplicationModal
width: 735 width: 735
height: 480 height: 335
maximumWidth: width maximumWidth: width
minimumWidth: width minimumWidth: width
maximumHeight: height maximumHeight: height
@ -26,7 +26,7 @@ Window {
property alias applicationUrlHttp: applicationUrlHttp.text property alias applicationUrlHttp: applicationUrlHttp.text
property string urlHintContract: urlHintAddr.text property string urlHintContract: urlHintAddr.text
property string packageHash property string packageHash
property alias packageBase64: base64Value.text property string packageBase64
property string eth: registrarAddr.text property string eth: registrarAddr.text
property string currentAccount property string currentAccount
property alias gasToUse: gasToUseInput.text property alias gasToUse: gasToUseInput.text
@ -154,6 +154,11 @@ Window {
} }
} }
SourceSansProRegular
{
id: lightFont
}
Column Column
{ {
spacing: 5 spacing: 5
@ -166,12 +171,16 @@ Window {
Layout.preferredHeight: 500 Layout.preferredHeight: 500
RowLayout RowLayout
{ {
DefaultLabel Rectangle
{ {
text: qsTr("DEPLOYING") Layout.preferredWidth: 357
font.italic: true DefaultLabel
font.underline: true {
Layout.preferredWidth: 356 text: qsTr("Deployment")
font.family: lightFont.name
font.underline: true
anchors.centerIn: parent
}
} }
Button Button
@ -187,6 +196,50 @@ Window {
Qt.openUrlExternally("https://github.com/ethereum/wiki/wiki/Mix:-The-DApp-IDE#deployment-to-network") 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 GridLayout
@ -274,28 +327,28 @@ Window {
text: "/" + projectModel.projectTitle text: "/" + projectModel.projectTitle
} }
} }
}
DefaultLabel RowLayout
{
Layout.fillWidth: true
Rectangle
{ {
text: qsTr("Package (Base64): ") Layout.preferredWidth: 357
color: "transparent"
} }
TextArea Button
{ {
Layout.preferredWidth: 350 id: deployButton
readOnly: true action: runAction
id: base64Value iconSource: "qrc:/qml/img/run.png"
height: 60
enabled: base64Value.text != ""
} }
}
Row Action {
{ id: runAction
Button {
text: qsTr("Deploy");
tooltip: qsTr("Deploy contract and package resources files.") tooltip: qsTr("Deploy contract and package resources files.")
onClicked: { onTriggered: {
var inError = []; var inError = [];
var ethUrl = ProjectModelCode.formatAppUrl(applicationUrlEth.text); var ethUrl = ProjectModelCode.formatAppUrl(applicationUrlEth.text);
for (var k in ethUrl) for (var k in ethUrl)
@ -315,6 +368,7 @@ Window {
CheckBox CheckBox
{ {
anchors.left: deployButton.right
id: contractRedeploy id: contractRedeploy
enabled: Object.keys(projectModel.deploymentAddresses).length > 0 enabled: Object.keys(projectModel.deploymentAddresses).length > 0
checked: Object.keys(projectModel.deploymentAddresses).length == 0 checked: Object.keys(projectModel.deploymentAddresses).length == 0
@ -338,32 +392,16 @@ Window {
Layout.preferredHeight: 500 Layout.preferredHeight: 500
RowLayout RowLayout
{ {
DefaultLabel Layout.preferredHeight: 25
Rectangle
{ {
text: qsTr("REGISTERING")
font.italic: true
font.underline: true
Layout.preferredWidth: 356 Layout.preferredWidth: 356
} DefaultLabel
{
Button text: qsTr("Registration")
{ font.family: lightFont.name
action: displayHelpAction font.underline: true
iconSource: "qrc:/qml/img/help.png" anchors.centerIn: parent
}
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);
} }
} }
} }
@ -389,7 +427,7 @@ Window {
DefaultLabel DefaultLabel
{ {
Layout.preferredWidth: 355 Layout.preferredWidth: 355
text: qsTr("Web Application Ressources URL: ") text: qsTr("Web Application Resources URL: ")
} }
DefaultTextField DefaultTextField
@ -400,21 +438,32 @@ Window {
} }
} }
Rectangle RowLayout
{ {
id: rowRegister id: rowRegister
Layout.fillWidth: true Layout.fillWidth: true
Rectangle
{
Layout.preferredWidth: 357
color: "transparent"
}
function isOkToRegister() function isOkToRegister()
{ {
return Object.keys(projectModel.deploymentAddresses).length > 0 && deploymentDialog.packageHash !== ""; return Object.keys(projectModel.deploymentAddresses).length > 0 && deploymentDialog.packageHash !== "";
} }
Button { Button {
text: qsTr("Register"); action: registerAction
tooltip: qsTr("Register hosted Web Application.") iconSource: "qrc:/qml/img/note.png"
}
Action {
id: registerAction
enabled: rowRegister.isOkToRegister() enabled: rowRegister.isOkToRegister()
onClicked: { tooltip: qsTr("Register hosted Web Application.")
onTriggered: {
if (applicationUrlHttp.text === "" || deploymentDialog.packageHash === "") if (applicationUrlHttp.text === "" || deploymentDialog.packageHash === "")
{ {
deployDialog.title = text; deployDialog.title = text;
@ -429,12 +478,6 @@ Window {
ProjectModelCode.registerToUrlHint(); ProjectModelCode.registerToUrlHint();
} }
} }
Button {
anchors.right: parent.right
text: qsTr("Cancel");
onClicked: close();
}
} }
} }
} }

BIN
mix/qml/img/b64.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
mix/qml/img/exit.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

BIN
mix/qml/img/note.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 B

BIN
mix/qml/img/run.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 364 B

4
mix/res.qrc

@ -105,5 +105,9 @@
<file>qml/img/search_filled.png</file> <file>qml/img/search_filled.png</file>
<file>qml/img/help.png</file> <file>qml/img/help.png</file>
<file>qml/img/openedfolder.png</file> <file>qml/img/openedfolder.png</file>
<file>qml/img/b64.png</file>
<file>qml/img/exit.png</file>
<file>qml/img/run.png</file>
<file>qml/img/note.png</file>
</qresource> </qresource>
</RCC> </RCC>

Loading…
Cancel
Save