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
Update the view of add domain form
albert54b5d0fa017b
diff --git a/core/frontend/src/router/modules/settings.ts b/core/frontend/src/router/modules/settings.tsindex ffa792a2..46a6c3bf 100644--- a/core/frontend/src/router/modules/settings.ts+++ b/core/frontend/src/router/modules/settings.ts@@ -39,6 +39,12 @@ const route: RouteRecordRaw = {meta: { title: 'Forward', titleKey: 'layout.menu.forward' },component: () => import('@/views/settings/forward/index.vue'),},+ {+ path: "ai-model",+ name: "AiModel",+ meta: { title: "ai-model", titleKey: "ai-model" },+ component: () => import("@/views/settings/ai-model/index.vue")+ }],},{diff --git a/core/frontend/src/views/domain/components/DomainForm.vue b/core/frontend/src/views/domain/components/DomainForm.vueindex 1e762a19..dc680094 100644--- a/core/frontend/src/views/domain/components/DomainForm.vue+++ b/core/frontend/src/views/domain/components/DomainForm.vue@@ -2,7 +2,22 @@<modal :title="title" :width="600"><div class="pt-16px"><bt-form ref="formRef" :model="form" :rules="rules">- <n-form-item :label="t('domain.form.domain')" path="domain">+ <n-form-item path="domain">+ <template #label>+ <div class="flex items-center justify-start gap-1.25">+ <span>{{ t('domain.form.domain') }}</span>+ <n-popover trigger="hover">+ <template #trigger>+ <i class="i-custom:help text-primary cursor-pointer"></i>+ </template>+ <bt-tips>+ <li class="text-error">{{ t('domain.form.tips.aRecordFailed') }}</li>+ <li>{{ t('domain.form.tips.dnsSetup') }}</li>+ <li>{{ t('domain.form.tips.cloudflare') }}</li>+ </bt-tips>+ </n-popover>+ </div>+ </template><n-input v-model:value="form.domain" :disabled="isEdit":placeholder="t('domain.form.domainPlaceholder')"></n-input>@@ -26,12 +41,12 @@<n-input v-model:value="form.email" :placeholder="t('domain.form.globalCatchPlaceholder')"></n-input></n-form-item>- <bt-tips>- <li class="text-error">{{ t('domain.form.tips.aRecordFailed') }}</li>- <li>{{ t('domain.form.tips.dnsSetup') }}</li>- <li>{{ t('domain.form.tips.cloudflare') }}</li>- </bt-tips>- <n-alert style="margin: 15px 0;" type="warning" :show-icon="false">+++ <n-form-item label="Automatically create brand information">+ <n-switch></n-switch>+ </n-form-item>+ <n-alert style="margin: 0 0 15px 0;" type="warning" :show-icon="false"><div class="w-100% flex justify-between items-center"><span class="mr-5">To use this feature, you need to integrate an AI model first.</span><n-button type="primary">Integrate immediately</n-button>@@ -47,9 +62,6 @@<li>Import images and content</li><li>Use a custom logo (optional)</li></bt-tips>- <n-form-item label="Automatically create brand information">- <n-switch></n-switch>- </n-form-item><n-form-item label="Specify a domain name"><div class="w-100% flex flex-col gap-2.5"><n-input placeholder=""></n-input>diff --git a/core/frontend/src/views/domain/pages/editDomain/components/AISettings.vue b/core/frontend/src/views/domain/pages/editDomain/components/AISettings.vueindex 07a11414..30808659 100644--- a/core/frontend/src/views/domain/pages/editDomain/components/AISettings.vue+++ b/core/frontend/src/views/domain/pages/editDomain/components/AISettings.vue@@ -10,14 +10,6 @@AI Settings</span></div>- <div class="right-tit">- <n-button type="primary" @click="updateAisettingsInfo(domain)">- <template #icon>- <i class="i-mingcute:save-2-line text-5"></i>- </template>- Save- </n-button>- </div></div></n-card>diff --git a/core/frontend/src/views/domain/pages/editDomain/components/CompanyProfile.vue b/core/frontend/src/views/domain/pages/editDomain/components/CompanyProfile.vueindex 20a2730d..93579fe7 100644--- a/core/frontend/src/views/domain/pages/editDomain/components/CompanyProfile.vue+++ b/core/frontend/src/views/domain/pages/editDomain/components/CompanyProfile.vue@@ -12,14 +12,6 @@</span></div></div>- <div class="right-tit">- <n-button type="primary" @click="updateCompanyProfile(domain)">- <template #icon>- <i class="i-mingcute:save-2-line text-5"></i>- </template>- Save- </n-button>- </div></div></n-card>diff --git a/core/frontend/src/views/domain/pages/editDomain/components/DomainConfiguration.vue b/core/frontend/src/views/domain/pages/editDomain/components/DomainConfiguration.vueindex 5a7b875c..d813c732 100644--- a/core/frontend/src/views/domain/pages/editDomain/components/DomainConfiguration.vue+++ b/core/frontend/src/views/domain/pages/editDomain/components/DomainConfiguration.vue@@ -1,51 +1,79 @@<template><div class="content-wrapper">- <n-card class="mb-5">- <!-- title -->- <div class="page-tit">- <div class="left-tit">- <div class="back-tool">- <i class="i-cuida:mail-outline text-7"></i>+ <div>+ <n-card class="mb-5">+ <!-- title -->+ <div class="page-tit">+ <div class="left-tit">+ <div class="back-tool">+ <i class="i-cuida:mail-outline text-7"></i>+ </div>+ <span class="tit-content">+ Mail Domain Configuration+ </span></div>- <span class="tit-content">- Mail Domain Configuration- </span></div>- <div class="right-tit">- <n-button type="primary" @click="updateDomain">- <template #icon>- <i class="i-mingcute:save-2-line text-5"></i>- </template>- Save- </n-button>- </div>- </div>- </n-card>- <n-card>- <!-- form data -->- <n-form>- <n-form-item>- <template #label><span class="form-label">Domain</span></template>- <n-input v-model:value="domainTit"></n-input>+ </n-card>+ <n-card>+ <!-- form data -->+ <n-form>+ <n-form-item>+ <template #label><span class="form-label">Domain</span></template>+ <n-input v-model:value="domainTit"></n-input>+ </n-form-item>+ <n-form-item label="">+ <template #label><span class="form-label">Domain Quota</span></template>+ <div class="flex justify-between gap-5 items-center w-100%">+ <n-input v-model:value="quota as unknown as string"></n-input>+ <n-select :options="uinitOptions" class="w-20" v-model:value="unit"></n-select>+ </div>+ </n-form-item>+ <n-form-item>+ <template #label><span class="form-label">MailBox Count</span></template>+ <n-input v-model:value="mailboxes as unknown as string"></n-input>+ </n-form-item>+ <n-form-item>+ <template #label><span class="form-label">Catch all</span></template>+ <n-input v-model:value="catch_email"></n-input>+ </n-form-item>+ </n-form>+ </n-card>++ <n-card class="mt-5">+ <n-form-item label="Automatically create brand information">+ <n-switch></n-switch></n-form-item>- <n-form-item label="">- <template #label><span class="form-label">Domain Quota</span></template>- <div class="flex justify-between gap-5 items-center w-100%">- <n-input v-model:value="quota as unknown as string"></n-input>- <n-select :options="uinitOptions" class="w-20" v-model:value="unit"></n-select>+ <n-alert style="margin: 0 0 15px 0;" type="warning" :show-icon="false">+ <div class="w-100% flex justify-between items-center">+ <span class="mr-5">To use this feature, you need to integrate an AI model first.</span>+ <n-button type="primary">Integrate immediately</n-button>+ </div>+ </n-alert>+ <div class="text-[#777]">+ AI-driven information import automatically analyzes and creates brand information from email+ domains. After creation, you can modify it at your discretion.+ </div>+ <bt-tips style="margin-bottom: 15px;">+ <li>Extract brand and color</li>+ <li>Analyze content structure</li>+ <li>Import images and content</li>+ <li>Use a custom logo (optional)</li>+ </bt-tips>+ <n-form-item label="Specify a domain name">+ <div class="w-100% flex flex-col gap-2.5">+ <n-input placeholder=""></n-input>+ <n-button type="primary" ghost>+ <template #icon>+ <i class="i-material-symbols:add-circle-outline"></i>+ </template>+ Add more URLs+ </n-button></div></n-form-item>- <n-form-item>- <template #label><span class="form-label">MailBox Count</span></template>- <n-input v-model:value="mailboxes as unknown as string"></n-input>- </n-form-item>- <n-form-item>- <template #label><span class="form-label">Catch all</span></template>- <n-input v-model:value="catch_email"></n-input>- </n-form-item>- </n-form>- </n-card>+ </n-card>+ </div>+<!-- <n-card class="my-5"><div class="switch-settings"><div class="switch-item">@@ -86,8 +114,8 @@</template><script setup lang="ts">-- import { getDomainDetail,updateDomain } from "../controller/domainConfiguration.controller"++ import { getDomainDetail, updateDomain } from "../controller/domainConfiguration.controller"import { getEditDomainStoreData } from "../store"const {domainTit,@@ -129,6 +157,8 @@@use "@/styles/index" as base;@use "./mixin.scss" as mixin;++.content-wrapper {@include mixin.content-wrapper;diff --git a/core/frontend/src/views/domain/pages/editDomain/components/FooterSettings.vue b/core/frontend/src/views/domain/pages/editDomain/components/FooterSettings.vueindex 72fd947e..72db0085 100644--- a/core/frontend/src/views/domain/pages/editDomain/components/FooterSettings.vue+++ b/core/frontend/src/views/domain/pages/editDomain/components/FooterSettings.vue@@ -10,14 +10,6 @@Footer Settings</span></div>- <div class="right-tit">- <n-button type="primary" @click="updateFootersettingsInfo(domain)">- <template #icon>- <i class="i-mingcute:save-2-line text-5"></i>- </template>- Save- </n-button>- </div></div></n-card>diff --git a/core/frontend/src/views/domain/pages/editDomain/components/ProjectDetails.vue b/core/frontend/src/views/domain/pages/editDomain/components/ProjectDetails.vueindex d04f603b..1fb11c24 100644--- a/core/frontend/src/views/domain/pages/editDomain/components/ProjectDetails.vue+++ b/core/frontend/src/views/domain/pages/editDomain/components/ProjectDetails.vue@@ -10,14 +10,6 @@Project Details</span></div>- <div class="right-tit">- <n-button type="primary" @click="updateProjectDetail(domain)">- <template #icon>- <i class="i-mingcute:save-2-line text-5"></i>- </template>- Save- </n-button>- </div></div></n-card><n-card class="mb-5">diff --git a/core/frontend/src/views/domain/pages/editDomain/components/Styling.vue b/core/frontend/src/views/domain/pages/editDomain/components/Styling.vueindex e348235c..c5f1a9a4 100644--- a/core/frontend/src/views/domain/pages/editDomain/components/Styling.vue+++ b/core/frontend/src/views/domain/pages/editDomain/components/Styling.vue@@ -10,14 +10,6 @@Color Palette</span></div>- <div class="right-tit">- <n-button type="primary" @click="updateStyleingInfo(domain)">- <template #icon>- <i class="i-mingcute:save-2-line text-5"></i>- </template>- Save- </n-button>- </div></div></n-card><n-card class="mb-5">diff --git a/core/frontend/src/views/domain/pages/editDomain/components/Typography.vue b/core/frontend/src/views/domain/pages/editDomain/components/Typography.vueindex 0f99b6e6..0a45007e 100644--- a/core/frontend/src/views/domain/pages/editDomain/components/Typography.vue+++ b/core/frontend/src/views/domain/pages/editDomain/components/Typography.vue@@ -10,14 +10,6 @@Typography</span></div>- <div class="right-tit">- <n-button type="primary" @click="updateTypography(domain)">- <template #icon>- <i class="i-mingcute:save-2-line text-5"></i>- </template>- Save- </n-button>- </div></div></n-card>diff --git a/core/frontend/src/views/domain/pages/editDomain/index.vue b/core/frontend/src/views/domain/pages/editDomain/index.vueindex 998aa2cb..bea9631c 100644--- a/core/frontend/src/views/domain/pages/editDomain/index.vue+++ b/core/frontend/src/views/domain/pages/editDomain/index.vue@@ -9,120 +9,185 @@<span class="tit-content"> Domain / Edit domain </span></div>- <!-- Content tabs -->- <div class="content-tabs">- <div v-for="(item, index) in menuList" :key="index" :class="['tab-item', { active: activeTab == item }]" @click="activeTab = item">- <span>{{ item }}</span>- </div>- </div>- <div class="dynamic-content">- <component :is="contentMap.get(activeTab)" />- </div>- </div>+ <!-- Content tabs -->+ <div class="content-tabs">+ <div v-for="(item, index) in menuList" :key="index" :class="['tab-item', { active: activeTab == item }]"+ @click="activeTab = item">+ <span>{{ item }}</span>+ </div>+ </div>+ <div class="dynamic-content">+ <component :is="contentMap.get(activeTab)" />+ </div>+++ <div class="footer-tool" v-if="activeTab !== 'Sitemap'">+ <n-button type="primary" @click="switchHanldeSave">+ <template #icon>+ <i class="i-mingcute:save-2-line text-5"></i>+ </template>+ Save+ </n-button>+ </div>+ </div></template><script setup lang="ts">- const DomainConfiguration = defineAsyncComponent(() => import("./components/DomainConfiguration.vue"))- const ProjectDetails = defineAsyncComponent(() => import("./components/ProjectDetails.vue"))- const CompanyProile = defineAsyncComponent(() => import("./components/CompanyProfile.vue"))- const Styling = defineAsyncComponent(() => import("./components/Styling.vue"))- const Typography = defineAsyncComponent(() => import("./components/Typography.vue"))- const Sitemap = defineAsyncComponent(() => import("./components/Sitemap.vue"))- const FooterSettings = defineAsyncComponent(() => import("./components/FooterSettings.vue"))- const AISettings = defineAsyncComponent(() => import("./components/AISettings.vue"))- const menuList = ref([- "Domain Configuration",- "Project Details",- "Company Profile",- "Styling",- "Typography",- "Sitemap",- "Footer Settings",- "AI Settings"- ])- const activeTab = ref("Domain Configuration")- const contentMap = ref(new Map([- ["Domain Configuration", DomainConfiguration],- ["Project Details", ProjectDetails],- ["Company Profile", CompanyProile],- ["Styling", Styling],- ["Typography", Typography],- ["Sitemap", Sitemap],- ["Footer Settings", FooterSettings],- ["AI Settings", AISettings],- ]))+ import { updateDomain } from "./controller/domainConfiguration.controller"+ import { updateProjectDetail } from "./controller/projectDetail.controller"+ import { updateCompanyProfile } from "./controller/companyProfile.controller"+ import { updateStyleingInfo } from "./controller/styleing.controller"+ import { updateTypography } from "./controller/typography.controller"+ // import {} from "./controller/sitemap.controller"+ import { updateFootersettingsInfo } from "./controller/footerSettings.controller"+ import { updateAisettingsInfo } from "./controller/aiSettings.controller"+ const DomainConfiguration = defineAsyncComponent(() => import("./components/DomainConfiguration.vue"))+ const ProjectDetails = defineAsyncComponent(() => import("./components/ProjectDetails.vue"))+ const CompanyProile = defineAsyncComponent(() => import("./components/CompanyProfile.vue"))+ const Styling = defineAsyncComponent(() => import("./components/Styling.vue"))+ const Typography = defineAsyncComponent(() => import("./components/Typography.vue"))+ const Sitemap = defineAsyncComponent(() => import("./components/Sitemap.vue"))+ const FooterSettings = defineAsyncComponent(() => import("./components/FooterSettings.vue"))+ const AISettings = defineAsyncComponent(() => import("./components/AISettings.vue"))+ const menuList = ref([+ "Domain Configuration",+ "Project Details",+ "Company Profile",+ "Styling",+ "Typography",+ "Sitemap",+ "Footer Settings",+ "AI Settings"+ ])+ const activeTab = ref("Domain Configuration")+ const contentMap = ref(new Map([+ ["Domain Configuration", DomainConfiguration],+ ["Project Details", ProjectDetails],+ ["Company Profile", CompanyProile],+ ["Styling", Styling],+ ["Typography", Typography],+ ["Sitemap", Sitemap],+ ["Footer Settings", FooterSettings],+ ["AI Settings", AISettings],+ ]))+ const route = useRoute()+ const domain = route.params.domain as string++ /**+ * @description Switch for handle save+ */+ function switchHanldeSave() {+ switch (activeTab.value) {+ case "Domain Configuration":+ updateDomain()+ break;+ case "Project Details":+ updateProjectDetail(domain)+ break;+ case "Company Profile":+ updateCompanyProfile(domain)+ break;+ case "Styling":+ updateStyleingInfo(domain)+ break;+ case "Typography":+ updateTypography(domain)+ break;+ case "Sitemap":+ break;+ case "Footer Settings":+ updateFootersettingsInfo(domain)+ break;+ case "AI Settings":+ updateAisettingsInfo(domain)+ break+ }+ }</script><style scoped lang="scss">-@use '@/styles/index' as base;--.wrapper {- display: grid;- grid-template-rows: 40px 45px 1fr;- height: calc(100% - 48px);- box-sizing: border-box;- padding: 24px;-}--// page title-.page-tit {- @include base.row-flex-start;- margin-bottom: 20px;- gap: 15px;-- .back-tool {- color: var(--color-primary-1);+ @use '@/styles/index' as base;++ .wrapper {+ display: grid;+ grid-template-rows: 40px 45px 1fr 80px;+ height: calc(100% - 48px);+ box-sizing: border-box;+ padding: 24px;+ }++ .footer-tool {+ position: absolute;+ bottom: 0px;+ left: 0;+ background: #fff;+ width: 100%;+ height: 80px;+ @include base.row-flex;+ justify-content: flex-start;+ align-items: center;+ padding: 0 20px;+ }++ // page title+ .page-tit {@include base.row-flex-start;- gap: 5px;- cursor: pointer;- @include base.transition-all;+ margin-bottom: 20px;+ gap: 15px;++ .back-tool {+ color: var(--color-primary-1);+ @include base.row-flex-start;+ gap: 5px;+ cursor: pointer;+ @include base.transition-all;- &:hover {- color: var(--color-primary-3);+ &:hover {+ color: var(--color-primary-3);+ }++ .back-btn {+ font-size: 18px;+ }}- .back-btn {+ .tit-content {font-size: 18px;+ color: var(--color-text-1);+ font-weight: bold;}}- .tit-content {- font-size: 18px;- color: var(--color-text-1);- font-weight: bold;- }-}+ // Content tabs+ .content-tabs {+ width: 100%;+ height: 46px;+ border-bottom: 1px solid var(--color-border-1);+ @include base.row-flex-start;-// Content tabs-.content-tabs {- width: 100%;- height: 46px;- border-bottom: 1px solid var(--color-border-1);- @include base.row-flex-start;+ .tab-item {+ height: 100%;+ @include base.col-flex-center;+ font-size: 14px;+ padding: 0 20px;+ cursor: pointer;+ transition: 0.1s color ease-in-out;- .tab-item {- height: 100%;- @include base.col-flex-center;- font-size: 14px;- padding: 0 20px;- cursor: pointer;- transition: 0.1s color ease-in-out;+ &:hover {+ color: var(--color-primary-1);+ }- &:hover {- color: var(--color-primary-1);+ &.active {+ border-bottom: 2px solid var(--color-primary-1);+ margin-bottom: -2px;+ }}+ }- &.active {- border-bottom: 2px solid var(--color-primary-1);- margin-bottom: -2px;- }+ // Dynamic content+ .dynamic-content {+ height: 100%;+ box-sizing: border-box;+ padding: 20px;}-}--// Dynamic content-.dynamic-content {- height: 100%;- box-sizing: border-box;- padding: 20px;-}</style>diff --git a/core/frontend/src/views/settings/ai-model/index.vue b/core/frontend/src/views/settings/ai-model/index.vuenew file mode 100644index 00000000..8e8347fc--- /dev/null+++ b/core/frontend/src/views/settings/ai-model/index.vue@@ -0,0 +1,13 @@+<template>+ <div>++ </div>+</template>++<script setup lang="ts">++</script>++<style scoped>++</style>\ No newline at end of filediff --git a/core/frontend/types/components.d.ts b/core/frontend/types/components.d.tsindex 27f43212..78615437 100644--- a/core/frontend/types/components.d.ts+++ b/core/frontend/types/components.d.ts@@ -68,6 +68,7 @@ declare module 'vue' {NMenu: typeof import('naive-ui')['NMenu']NModal: typeof import('naive-ui')['NModal']NPagination: typeof import('naive-ui')['NPagination']+ NPopover: typeof import('naive-ui')['NPopover']NProgress: typeof import('naive-ui')['NProgress']NRadio: typeof import('naive-ui')['NRadio']NRadioButton: typeof import('naive-ui')['NRadioButton']