mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-05-06 20:32:55 +08:00
feat: add COPYRIGHT (#183)
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
- `ENABLE_USER_CREATE_EMAIL` 是否允许用户创建邮件
|
||||
- 允许 admin 创建无前缀的邮件
|
||||
- 添加 `SMTP proxy server`,支持 SMTP 发送邮件
|
||||
- 修复某些情况浏览器无法加载 `wasm` 时使用 js 解析邮件
|
||||
- 页脚添加 `COPYRIGHT`
|
||||
|
||||
## v0.3.0
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<script setup>
|
||||
import { darkTheme, NGlobalStyle, zhCN } from 'naive-ui'
|
||||
import { computed, onMounted } from 'vue'
|
||||
import { useDark, useToggle } from '@vueuse/core'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useGlobalState } from './store'
|
||||
import { useIsMobile } from './utils/composables'
|
||||
import Header from './views/Header.vue';
|
||||
import Footer from './views/Footer.vue';
|
||||
|
||||
|
||||
const { localeCache, isDark, loading } = useGlobalState()
|
||||
const theme = computed(() => isDark.value ? darkTheme : null)
|
||||
@@ -42,8 +43,11 @@ onMounted(async () => {
|
||||
<n-gi :span="isMobile ? 12 : 10">
|
||||
<div class="main">
|
||||
<n-space vertical>
|
||||
<Header />
|
||||
<router-view></router-view>
|
||||
<n-layout style="min-height: 80vh;">
|
||||
<Header />
|
||||
<router-view></router-view>
|
||||
</n-layout>
|
||||
<Footer />
|
||||
</n-space>
|
||||
</div>
|
||||
</n-gi>
|
||||
|
||||
@@ -49,7 +49,7 @@ const apiFetch = async (path, options = {}) => {
|
||||
const getOpenSettings = async (message) => {
|
||||
try {
|
||||
const res = await api.fetch("/open_api/settings");
|
||||
openSettings.value = {
|
||||
Object.assign(openSettings.value, {
|
||||
prefix: res["prefix"] || "",
|
||||
needAuth: res["needAuth"] || false,
|
||||
domains: res["domains"].map((domain) => {
|
||||
@@ -62,7 +62,8 @@ const getOpenSettings = async (message) => {
|
||||
enableUserCreateEmail: res["enableUserCreateEmail"] || false,
|
||||
enableUserDeleteEmail: res["enableUserDeleteEmail"] || false,
|
||||
enableAutoReply: res["enableAutoReply"] || false,
|
||||
};
|
||||
copyright: res["copyright"] || openSettings.value.copyright,
|
||||
});
|
||||
if (openSettings.value.needAuth) {
|
||||
showAuth.value = true;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,8 @@ export const useGlobalState = createGlobalState(
|
||||
enableUserCreateEmail: false,
|
||||
enableUserDeleteEmail: false,
|
||||
enableAutoReply: false,
|
||||
domains: []
|
||||
domains: [],
|
||||
copyright: 'Dream Hunter',
|
||||
})
|
||||
const settings = ref({
|
||||
fetched: false,
|
||||
|
||||
38
frontend/src/views/Footer.vue
Normal file
38
frontend/src/views/Footer.vue
Normal file
@@ -0,0 +1,38 @@
|
||||
<script setup>
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useGlobalState } from '../store'
|
||||
const { localeCache, openSettings } = useGlobalState()
|
||||
|
||||
|
||||
const { t } = useI18n({
|
||||
locale: localeCache.value || 'zh',
|
||||
messages: {
|
||||
en: {
|
||||
copyright: "Copyright"
|
||||
},
|
||||
zh: {
|
||||
copyright: "版权所有"
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<n-divider class="footer-divider" />
|
||||
<div style="text-align: center; padding: 20px">
|
||||
<n-text depth="3">
|
||||
{{ t('copyright') }} © 2023-{{ new Date().getFullYear() }} {{ openSettings.copyright }}
|
||||
</n-text>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<style scoped>
|
||||
.footer-divider {
|
||||
margin: 0;
|
||||
padding: 0 var(--x-padding);
|
||||
}
|
||||
</style>
|
||||
@@ -79,6 +79,8 @@ ENABLE_USER_CREATE_EMAIL = true
|
||||
ENABLE_USER_DELETE_EMAIL = true
|
||||
# Allow automatic replies to emails
|
||||
ENABLE_AUTO_REPLY = false
|
||||
# Footer text
|
||||
# COPYRIGHT = "Dream Hunter"
|
||||
# default send balance, if not set, it will be 0
|
||||
# DEFAULT_SEND_BALANCE = 1
|
||||
# dkim config
|
||||
|
||||
@@ -37,6 +37,8 @@ ENABLE_USER_CREATE_EMAIL = true
|
||||
ENABLE_USER_DELETE_EMAIL = true
|
||||
# 允许自动回复邮件
|
||||
ENABLE_AUTO_REPLY = false
|
||||
# 前端界面页脚文本
|
||||
# COPYRIGHT = "Dream Hunter"
|
||||
# 默认发送邮件余额,如果不设置,将为 0
|
||||
# DEFAULT_SEND_BALANCE = 1
|
||||
# dkim config
|
||||
|
||||
@@ -156,6 +156,7 @@ api.get('/open_api/settings', async (c) => {
|
||||
"enableUserCreateEmail": getBooleanValue(c.env.ENABLE_USER_CREATE_EMAIL),
|
||||
"enableUserDeleteEmail": getBooleanValue(c.env.ENABLE_USER_DELETE_EMAIL),
|
||||
"enableAutoReply": getBooleanValue(c.env.ENABLE_AUTO_REPLY),
|
||||
"copyright": c.env.COPYRIGHT,
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
@@ -24,6 +24,8 @@ ENABLE_USER_CREATE_EMAIL = true
|
||||
ENABLE_USER_DELETE_EMAIL = true
|
||||
# Allow automatic replies to emails
|
||||
ENABLE_AUTO_REPLY = false
|
||||
# Footer text
|
||||
# COPYRIGHT = "Dream Hunter"
|
||||
# default send balance, if not set, it will be 0
|
||||
# DEFAULT_SEND_BALANCE = 1
|
||||
# dkim config
|
||||
|
||||
Reference in New Issue
Block a user