feat(email-domains): support creating email domains on optional subdomains
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/dcrouter',
|
||||
version: '13.11.0',
|
||||
version: '13.12.0',
|
||||
description: 'A multifaceted routing service handling mail and SMS delivery functions.'
|
||||
}
|
||||
|
||||
@@ -2422,6 +2422,7 @@ export const fetchEmailDomainsAction = emailDomainsStatePart.createAction(
|
||||
|
||||
export const createEmailDomainAction = emailDomainsStatePart.createAction<{
|
||||
linkedDomainId: string;
|
||||
subdomain?: string;
|
||||
dkimSelector?: string;
|
||||
dkimKeySize?: number;
|
||||
rotateKeys?: boolean;
|
||||
|
||||
@@ -276,6 +276,11 @@ export class OpsViewEmailDomains extends DeesElement {
|
||||
.options=${domainOptions}
|
||||
.required=${true}
|
||||
></dees-input-dropdown>
|
||||
<dees-input-text
|
||||
.key=${'subdomain'}
|
||||
.label=${'Subdomain'}
|
||||
.description=${'Leave empty for bare domain, e.g. "mail" for mail.example.com'}
|
||||
></dees-input-text>
|
||||
<dees-input-text
|
||||
.key=${'dkimSelector'}
|
||||
.label=${'DKIM Selector'}
|
||||
@@ -316,10 +321,12 @@ export class OpsViewEmailDomains extends DeesElement {
|
||||
? parseInt(data.dkimKeySize.key, 10)
|
||||
: parseInt(data.dkimKeySize || '2048', 10);
|
||||
|
||||
const subdomain = data.subdomain?.trim() || undefined;
|
||||
await appstate.emailDomainsStatePart.dispatchAction(
|
||||
appstate.createEmailDomainAction,
|
||||
{
|
||||
linkedDomainId,
|
||||
subdomain,
|
||||
dkimSelector: data.dkimSelector || 'default',
|
||||
dkimKeySize: keySize,
|
||||
rotateKeys: Boolean(data.rotateKeys),
|
||||
|
||||
Reference in New Issue
Block a user