feat(certificates): Add per-cert renewal and auto-renew controls#57
feat(certificates): Add per-cert renewal and auto-renew controls#57
Conversation
Clicking a certificate now opens a details view showing its deployment link, with actions to renew it immediately or toggle auto-renewal. Each card exposes a quick renew shortcut, and deployments gain a Renew SSL action that renews all their certificates at once.
Code Review SummaryThis PR introduces granular control over SSL certificates, including per-certificate renewal, auto-renewal toggling, and bulk renewal for deployments. It also adds a detailed view for certificates. 🚀 Key Improvements
💡 Minor Suggestions
|
| domain, | ||
| }), | ||
| renew: () => apiClient.post<{ message: string; result: any }>("/certificates/renew"), | ||
| delete: (domain: string) => apiClient.delete(`/certificates/${domain}`), |
There was a problem hiding this comment.
Ensure URI encoding is applied consistently to all path parameters involving user-provided strings like domain names.
| delete: (domain: string) => apiClient.delete(`/certificates/${domain}`), | |
| delete: (domain: string) => apiClient.delete(`/certificates/${encodeURIComponent(domain)}`), |
Deploying flatrun-ui with
|
| Latest commit: |
e548a9d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f3521398.flatrun-ui.pages.dev |
| Branch Preview URL: | https://feat-cert-renewal.flatrun-ui.pages.dev |
859b021 to
e548a9d
Compare
| type="checkbox" | ||
| :checked="detailsCert.auto_renew" | ||
| :disabled="autoRenewSaving" | ||
| @change="handleAutoRenewToggle($event)" |
There was a problem hiding this comment.
The @change handler passes the raw event, which requires manual casting in the script. Using v-model or passing $event.target.checked directly would be cleaner, but given the loading state, updating the checkbox value via a dedicated handler is fine. However, ensure the event target is correctly identified.
| @change="handleAutoRenewToggle($event)" | |
| @change="handleAutoRenewToggle($event.target.checked)" |
| detailsCert.value = null; | ||
| }; | ||
|
|
||
| const handleAutoRenewToggle = async (event: Event) => { |
There was a problem hiding this comment.
Update the signature to accept a boolean directly to avoid DOM-specific logic inside the business logic function.
| const handleAutoRenewToggle = async (event: Event) => { | |
| const handleAutoRenewToggle = async (enabled: boolean) => { |
Clicking a certificate now opens a details view showing its deployment link, with actions to renew it immediately or toggle auto-renewal. Each card exposes a quick renew shortcut, and deployments gain a Renew SSL action that renews all their certificates at once.