修复主题

This commit is contained in:
Alex Yang
2026-01-31 21:56:12 +08:00
parent 70c5cfdf50
commit 050aa421b1
21 changed files with 177022 additions and 114220 deletions

View File

@@ -366,13 +366,31 @@ function showNotification(message, type = 'info') {
// 初始化GFWList管理页面
function initGFWListPage() {
// 加载配置但不显示,因为功能未开发
// loadGFWListConfig();
// 显示"正在开发中"的提示
showNotification('GFWList管理功能正在开发中敬请期待', 'info');
// 禁用所有按钮和输入框
disableGFWListElements();
setupGFWListEventListeners();
// 提示功能待开发
setTimeout(() => {
showNotification('GFWList管理功能正在开发中敬请期待', 'info');
}, 500);
}
// 禁用GFWList页面的所有元素
function disableGFWListElements() {
const gfwlistContent = document.getElementById('gfwlist-content');
if (!gfwlistContent) return;
// 禁用所有按钮
const buttons = gfwlistContent.querySelectorAll('button');
buttons.forEach(button => {
button.disabled = true;
button.classList.add('cursor-not-allowed', 'opacity-50');
});
// 禁用所有输入框
const inputs = gfwlistContent.querySelectorAll('input');
inputs.forEach(input => {
input.disabled = true;
input.classList.add('opacity-50');
});
}
// 加载GFWList配置
@@ -420,8 +438,21 @@ function populateGFWListForm(config) {
// 保存GFWList配置
async function handleSaveGFWListConfig() {
// 提示功能待开发
showNotification('GFWList管理功能正在开发中敬请期待', 'info');
const formData = collectGFWListFormData();
if (!formData) return;
try {
const result = await api.saveConfig(formData);
if (result && result.error) {
showErrorMessage('保存配置失败: ' + result.error);
return;
}
showSuccessMessage('配置保存成功');
} catch (error) {
showErrorMessage('保存配置失败: ' + (error.message || '未知错误'));
}
}
// 收集GFWList表单数据
@@ -506,16 +537,24 @@ async function handleRestartGFWListService() {
function setupGFWListEventListeners() {
const saveBtn = getElement('gfwlist-save-btn');
if (saveBtn) {
saveBtn.addEventListener('click', handleSaveGFWListConfig);
saveBtn.addEventListener('click', function() {
showNotification('GFWList管理功能正在开发中敬请期待', 'info');
});
}
// 为所有按钮式开关添加点击事件监听器
const toggleBtns = document.querySelectorAll('.toggle-btn');
toggleBtns.forEach(btn => {
btn.addEventListener('click', function() {
// 提示功能待开发
showNotification('GFWList管理功能正在开发中敬请期待', 'info');
// 不执行实际操作
showNotification('GFWList管理功能正在开发中敬请期待', 'info');
});
});
// 为所有输入框添加点击事件监听器
const inputs = document.querySelectorAll('#gfwlist-content input');
inputs.forEach(input => {
input.addEventListener('click', function() {
showNotification('GFWList管理功能正在开发中敬请期待', 'info');
});
});
}