@serve.zone/dcrouter 13.9.2 → 13.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,25 +37,10 @@ export class OpsViewEmailSecurity extends DeesElement {
37
37
  cssManager.defaultStyles,
38
38
  viewHostCss,
39
39
  css`
40
- h2 {
41
- margin: 32px 0 16px 0;
42
- font-size: 24px;
43
- font-weight: 600;
44
- color: ${cssManager.bdTheme('#333', '#ccc')};
45
- }
46
- dees-statsgrid {
47
- margin-bottom: 32px;
48
- }
49
- .securityCard {
50
- background: ${cssManager.bdTheme('#fff', '#222')};
51
- border: 1px solid ${cssManager.bdTheme('#e9ecef', '#333')};
52
- border-radius: 8px;
53
- padding: 24px;
54
- position: relative;
55
- overflow: hidden;
56
- }
57
- .actionButton {
58
- margin-top: 16px;
40
+ .securityContainer {
41
+ display: flex;
42
+ flex-direction: column;
43
+ gap: 24px;
59
44
  }
60
45
  `,
61
46
  ];
@@ -113,48 +98,44 @@ export class OpsViewEmailSecurity extends DeesElement {
113
98
  return html`
114
99
  <dees-heading level="3">Email Security</dees-heading>
115
100
 
116
- <dees-statsgrid
117
- .tiles=${tiles}
118
- .minTileWidth=${200}
119
- ></dees-statsgrid>
101
+ <div class="securityContainer">
102
+ <dees-statsgrid
103
+ .tiles=${tiles}
104
+ .minTileWidth=${200}
105
+ ></dees-statsgrid>
120
106
 
121
- <h2>Email Security Configuration</h2>
122
- <div class="securityCard">
123
- <dees-form>
124
- <dees-input-checkbox
125
- .key=${'enableSPF'}
126
- .label=${'Enable SPF checking'}
127
- .value=${true}
128
- ></dees-input-checkbox>
129
- <dees-input-checkbox
130
- .key=${'enableDKIM'}
131
- .label=${'Enable DKIM validation'}
132
- .value=${true}
133
- ></dees-input-checkbox>
134
- <dees-input-checkbox
135
- .key=${'enableDMARC'}
136
- .label=${'Enable DMARC policy enforcement'}
137
- .value=${true}
138
- ></dees-input-checkbox>
139
- <dees-input-checkbox
140
- .key=${'enableSpamFilter'}
141
- .label=${'Enable spam filtering'}
142
- .value=${true}
143
- ></dees-input-checkbox>
144
- </dees-form>
145
- <dees-button
146
- class="actionButton"
147
- type="highlighted"
148
- @click=${() => this.saveEmailSecuritySettings()}
149
- >
150
- Save Settings
151
- </dees-button>
107
+ <dees-settings
108
+ .heading=${'Security Configuration'}
109
+ .settingsFields=${[
110
+ { key: 'spf', label: 'SPF checking', value: 'enabled' },
111
+ { key: 'dkim', label: 'DKIM validation', value: 'enabled' },
112
+ { key: 'dmarc', label: 'DMARC policy', value: 'enabled' },
113
+ { key: 'spam', label: 'Spam filtering', value: 'enabled' },
114
+ ]}
115
+ .actions=${[{ name: 'Edit', action: () => this.showEditSecurityDialog() }]}
116
+ ></dees-settings>
152
117
  </div>
153
118
  `;
154
119
  }
155
120
 
156
- private async saveEmailSecuritySettings() {
157
- // Config is read-only from the UI for now
158
- alert('Email security settings are read-only. Update the dcrouter configuration file to change these settings.');
121
+ private async showEditSecurityDialog() {
122
+ const { DeesModal } = await import('@design.estate/dees-catalog');
123
+ DeesModal.createAndShow({
124
+ heading: 'Edit Security Configuration',
125
+ content: html`
126
+ <dees-form>
127
+ <dees-input-checkbox .key=${'enableSPF'} .label=${'SPF checking'} .value=${true}></dees-input-checkbox>
128
+ <dees-input-checkbox .key=${'enableDKIM'} .label=${'DKIM validation'} .value=${true}></dees-input-checkbox>
129
+ <dees-input-checkbox .key=${'enableDMARC'} .label=${'DMARC policy enforcement'} .value=${true}></dees-input-checkbox>
130
+ <dees-input-checkbox .key=${'enableSpamFilter'} .label=${'Spam filtering'} .value=${true}></dees-input-checkbox>
131
+ </dees-form>
132
+ <p style="margin-top: 12px; font-size: 12px; opacity: 0.7;">
133
+ These settings are read-only for now. Update the dcrouter configuration to change them.
134
+ </p>
135
+ `,
136
+ menuOptions: [
137
+ { name: 'Close', action: async (modalArg: any) => modalArg.destroy() },
138
+ ],
139
+ });
159
140
  }
160
141
  }