From 1b2430daa511509df1e098730de069c32a79751b Mon Sep 17 00:00:00 2001 From: Westly Wright Date: Sun, 2 Aug 2020 09:36:24 -0700 Subject: [PATCH] translations and modal styles --- assets/translations/en-us.yaml | 9 ++ components/CruResource.vue | 279 ++++++++++++++++++--------------- 2 files changed, 162 insertions(+), 126 deletions(-) diff --git a/assets/translations/en-us.yaml b/assets/translations/en-us.yaml index 448fd1c1d8..72defbea95 100644 --- a/assets/translations/en-us.yaml +++ b/assets/translations/en-us.yaml @@ -174,6 +174,15 @@ containerResourceLimit: requestsCpu: CPU Reservation requestsMemory: Memory Reservation +cruResource: + previewYaml: Preview Yaml + cancel: Cancelling will destroy your changes. + back: Going back will destroy your changes. + confirmYaml: "No, Review Yaml" + backToForm: Go Back To Form + confirmCancel: "Yes, Cancel" + confirmBack: "Yes, Go Back" + footer: docs: Docs download: Download CLI diff --git a/components/CruResource.vue b/components/CruResource.vue index 314b1645b1..c90bc1764b 100644 --- a/components/CruResource.vue +++ b/components/CruResource.vue @@ -40,7 +40,7 @@ export default { return { isCancelModal: false, showAsForm: true, - resourceYaml: '', + resourceYaml: '' }; }, methods: { @@ -48,12 +48,17 @@ export default { if (isCancel) { // this.$modal.show('cancel') pass translation options this.isCancelModal = true; + } else { + this.isCancelModal = false; } this.$modal.show('cancel-modal'); }, confirmCancel(isCancel) { + this.$modal.hide('cancel-modal'); + if (isCancel) { + this.isCancelModal = false; this.$router.replace({ name: this.doneRoute, params: { resource: this.resource.type } @@ -78,157 +83,152 @@ export default {