(selectedId = 0)
| 1109 | } |
| 1110 | |
| 1111 | function populateAutoRegistrationEmailServiceOptions(selectedId = 0) { |
| 1112 | if (!elements.autoRegistrationEmailServiceId || !elements.autoRegistrationEmailServiceType) return; |
| 1113 | const selectedType = elements.autoRegistrationEmailServiceType.value || 'tempmail'; |
| 1114 | const options = ['<option value="0">自动选择</option>']; |
| 1115 | const bucket = availableServices[selectedType]; |
| 1116 | if (bucket && Array.isArray(bucket.services)) { |
| 1117 | bucket.services.forEach(service => { |
| 1118 | options.push(`<option value="${service.id}">${escapeHtml(service.name)} (#${service.id})</option>`); |
| 1119 | }); |
| 1120 | } |
| 1121 | elements.autoRegistrationEmailServiceId.innerHTML = options.join(''); |
| 1122 | elements.autoRegistrationEmailServiceId.value = String(selectedId || elements.autoRegistrationEmailServiceId.dataset.selectedId || 0); |
| 1123 | } |
| 1124 | |
| 1125 | async function handleSaveAutoRegistration() { |
| 1126 | const autoCheckInterval = parseInt(elements.autoRegistrationCheckInterval.value, 10) || 60; |
no test coverage detected