update
This commit is contained in:
46
dns/.trae/documents/plan_20260114_150542.md
Normal file
46
dns/.trae/documents/plan_20260114_150542.md
Normal file
@@ -0,0 +1,46 @@
|
||||
## GFWList管理页面实现计划
|
||||
|
||||
### 1. 修改 `index.html`
|
||||
- 在侧边栏菜单(两个位置:桌面端和移动端)添加新的菜单项"GFWList管理"
|
||||
- 创建新的页面内容区域 `#gfwlist-content`
|
||||
- 添加配置选项:
|
||||
- GFWList总开关(checkbox)
|
||||
- GFWList解析目标IP输入框
|
||||
- 通行网站开关组:谷歌、YouTube、Facebook、X(各checkbox)
|
||||
- 添加保存和重启服务按钮
|
||||
|
||||
### 2. 修改 `main.js`
|
||||
- 在页面标题映射中添加 `'gfwlist': 'GFWList管理'`
|
||||
- 在 `contentSections` 数组中添加 `gfwlist-content`
|
||||
- 添加hash为'gfwlist'时的页面初始化逻辑
|
||||
|
||||
### 3. 修改 `config.js`
|
||||
- 添加GFWList页面初始化函数 `initGFWListPage()`
|
||||
- 添加GFWList配置加载函数 `loadGFWListConfig()`
|
||||
- 添加GFWList配置保存函数 `saveGFWListConfig()`
|
||||
- 添加GFWList配置收集函数 `collectGFWListFormData()`
|
||||
- 更新 `collectFormData()` 以包含新的GFWList配置字段
|
||||
- 更新 `populateConfigForm()` 移除原有的GFWList配置(已迁移到独立页面)
|
||||
|
||||
### 4. 修改 `api.js`
|
||||
- 添加GFWList专用的API方法(如需要)
|
||||
|
||||
### 配置数据结构
|
||||
```json
|
||||
{
|
||||
"gfwlist": {
|
||||
"enabled": true,
|
||||
"targetIP": "127.0.0.1",
|
||||
"allowGoogle": true,
|
||||
"allowYouTube": true,
|
||||
"allowFacebook": true,
|
||||
"allowTwitter": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 实现顺序
|
||||
1. 先修改HTML添加页面结构和菜单
|
||||
2. 修改main.js添加导航支持
|
||||
3. 修改config.js添加前端逻辑
|
||||
4. 测试验证
|
||||
Reference in New Issue
Block a user