BillionMail gives you open-source MailServer, NewsLetter, Email Marketing — fully self-hosted, dev-friendly, and free from monthly fees. Join the discord: https://discord.gg/asfXzBUhZr
feat: Add the bootstrapping logic after domain name creation.
albert22d59bbeab72
diff --git a/core/frontend/src/views/domain/components/DomainForm.vue b/core/frontend/src/views/domain/components/DomainForm.vueindex 195d6ed6..19cdb2ba 100644--- a/core/frontend/src/views/domain/components/DomainForm.vue+++ b/core/frontend/src/views/domain/components/DomainForm.vue@@ -93,8 +93,10 @@</div></modal>- <!-- -->+ <!-- Wait for init brand info --><WaitAndCheckDomainStatus ref="waitAndCheckDomainStatusRef" />++</template><script lang="ts" setup>diff --git a/core/frontend/src/views/domain/components/WaitAndCheckDomainStatus.vue b/core/frontend/src/views/domain/components/WaitAndCheckDomainStatus.vueindex be7ed78f..558998d9 100644--- a/core/frontend/src/views/domain/components/WaitAndCheckDomainStatus.vue+++ b/core/frontend/src/views/domain/components/WaitAndCheckDomainStatus.vue@@ -5,16 +5,25 @@<span class="text-white flex items-center text-4">{{ $t("domain.waitAndCheckDomainStatus.loading") }}</span></div></n-modal>++ <!-- Create Ai template -->+ <CreateTplModal ref="createTplModal" :only-ai="true"/></template><script setup lang="ts">+ import CreateTplModal from '@/views/template/components/CreateTplModal.vue'+ import { useGlobalStore } from '@/store';import { instance } from '@/api';import { Message } from '@/utils';const { t } = useI18n()const show = ref(false)+ const globalStore = useGlobalStore()+ const createTplModal = ref()+function open(domain: string) {checkStatus(domain)+ globalStore.domainSource = domainshow.value = true}function close() {@@ -27,6 +36,7 @@close()clearInterval(timer)Message.success(t("domain.waitAndCheckDomainStatus.success"))+ createTplModal.value.open()}}, 1000)}diff --git a/core/frontend/src/views/template/components/CreateTplModal.vue b/core/frontend/src/views/template/components/CreateTplModal.vueindex e55ee9c9..5715d3cc 100644--- a/core/frontend/src/views/template/components/CreateTplModal.vue+++ b/core/frontend/src/views/template/components/CreateTplModal.vue@@ -3,14 +3,15 @@class="w-110" title=""><div class="wrapper"><div class="creation-methods">- <div v-for="(item, index) in methodsList" :key="index"+ <div v-for="(item, index) in computedMethodsList" :key="index":class="['choose-item', { active: choosedMethod == item }]" @click="choosedMethod = item"><span class="item-label">{{ item }}</span></div></div><div :class="['url-source', { hidden: choosedMethod !== 'AI' }]"><span class="label">Source Url</span>- <n-select v-model:value="sourceDomain" class="flex-1" label-field="domain" value-field="domain" :options="domainList" >+ <n-select v-model:value="sourceDomain" class="flex-1" label-field="domain" value-field="domain"+ :options="domainList"></n-select></div><div class="desc">@@ -34,19 +35,33 @@// import { TemplateStore } from '../pages/AITemplate/dto'// const store = inject<TemplateStore>('modelStore')!+ const props = defineProps<{+ onlyAi?: boolean,+ }>()const globalStore = useGlobalStore()const router = useRouter()const methodsList = ref(['Drag', 'AI', 'HTML'])const choosedMethod = ref('AI')const sourceDomain = ref('')const show = ref(false)- const emits = defineEmits(['confirmType'])+ const emits = defineEmits(['confirmType','hasCreateTpl'])const domainList = ref<any>([])+ const computedMethodsList = computed(() => {+ if (props.onlyAi) {+ return ["AI"]+ } else {+ return methodsList.value+ }+ })+/*** @description open modal*/function open() {+ if(globalStore.domainSource){+ globalStore.domainSource = sourceDomain.value+ }show.value = true}diff --git a/core/frontend/src/views/template/index.vue b/core/frontend/src/views/template/index.vueindex b44fed7a..f85b3638 100644--- a/core/frontend/src/views/template/index.vue+++ b/core/frontend/src/views/template/index.vue@@ -176,7 +176,6 @@// Handle add templateconst handleAdd = () => {createTemplateModalRef.value.open()-}// Confirm choose template type