From 9550b1af448ea72f795bcb40837d6e8b7f9ef6e2 Mon Sep 17 00:00:00 2001 From: Nikita-Pobazhak Date: Mon, 23 Dec 2019 18:01:04 +0300 Subject: [PATCH 1/2] go to dac button was added --- src/components/dacCreation/DacValidation.vue | 28 ++++++++++++++++++-- src/components/ual/store/actions.js | 5 ++-- src/i18n/en-us/index.js | 3 ++- src/pages/DacCreation.vue | 6 ++--- src/pages/Home.vue | 2 +- 5 files changed, 34 insertions(+), 10 deletions(-) diff --git a/src/components/dacCreation/DacValidation.vue b/src/components/dacCreation/DacValidation.vue index 9058e1f..00f94f8 100644 --- a/src/components/dacCreation/DacValidation.vue +++ b/src/components/dacCreation/DacValidation.vue @@ -13,7 +13,7 @@

{{ $t("dac_creation.dac_was_validated") }}

- + {{ $t("dac_creation.go_to_your_dac") }}

{{ $t("dac_creation.dac_was_not_validated") }}

@@ -37,7 +37,8 @@ export default { timeoutId: null, isValidated: false, validationError: null, - CONSTITUTION_TEXT + CONSTITUTION_TEXT, + dacId: this.$store.getters["factory/getDacId"] }; }, props: { @@ -83,6 +84,7 @@ export default { try { const hash = await encodeInSHA1(); this.$store.dispatch("ual/validateDacTransact", { + dacId: this.dacId, hash, afterTransact: this.afterTransact }); @@ -142,4 +144,26 @@ export default { grid-gap 30px width fit-content margin 0 auto +.dac-link + display flex + justify-content center + align-items center + cursor pointer + font-size 14px + font-weight 500 + border-radius 3px + text-decoration none + text-transform uppercase + color #ffffff + min-height 2.572em + width fit-content + padding 4px 16px + margin 0 auto + line-height normal + background-color $secondary + transition 0.3s cubic-bezier(0.25, 0.8, 0.5, 1) + box-shadow 0 1px 5px rgba(0,0,0,0.2), 0 2px 2px rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12) + + &:hover, &:focus + background-color #8d61c0 // TODO replace with real component similar to quasar button diff --git a/src/components/ual/store/actions.js b/src/components/ual/store/actions.js index 372a074..efb2165 100644 --- a/src/components/ual/store/actions.js +++ b/src/components/ual/store/actions.js @@ -211,9 +211,8 @@ export async function prepareDacTransact(storeProps, payload) { dispatch("dacTransact", { actions, dacId, openWS, afterTransact }); } -export async function validateDacTransact({ rootState, dispatch }, payload) { - const { hash, afterTransact } = payload; - const { dacId } = rootState.factory.stepsData; +export async function validateDacTransact({ dispatch }, payload) { + const { dacId, hash, afterTransact } = payload; const actions = [ { diff --git a/src/i18n/en-us/index.js b/src/i18n/en-us/index.js index a29ef8a..d5ef21d 100644 --- a/src/i18n/en-us/index.js +++ b/src/i18n/en-us/index.js @@ -171,6 +171,7 @@ export default { dac_was_validated: "Your dac was successfully validated!", dac_was_not_validated: "Your dac wasn't validated. You can try again or contact our support.", try_again: "try again", - constitution_preparation: "Constitution preparation" + constitution_preparation: "Constitution preparation", + go_to_your_dac: "go to your dac" }, }; diff --git a/src/pages/DacCreation.vue b/src/pages/DacCreation.vue index 623009e..6e61186 100644 --- a/src/pages/DacCreation.vue +++ b/src/pages/DacCreation.vue @@ -14,7 +14,7 @@ />
-
+

{{ trxError || wsError }}

@@ -25,7 +25,7 @@ import ProgressIcons from "components/dacCreation/ProgressIcons"; import DacValidation from "components/dacCreation/DacValidation"; -const CLIENT_BUILD_COMPLETE = "CLIENT BUILD COMPLETE"; +const CLIENT_BUILD_COMPLETE_STEP = "CLIENT BUILD COMPLETE"; export default { components: { @@ -67,7 +67,7 @@ export default { this.ws.onmessage = msg => { this.currentMessage = JSON.parse(msg.data).data.status.replace(/_/g, " "); this.currentNumber++; - if (this.currentMessage === CLIENT_BUILD_COMPLETE) { + if (this.currentMessage === CLIENT_BUILD_COMPLETE_STEP) { this.creationFinishedText = this.$t("dac_creation.dac_was_created"); this.$store.commit("factory/setDacId", dacId); } diff --git a/src/pages/Home.vue b/src/pages/Home.vue index 6646845..6e6f49f 100644 --- a/src/pages/Home.vue +++ b/src/pages/Home.vue @@ -173,7 +173,7 @@ export default { .upload-json-wrapper position relative .upload-json-button - background-color #11b55b + background-color #0fa251 .upload-json-button-error background-color $negative animation shake 0.36s From 28c679196ff726d080e5da802324d68f15d7f45a Mon Sep 17 00:00:00 2001 From: Nikita-Pobazhak Date: Mon, 23 Dec 2019 18:10:15 +0300 Subject: [PATCH 2/2] dacName trim oninput was removed --- src/components/steps/Step1Form.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/steps/Step1Form.vue b/src/components/steps/Step1Form.vue index f24c51a..df0e756 100644 --- a/src/components/steps/Step1Form.vue +++ b/src/components/steps/Step1Form.vue @@ -1,8 +1,7 @@