diff --git a/config_add.php b/config_add.php index 8a93777..b5cc7b6 100644 --- a/config_add.php +++ b/config_add.php @@ -435,6 +435,7 @@ $configs = $db->query('SELECT * FROM configs ORDER BY id');
+
@@ -513,6 +514,23 @@ $configs = $db->query('SELECT * FROM configs ORDER BY id'); const urlInput = document.getElementById('site_url_input'); const accountLabel = document.querySelector('label[for="account_input"]') || document.querySelector('input[name="account"]').previousElementSibling; const keyLabel = document.querySelector('label[for="api_key_input"]') || document.querySelector('input[name="api_key"]').previousElementSibling; + const autoMonitorCheckbox = document.getElementById('auto_monitor'); + const monitorHint = document.getElementById('monitor_hint'); + + // 判断是否为魔方平台 + const isMofang = (siteType === 'mofang'); + + if (isMofang) { + // 魔方平台:启用监控选项 + autoMonitorCheckbox.disabled = false; + autoMonitorCheckbox.checked = true; + monitorHint.style.display = 'none'; + } else { + // 非魔方平台:禁用监控选项 + autoMonitorCheckbox.disabled = true; + autoMonitorCheckbox.checked = false; + monitorHint.style.display = 'inline'; + } if (siteType === 'mofang') { // 魔方平台