feat: allow admin and user delete mail, sendbox, send access(only admin) (#329)

This commit is contained in:
Dream Hunter
2024-07-04 13:25:14 +08:00
committed by GitHub
parent 9448b3c754
commit 21fed3fb00
44 changed files with 344 additions and 278 deletions

View File

@@ -26,6 +26,10 @@ const fetchData = async (limit, offset) => {
+ (adminSendBoxTabAddress.value ? `&address=${adminSendBoxTabAddress.value}` : '')
);
}
const deleteSenboxMail = async (curMailId) => {
await api.fetch(`/admin/sendbox/${curMailId}`, { method: 'DELETE' });
};
</script>
<template>
@@ -36,7 +40,8 @@ const fetchData = async (limit, offset) => {
{{ t('query') }}
</n-button>
</n-input-group>
<SendBox style="margin-top: 10px;" :fetchMailData="fetchData" :showEMailFrom="true" />
<SendBox style="margin-top: 10px;" :enableUserDeleteEmail="true" :deleteMail="deleteSenboxMail"
:fetchMailData="fetchData" :showEMailFrom="true" />
</div>
</template>