mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-09-04 23:17:34 +08:00
feat: update sendbox UI (#199)
This commit is contained in:
@@ -5,7 +5,7 @@ import { useI18n } from 'vue-i18n'
|
|||||||
import { useGlobalState } from '../../store'
|
import { useGlobalState } from '../../store'
|
||||||
import { api } from '../../api'
|
import { api } from '../../api'
|
||||||
|
|
||||||
const { localeCache, settings, adminAuth, adminSendBoxTabAddress } = useGlobalState()
|
const { localeCache, adminAuth, adminSendBoxTabAddress } = useGlobalState()
|
||||||
const message = useMessage()
|
const message = useMessage()
|
||||||
|
|
||||||
const { t } = useI18n({
|
const { t } = useI18n({
|
||||||
@@ -129,9 +129,9 @@ onMounted(async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-if="settings.address">
|
<div>
|
||||||
<n-modal v-model:show="showModal" preset="dialog">
|
<n-modal v-model:show="showModal" preset="dialog" style="width: 100%;">
|
||||||
<pre>{{ curRow.raw }}</pre>
|
<pre style="overflow: auto;">{{ curRow.raw }}</pre>
|
||||||
</n-modal>
|
</n-modal>
|
||||||
<n-input-group>
|
<n-input-group>
|
||||||
<n-input v-model:value="adminSendBoxTabAddress" />
|
<n-input v-model:value="adminSendBoxTabAddress" />
|
||||||
|
|||||||
@@ -128,8 +128,8 @@ onMounted(async () => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-if="settings.address">
|
<div v-if="settings.address">
|
||||||
<n-modal v-model:show="showModal" preset="dialog">
|
<n-modal v-model:show="showModal" preset="dialog" style="width: 100%;">
|
||||||
<pre>{{ curRow.raw }}</pre>
|
<pre style="overflow: auto;">{{ curRow.raw }}</pre>
|
||||||
</n-modal>
|
</n-modal>
|
||||||
<div style="display: inline-block;">
|
<div style="display: inline-block;">
|
||||||
<n-pagination v-model:page="page" v-model:page-size="pageSize" :item-count="count"
|
<n-pagination v-model:page="page" v-model:page-size="pageSize" :item-count="count"
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ const send = async () => {
|
|||||||
message.error(error.message || "error");
|
message.error(error.message || "error");
|
||||||
} finally {
|
} finally {
|
||||||
message.success(t("successSend"));
|
message.success(t("successSend"));
|
||||||
router.push('/sendbox');
|
router.push('/user');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -120,6 +120,8 @@ api.post('/api/send_mail', async (c) => {
|
|||||||
if (body?.personalizations?.[0]?.dkim_private_key) {
|
if (body?.personalizations?.[0]?.dkim_private_key) {
|
||||||
delete body.personalizations[0].dkim_private_key;
|
delete body.personalizations[0].dkim_private_key;
|
||||||
}
|
}
|
||||||
|
const reqIp = c.req.raw.headers.get("cf-connecting-ip")
|
||||||
|
body.reqIp = reqIp;
|
||||||
const { success: success2 } = await c.env.DB.prepare(
|
const { success: success2 } = await c.env.DB.prepare(
|
||||||
`INSERT INTO sendbox (address, raw) VALUES (?, ?)`
|
`INSERT INTO sendbox (address, raw) VALUES (?, ?)`
|
||||||
).bind(address, JSON.stringify(body)).run();
|
).bind(address, JSON.stringify(body)).run();
|
||||||
|
|||||||
Reference in New Issue
Block a user