|
| 1 | +<template> |
| 2 | + <modal |
| 3 | + :value="true" |
| 4 | + class="first-build" |
| 5 | + btn-close |
| 6 | + @cancel="handleClose" |
| 7 | + > |
| 8 | + <div class="text-center"> |
| 9 | + <img |
| 10 | + :src="require('~/assets/img/firstBuild.svg')" |
| 11 | + class="first-build__image" |
| 12 | + width="200" |
| 13 | + alt="" |
| 14 | + > |
| 15 | + </div> |
| 16 | + <div class="first-build__title"> |
| 17 | + {{ $t('popupTitle') }} |
| 18 | + </div> |
| 19 | + <div class="first-build__subtitle"> |
| 20 | + {{ $t('subTitlePopup') }} <a |
| 21 | + @click.prevent.stop="handleSearch" |
| 22 | + >{{ $t('text_bellow') }}</a>. |
| 23 | + </div> |
| 24 | + <div |
| 25 | + class="first-build__footer_title" |
| 26 | + > |
| 27 | + {{ $t('footerTitlePopup') }} |
| 28 | + </div> |
| 29 | + <div |
| 30 | + v-if="information.apache" |
| 31 | + class="text-center" |
| 32 | + > |
| 33 | + <b-button |
| 34 | + :disabled="loading" |
| 35 | + variant="success" |
| 36 | + size="lg" |
| 37 | + @click="handleConfirm" |
| 38 | + > |
| 39 | + <b-spinner |
| 40 | + v-if="loading" |
| 41 | + type="grow" |
| 42 | + /> |
| 43 | + {{ $t('buttonConfirm') }} |
| 44 | + </b-button> |
| 45 | + </div> |
| 46 | + <div class="text-center"> |
| 47 | + <div |
| 48 | + class="first-build__footer_link" |
| 49 | + @click="handleClose" |
| 50 | + > |
| 51 | + {{ $t('buttonAbort') }} |
| 52 | + </div> |
| 53 | + </div> |
| 54 | + <div class="text-center"> |
| 55 | + <img |
| 56 | + :src="require('~/assets/img/footer-modal.svg')" |
| 57 | + class="first-build__footer_image" |
| 58 | + alt="" |
| 59 | + > |
| 60 | + </div> |
| 61 | + </modal> |
| 62 | +</template> |
| 63 | +<script> |
| 64 | +import Modal from '~/components/modal' |
| 65 | +import {mapGetters} from 'vuex' |
| 66 | +export default { |
| 67 | + components: { |
| 68 | + Modal |
| 69 | + }, |
| 70 | + data() { |
| 71 | + return { |
| 72 | + loading: false |
| 73 | + } |
| 74 | + }, |
| 75 | + computed: { |
| 76 | + ...mapGetters({information: 'information/get', cms: 'cms/get'}) |
| 77 | + }, |
| 78 | + methods: { |
| 79 | + async handleSearch() { |
| 80 | + this.$store.commit('cms/setFirstBuild', false) |
| 81 | + this.$nextTick(() => { |
| 82 | + this.$scrollTo('#vf-apache-configure') |
| 83 | + }) |
| 84 | + }, |
| 85 | + async handleConfirm() { |
| 86 | + this.loading = true |
| 87 | + if(!this.information.status) { |
| 88 | + await this.$store.dispatch('information/activateVueFront', {url: this.cms.downloadUrl}) |
| 89 | + } else { |
| 90 | + await this.$store.dispatch('information/deActivateVueFront', {url: this.cms.downloadUrl}) |
| 91 | + } |
| 92 | + this.$store.commit('cms/setFirstBuild', false) |
| 93 | + this.loading = false |
| 94 | + }, |
| 95 | + handleClose() { |
| 96 | + this.$store.commit('cms/setFirstBuild', false) |
| 97 | + } |
| 98 | + } |
| 99 | +} |
| 100 | +</script> |
| 101 | +<i18n locale="en"> |
| 102 | + { |
| 103 | + "popupTitle": "Yay! Your Build is ready", |
| 104 | + "subTitlePopup": "We have generated your website and uploaded it into your root folder. To replace your current Frontend with the new VueFront Web App, you will need to configure your server settings by following these", |
| 105 | + "text_bellow": "instructions", |
| 106 | + "footerTitlePopup": "Would you like us to do this for you?", |
| 107 | + "buttonConfirm": "Activate", |
| 108 | + "buttonAbort": "Close" |
| 109 | + } |
| 110 | +</i18n> |
| 111 | +<style lang="scss"> |
| 112 | + .first-build { |
| 113 | + .vf-modal { |
| 114 | + .vf-modal-dialog { |
| 115 | + .vf-modal-content { |
| 116 | + .vf-modal-body { |
| 117 | + padding-top: 50px!important; |
| 118 | + padding-bottom: 0; |
| 119 | + padding-left: 110px; |
| 120 | + padding-right: 110px; |
| 121 | + } |
| 122 | + } |
| 123 | + } |
| 124 | + } |
| 125 | + a { |
| 126 | + cursor: pointer; |
| 127 | + } |
| 128 | + &__image { |
| 129 | + margin-bottom: 30px; |
| 130 | + } |
| 131 | + &__title { |
| 132 | + font-family: 'Open Sans', sans-serif; |
| 133 | + font-size: 30px; |
| 134 | + font-weight: 600; |
| 135 | + font-stretch: normal; |
| 136 | + font-style: normal; |
| 137 | + line-height: 1.25; |
| 138 | + letter-spacing: 0.4px; |
| 139 | + text-align: center; |
| 140 | + color: $black; |
| 141 | + margin-bottom: 20px; |
| 142 | + } |
| 143 | + &__subtitle { |
| 144 | + margin-bottom: 20px; |
| 145 | + } |
| 146 | + &__description { |
| 147 | + margin-bottom: 20px; |
| 148 | + } |
| 149 | + &__footer_title { |
| 150 | + margin-bottom: 30px; |
| 151 | + font-weight: 600!important; |
| 152 | + color: #333!important; |
| 153 | +
|
| 154 | + } |
| 155 | + &__subtitle, &__description, &__footer_title { |
| 156 | + font-family: 'Open Sans', sans-serif; |
| 157 | + font-size: 16px; |
| 158 | + font-weight: normal; |
| 159 | + font-stretch: normal; |
| 160 | + font-style: normal; |
| 161 | + line-height: 1.56; |
| 162 | + letter-spacing: 0.18px; |
| 163 | + text-align: center; |
| 164 | + color: $warm-grey-two; |
| 165 | + } |
| 166 | + &__footer_link { |
| 167 | + font-family: 'Open Sans', sans-serif; |
| 168 | + font-size: 16px; |
| 169 | + font-weight: 600; |
| 170 | + font-stretch: normal; |
| 171 | + font-style: normal; |
| 172 | + line-height: 1.38; |
| 173 | + letter-spacing: 0.16px; |
| 174 | + color: $dark-mint; |
| 175 | + margin-top: 20px; |
| 176 | + cursor: pointer; |
| 177 | + display: inline-block; |
| 178 | + } |
| 179 | + &__footer_image { |
| 180 | + margin-top: 50px; |
| 181 | + } |
| 182 | + } |
| 183 | +</style> |
0 commit comments