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
Add deployment information
zdme4813147d534
diff --git a/core/frontend/build/config.ts b/core/frontend/build/config.tsindex 63e39354..e8242626 100644--- a/core/frontend/build/config.ts+++ b/core/frontend/build/config.ts@@ -6,8 +6,8 @@ const serverConfig: Record<string, ServerConfig> = {ip: '192.168.66.66',port: 64325,sshPort: 22,- username: 'root',- password: 'www.bt.cn',+ username: '---',+ password: '---',},}diff --git a/core/frontend/src/layout/components/Sidebar.vue b/core/frontend/src/layout/components/Sidebar.vueindex cfde2543..01e356bf 100644--- a/core/frontend/src/layout/components/Sidebar.vue+++ b/core/frontend/src/layout/components/Sidebar.vue@@ -21,7 +21,8 @@:collapsed="isCollapse":collapsed-width="64":options="menuOptions"- :root-indent="24">+ :root-indent="24"+ @update:value="handleUpdateMenu"></n-menu></div><!-- 退出登录 -->@@ -32,7 +33,7 @@:collapsed-width="64":options="logoutOptions":root-indent="24"- @update:value="handleLogout">+ @update:value="handleUpdateMenu"></n-menu></div></n-layout-sider>@@ -97,6 +98,7 @@ const renderLabel = (name: string, title: string) => {const iconMap: Record<string, VNodeChild> = {domain: <i class="i-mdi-web"></i>,mailbox: <i class="i-mdi-email"></i>,+ webmail: <i class="i-mdi-email"></i>,settings: <i class="i-mdi-settings-outline"></i>,logout: <i class="i-mdi-logout"></i>,}@@ -105,10 +107,17 @@ const renderIcon = (key: string) => {return iconMap[key]}-const handleLogout = (key: string) => {+const handleUpdateMenu = (key: string) => {if (key === 'logout') {userStore.logout()}+ if (key === 'webmail') {+ const route = routerMenus.value.find(item => item.meta?.key === 'webmail')+ if (route) {+ const href = String(route.meta?.href)+ window.open(href)+ }+ }}onMounted(() => {diff --git a/core/frontend/src/router/index.ts b/core/frontend/src/router/index.tsindex 5619244a..92c6a25c 100644--- a/core/frontend/src/router/index.ts+++ b/core/frontend/src/router/index.ts@@ -1,4 +1,5 @@import { useUserStore } from '@/store'+import { routes } from '@/router/router'import router from '@/router/router'import loadingBar from '@/config/loadingBar'@@ -8,6 +9,14 @@ const whitePathList = ['/login']router.beforeEach(async (to, from, next) => {loadingBar.start()+ // 判断访问的路由是否存在于注册的路由中+ const routeExists = routes.some(route => route.path === to.path)+ // 如果路由不存在,则直接通过+ if (!routeExists) {+ next()+ return+ }+const userStore = useUserStore()// 用户已登录if (userStore.isLogin) {diff --git a/core/frontend/src/router/modules/settings.ts b/core/frontend/src/router/modules/settings.tsindex b03dc4bf..1a677ef4 100644--- a/core/frontend/src/router/modules/settings.ts+++ b/core/frontend/src/router/modules/settings.ts@@ -4,7 +4,7 @@ import { Layout } from '@/router/constant'const route: RouteRecordRaw = {path: '/settings',component: Layout,- meta: { sort: 7, key: 'settings', title: 'Settings', icon: 'i-mdi-settings-outline' },+ meta: { sort: 8, key: 'settings', title: 'Settings' },children: [{path: '/settings',diff --git a/core/frontend/src/router/router.ts b/core/frontend/src/router/router.tsindex 24e09694..05421751 100644--- a/core/frontend/src/router/router.ts+++ b/core/frontend/src/router/router.ts@@ -56,11 +56,6 @@ export const routes: RouteRecordRaw[] = [name: 'Login',component: () => import('@/views/login/index.vue'),},- {- path: '/test',- name: 'Test',- component: () => import('@/views/test/index.vue'),- },...menuList,]diff --git a/core/frontend/src/views/mailbox/index.vue b/core/frontend/src/views/mailbox/index.vueindex 706db38c..42ebcd9b 100644--- a/core/frontend/src/views/mailbox/index.vue+++ b/core/frontend/src/views/mailbox/index.vue@@ -39,7 +39,7 @@<script lang="tsx" setup>import { DataTableColumns, NButton, NFlex, NSwitch } from 'naive-ui'-import { confirm, getByteUnit } from '@/utils'+import { confirm, copyText, getByteUnit } from '@/utils'import { useModal } from '@/hooks/modal/useModal'import { useTableData } from '@/hooks/useTableData'import { deleteMailbox, getMailboxList, updateMailbox } from '@/api/modules/mailbox'@@ -79,7 +79,25 @@ const columns = ref<DataTableColumns<MailBox>>([title: 'Password',width: '18%',minWidth: 120,- render: (row, index) => <TablePassword value={row.password || `--${index + 1}`} />,+ render: row => <TablePassword value={row.password || `--`} />,+ },+ {+ key: 'login',+ title: 'Login info',+ render: row => {+ return (+ <NButton+ text+ type="primary"+ onClick={() => {+ copyText(+ `WebMail: ${window.location.origin}/roundcube\nUsername: ${row.username}\nPassword: ${row.password}`+ )+ }}>+ Copy+ </NButton>+ )+ },},{key: 'quota',