mirror of
https://github.com/dreamhunter2333/cloudflare_temp_email.git
synced 2026-04-26 22:35:51 +03:00
[PR #827] [MERGED] feat: hide send mail UI when not configured #789
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cloudflare_temp_email#789
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/dreamhunter2333/cloudflare_temp_email/pull/827
Author: @dreamhunter2333
Created: 2/1/2026
Status: ✅ Merged
Merged: 2/1/2026
Merged by: @dreamhunter2333
Base:
main← Head:feature/email📝 Commits (1)
d948e8bfeat: hide send mail UI when not configured📊 Changes
4 files changed (+39 additions, -4 deletions)
View changed files
📝
frontend/src/store/index.js(+1 -0)📝
frontend/src/views/Index.vue(+3 -3)📝
worker/src/commom_api.ts(+2 -0)📝
worker/src/common.ts(+33 -1)📄 Description
User description
Summary
Hide send mail related UI elements when no send mail method is configured on the backend.
Changes
Backend
worker/src/common.ts- AddisSendMailEnabled(c, domain)andisAnySendMailEnabled(c)functionsworker/src/commom_api.ts- ReturnenableSendMailfield in/open_api/settingsFrontend
frontend/src/store/index.js- AddenableSendMailstatefrontend/src/views/Index.vue- Conditionally render send mail UIBehavior
Detection Logic
Checks per domain:
RESEND_TOKENorRESEND_TOKEN_{DOMAIN}SMTP_CONFIG[domain]SEND_MAILbinding🤖 Generated with Claude Code
PR Type
Enhancement
Description
Added backend logic to detect send mail configuration per domain.
Updated frontend to conditionally render send mail UI elements.
Introduced
isSendMailEnabledandisAnySendMailEnabledfunctions in backend.Extended
/open_api/settingsendpoint to includeenableSendMailfield.Diagram Walkthrough
File Walkthrough
Index.vue
Conditional rendering of send mail UI in frontendfrontend/src/views/Index.vue
enableSendMailto display specific tabs and buttons.commom_api.ts
Extend settings API with send mail configurationworker/src/commom_api.ts
enableSendMailfield to/open_api/settingsresponse.isAnySendMailEnabledfunction for backend logic.common.ts
Add functions to check send mail configurationworker/src/common.ts
isSendMailEnabledfunction to check domain-specificconfiguration.
isAnySendMailEnabledfunction to check global configuration.index.js
Add enableSendMail state to frontend storefrontend/src/store/index.js
enableSendMailstate to global store.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.