暗黑主题修复
This commit is contained in:
@@ -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');
|
||||
// 不执行实际操作
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user