暗黑主题修复

This commit is contained in:
Alex Yang
2026-01-29 18:57:20 +08:00
parent 00f635ebec
commit ed686b21bb
7 changed files with 1668 additions and 404 deletions

View File

@@ -366,8 +366,13 @@ function showNotification(message, type = 'info') {
// 初始化GFWList管理页面
function initGFWListPage() {
loadGFWListConfig();
// 加载配置但不显示,因为功能未开发
// loadGFWListConfig();
setupGFWListEventListeners();
// 提示功能待开发
setTimeout(() => {
showNotification('GFWList管理功能正在开发中敬请期待', 'info');
}, 500);
}
// 加载GFWList配置
@@ -415,21 +420,8 @@ function populateGFWListForm(config) {
// 保存GFWList配置
async function handleSaveGFWListConfig() {
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 || '未知错误'));
}
// 提示功能待开发
showNotification('GFWList管理功能正在开发中敬请期待', 'info');
}
// 收集GFWList表单数据
@@ -521,14 +513,9 @@ function setupGFWListEventListeners() {
const toggleBtns = document.querySelectorAll('.toggle-btn');
toggleBtns.forEach(btn => {
btn.addEventListener('click', function() {
// 切换按钮状态
const currentState = this.classList.contains('bg-success');
setElementValue(this.id, !currentState);
// 如果是GFWList启用开关更新通行网站部分的显示效果
if (this.id === 'gfwlist-enabled') {
updateAllowedSitesSection(!currentState);
}
// 提示功能待开发
showNotification('GFWList管理功能正在开发中敬请期待', 'info');
// 不执行实际操作
});
});
}