add admin email settings page with provider selection
All checks were successful
deploy / deploy (push) Successful in 56s
All checks were successful
deploy / deploy (push) Successful in 56s
Card radio component for picking email providers (SMTP, SendGrid, Mailjet, etc.) with instant client-side switching via JS hook. Adapter configs are pre-rendered and toggled without a server round-trip. Secrets are preserved when re-saving with blank password fields. Includes from address field, test email sending, and disconnect flow. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -487,10 +487,32 @@ const CollectionFilters = {
|
||||
}
|
||||
}
|
||||
|
||||
const CardRadioScroll = {
|
||||
mounted() {
|
||||
this.el.addEventListener("change", (e) => {
|
||||
if (!e.target.matches('input[type="radio"]')) return
|
||||
const key = e.target.value
|
||||
const form = this.el.closest("form")
|
||||
if (!form) return
|
||||
|
||||
form.querySelectorAll("[data-adapter]").forEach((section) => {
|
||||
const match = section.dataset.adapter === key
|
||||
section.hidden = !match
|
||||
section.querySelectorAll("input, textarea, select, button[type='submit']").forEach((input) => {
|
||||
input.disabled = !match
|
||||
})
|
||||
})
|
||||
|
||||
const target = document.getElementById(`adapter-config-${key}`)
|
||||
if (target) target.scrollIntoView({ behavior: "smooth", block: "nearest" })
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
const csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
|
||||
const liveSocket = new LiveSocket("/live", Socket, {
|
||||
params: {_csrf_token: csrfToken},
|
||||
hooks: {...colocatedHooks, ColorSync, Lightbox, CartPersist, CartDrawer, ProductImageScroll, SearchModal, CollectionFilters},
|
||||
hooks: {...colocatedHooks, ColorSync, Lightbox, CartPersist, CartDrawer, ProductImageScroll, SearchModal, CollectionFilters, CardRadioScroll},
|
||||
})
|
||||
|
||||
// Show progress bar on live navigation and form submits
|
||||
|
||||
Reference in New Issue
Block a user