mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-07-04 13:51:35 +08:00
feat: allow admin and user delete mail, sendbox, send access(only admin) (#329)
This commit is contained in:
@@ -48,6 +48,10 @@ const fetchMailData = async (limit, offset) => {
|
||||
);
|
||||
}
|
||||
|
||||
const deleteMail = async (curMailId) => {
|
||||
await api.fetch(`/admin/mails/${curMailId}`, { method: 'DELETE' });
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
if (!adminAuth.value) {
|
||||
showAdminAuth.value = true;
|
||||
@@ -66,6 +70,7 @@ onMounted(async () => {
|
||||
</n-button>
|
||||
</n-input-group>
|
||||
<div style="margin-top: 10px;"></div>
|
||||
<MailBox :key="mailBoxKey" :enableUserDeleteEmail="false" :fetchMailData="fetchMailData" />
|
||||
<MailBox :key="mailBoxKey" :enableUserDeleteEmail="true" :fetchMailData="fetchMailData"
|
||||
:deleteMail="deleteMail" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user