Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/docs_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
paths:
- "vitepress-docs/**"
branches:
- main
tags:
- "*"
workflow_dispatch:
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# CHANGE LOG

## main branch to be released

- `ENABLE_USER_CREATE_EMAIL` 是否允许用户创建邮件
- 允许 admin 创建无前缀的邮件

## v0.3.0

### Breaking Changes:
### Breaking Changes

`address` 表的前缀将从代码中迁移到 db 中,请将下面 sql 中的 `tmp` 替换为你的前缀,然后执行。
如果你的数据很重要,请先备份数据库。
Expand Down
1 change: 1 addition & 0 deletions frontend/src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ const getOpenSettings = async (message) => {
}
}),
adminContact: res["adminContact"] || "",
enableUserCreateEmail: res["enableUserCreateEmail"] || false,
enableUserDeleteEmail: res["enableUserDeleteEmail"] || false,
enableAutoReply: res["enableAutoReply"] || false,
};
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/MailBox.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import { watch, onMounted, ref } from "vue";
import { watch, onMounted, ref, onBeforeUnmount } from "vue";
import { useMessage } from 'naive-ui'
import { useI18n } from 'vue-i18n'
import { useGlobalState } from '../store'
Expand Down Expand Up @@ -149,6 +149,10 @@ const deleteMail = async () => {
onMounted(async () => {
await refresh();
});

onBeforeUnmount(() => {
clearInterval(timer.value)
})
</script>

<template>
Expand Down
8 changes: 2 additions & 6 deletions frontend/src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,10 @@ export const useGlobalState = createGlobalState(
prefix: '',
needAuth: false,
adminContact: '',
enableUserCreateEmail: false,
enableUserDeleteEmail: false,
enableAutoReply: false,
domains: [{
label: 'test.com',
value: 'test.com'
}]
domains: []
})
const settings = ref({
fetched: false,
Expand All @@ -38,7 +36,6 @@ export const useGlobalState = createGlobalState(
const jwt = useStorage('jwt', '');
const localeCache = useStorage('locale', 'zh');
const themeSwitch = useStorage('themeSwitch', false);
const showLogin = ref(false);
const adminTab = ref("account");
const adminMailTabAddress = ref("");
const adminSendBoxTabAddress = ref("");
Expand All @@ -55,7 +52,6 @@ export const useGlobalState = createGlobalState(
themeSwitch,
adminAuth,
showAdminAuth,
showLogin,
adminTab,
adminMailTabAddress,
adminSendBoxTabAddress,
Expand Down
11 changes: 7 additions & 4 deletions frontend/src/views/Admin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import SenderAccess from './admin/SenderAccess.vue'
import Statistics from "./admin/Statistics.vue"
import SendBox from './admin/SendBox.vue';
import Account from './admin/Account.vue';
import CreateAccount from './admin/CreateAccount.vue';
import Mails from './admin/Mails.vue';
import MailsUnknow from './admin/MailsUnknow.vue';
import Maintenance from './admin/Maintenance.vue';
Expand All @@ -33,6 +34,7 @@ const { t } = useI18n({
accessTip: 'Please enter the admin password',
mails: 'Emails',
account: 'Account',
account_create: 'Create Account',
unknow: 'Mails with unknow receiver',
senderAccess: 'Sender Access Control',
sendBox: 'Send Box',
Expand All @@ -44,6 +46,7 @@ const { t } = useI18n({
accessTip: '请输入 Admin 密码',
mails: '邮件',
account: '账号',
account_create: '创建账号',
unknow: '无收件人邮件',
senderAccess: '发件权限控制',
sendBox: '发件箱',
Expand All @@ -64,10 +67,7 @@ onMounted(async () => {
<template>
<div>
<n-modal v-model:show="showAdminAuth" :closable="false" :closeOnEsc="false" :maskClosable="false" preset="dialog"
title="Dialog">
<template #header>
<div>{{ t('accessHeader') }}</div>
</template>
:title="t('accessHeader')">
<p>{{ t('accessTip') }}</p>
<n-input v-model:value="adminAuth" type="textarea" :autosize="{ minRows: 3 }" />
<template #action>
Expand All @@ -81,6 +81,9 @@ onMounted(async () => {
<n-tab-pane name="account" :tab="t('account')">
<Account />
</n-tab-pane>
<n-tab-pane name="account_create" :tab="t('account_create')">
<CreateAccount />
</n-tab-pane>
<n-tab-pane name="mails" :tab="t('mails')">
<Mails />
</n-tab-pane>
Expand Down
Loading