Abner
404fc88332
🧹 chore(cleanup): 移除未使用的模块化版本并修复文档问题
...
- 删除 src/js/modules/giffgaff/ 和 src/js/modules/simyo/ 目录(未完成的重构尝试)
- 移除 webpack.config.js 中未使用的别名配置和入口文件
- 修复文档错链:移除对不存在的 DEVELOPMENT_GUIDE.md 引用
- 修复文档错链:将 CORS_SOLUTION.md 中的 simyo_proxy_server.js 更正为 server.js
- 更新 tests/CLAUDE.md 中 Jest 版本为 30.3.0
- 移除 src/simyo/MODULE_ARCHITECTURE.md 中过时的重构计划
- 精简 docs/reference/ 下的技术文档,移除与根 README 重复的内容
- 删除已弃用的 .serena/ 工具目录
- 更新根 CLAUDE.md 反映清理后的新目录结构
- 删除 3 个引用已删除模块的测试文件
所有测试通过,构建成功,质量检查和安全检查均通过。
2026-05-18 21:58:42 +08:00
Abner
cde452b0c5
🔧 chore: 精简文档结构并更新启动与参考说明
...
- 删除过时的文档:COOKIE 登录设置指南、集成/性能改进汇总、项目总结、快速参考卡、服务时间检查说明及其修复记录,以及 CHANGES_OVERVIEW.txt
- 调整 docs/CLAUDE.md 的文档模块职责与目录规划,补充安全指南、开发指南与通知系统等指引入口
- 更新 README.md 的启动步骤描述,将“启动代理服务器”更正为“启动开发服务器”
- 更新参考文档中 MFA/激活流程表述:Giffgaff 将“邮件验证码”调整为“邮件/短信验证码”,并强调短信验证码自动激活(推荐);同时修正测试页面路径到 tests/ 目录
- 同步调整 Simyo 参考文档的测试页面路径到 tests/ 目录,保持目录结构一致
2026-05-17 23:49:44 +08:00
Abner
49ac9e15ff
♻️ refactor: 废弃 Legacy 前端,统一使用 Modular 版本
...
- 删除 giffgaff_complete_esim.html 和 simyo_complete_esim.html
- 构建脚本自动排除 Legacy HTML 文件
- Netlify 添加 Legacy URL 301 重定向到 Modular 版本
- 移除 verify-legacy-frozen.js 构建检查
- 更新 6 个文档文件中的 Legacy 文件引用
修复 Issue #50 : Legacy 前端缺少 simSwapMfaChallenge 步骤导致 500 错误
2026-05-17 23:25:47 +08:00
Abner
c3926b14eb
📝 docs: 修正误导性描述,明确工具仅支持已有用户 eSIM 设备更换
2026-05-17 21:57:13 +08:00
Abner
5ed5bb678b
✨ docs: 更新项目文档与安全配置
...
- 更新 PROJECT_SUMMARY.md,新增 notification-manager.js 和 notification-service.js 模块说明,并将通用工具中的 i18n 移至括号内
- 完善 SECURITY.md,重构 CORS 配置为动态白名单校验并禁用 credentials,增强 CSP 策略并统一生产与本地环境的安全基准说明
- 重写 SERVICE_TIME_CHECK.md,采用模块化三层架构(utils/dom/app),使用 Intl API 处理英国时区与夏令时,支持双时间显示与国际化的同时强化 XSS 防护
- 修订 notification-system.md,明确通知 API 公开接口无需认证,细化安全实践并规范消息转义方式
- 调整 netlify/functions/CLAUDE.md,标注 notifications API 为公开接口(requireAuth: false)
2026-05-03 23:04:19 +08:00
Abner
14e2500a85
📝 docs: 更新项目文档和配置说明
...
- 更新 Jest 版本从 29.7.0 到 30.3.0,保持测试框架最新状态
- 修正文档链接,将性能说明指向 ARCHITECTURE.md 替代已废弃的 PERFORMANCE.md
- 新增 docs/CLAUDE.md 文档模块说明文件,明确文档结构和规范要求
- 删除过时的 REFACTORING_COMPLETE.md 文档,避免信息冗余
- 统一服务时间描述为英国时间 04:30–21:30,修正多处时间范围表述错误
2026-05-03 22:26:23 +08:00
Abner
093ca0ce49
📝 docs: 更新 Simyo 保号服务金额信息
...
- 将 Simyo 保号服务金额从 0.01 欧元调整为 10 欧元起
- 同步更新中文和英文文档中的保号成本描述
- 修正国际化翻译文件中的保号服务金额显示
- 更新模块化页面中的保号提示文本,确保金额信息一致
2026-05-01 08:38:48 +08:00
Abner
7fd54dde39
♻️ refactor: 修复安全漏洞并优化架构债务
...
安全修复:
- 修复 dom.js 和 simyo/app.js 中的 innerHTML XSS 注入风险
- 使用 HTMLSanitizer.escapeHtml/escapeAttr 替代直接模板拼接
- 将 onclick 内联事件替换为 data-* 属性 + addEventListener
- 移除 server.js 中硬编码的 Simyo X-Client-Token
架构优化:
- 新增 _shared/rate-limiter.js 分布式限流模块 (Netlify Blobs)
- verify-cookie.js 内存限流替换为 KV 跨实例共享方案
- giffgaff/utils.js debounce/throttle 改为委托共享实现
- simyo/app.js 会话存储迁移至 SecureStorage (自动 TTL 过期)
- 合并 notifications-internal.js 至 notifications.js 消除双维护路径
2026-04-25 16:30:19 +08:00
Abner
54e279153e
fix: 禁用 Cookie 登录功能并更新文档说明
...
- 禁用 giffgaff 模块中的 Cookie 登录选项,并修改了其视觉样式,使其不可用。
- 更新了中文和英文用户指南,明确告知用户视频教程中获取 OAuth 回调 URL 的方式可能已过时,应参考文字教程。
- 禁用 Cookie 登录是为了解决潜在的安全问题或功能限制,确保用户体验和数据安全。
2026-02-21 16:28:47 +08:00
Abner
c2d4599d2b
feat(i18n): 添加多语言教程文档并实现自动语言切换功能
2026-02-14 08:40:11 +08:00
Abner
92b35d7eea
docs: 更新文档图片
...
- 更新了 `docs/image/101.jpg` 和 `docs/image/102.jpg` 文件。
- 这些图片更新通常用于改进文档的视觉效果或反映最新信息。
2026-01-24 21:12:11 +08:00
Abner
c1d02b5021
docs: 更新OAuth回调URL获取指引,提升用户操作体验
...
* 优化了获取giffgaff OAuth回调URL的步骤,使其更清晰、更易于用户操作。
* 调整了用户手册(中英文)中的相关说明,指导用户通过控制台错误信息获取回调URL,而非网络面板。
* 同步更新了eSIM更换页面(giffgaff_modular.html)上的操作提示文本,与新指引保持一致。
* 更新了配套的截图文件(101.jpg 和 103.jpg)以匹配新的操作流程。
2026-01-24 20:46:02 +08:00
Abner
277defb2bd
feat(notification): 调整通知去重策略为仅页面生命周期内去重
...
移除 localStorage 持久化去重机制,确保每次页面加载(包括刷新)都会显示一次最新通知。
更新相关文档,明确说明通知系统的行为变更及 API 使用方式。
完善测试覆盖,确保功能变更后回归测试全部通过。
2025-12-13 00:03:00 +08:00
Abner
abf9063b20
docs: 添加通知系统使用指南和完整实现文档
...
- 新增详细的通知系统使用指南,涵盖架构设计、快速开始、后端配置和故障排查
- 添加通知管理器组件,支持 success、warning、error、info 四种通知类型
- 实现通知服务,支持自动轮询和已读状态管理
- 创建 Netlify Functions 通知 API,提供通知消息查询接口
- 集成通知系统到主页面,在DOM加载完成后自动初始化
- 提供完整的样式系统,包含响应式设计和无障碍访问支持
2025-11-30 18:43:38 +08:00
Abner
83a4958d03
docs(readme): 添加英文版README并优化文档链接
...
新增 README_EN.md 英文档,支持国际化访问,并在中文 README 中添加英文版本跳转链接。
同时更新了文档中的用户指南和参考文档链接,补充对应的中英文对照,提升多语言使用体验。
2025-10-31 20:44:40 +08:00
Abner
8008346426
docs(readme): 修复Giffgaff视频教程链接 🔗
2025-10-30 00:01:32 +08:00
Abner
e53b0ddc48
docs(readme): 添加Giffgaff 视频教程并更新相关描述
2025-10-29 23:53:14 +08:00
Abner
9acea1a14d
docs(readme): 更新Giffgaff eSIM工具使用指南和激活流程说明
...
- 将MFA多因子验证扩展为支持邮件/短信验证码
- 新增推荐的全自动短信验证码激活方式
- 移除已于2025年10月8日停用的手动激活引导
- 补充完整的使用指南,包括Giffgaff和Simyo的申请流程
- 更新常见问题解答,适配新的激活方式
- 添加详细的文档链接和性能优化指南入口
同时更新了 docs/User_Guide.md 中的相关截图和操作步骤描述,
确保用户能够顺利使用最新的短信验证码激活功能。
2025-10-28 22:41:45 +08:00
Abner
1382463ab1
docs(README): 更新Giffgaff eSIM申请流程文档
...
移除文档中的内存引用链接,简化流程说明
将REFACTORING_COMPLETE.md文件移至docs目录下
2025-10-08 22:27:14 +08:00
Abner
996a60b703
docs(readme): 添加 Giffgaff 使用教程链接
...
新增指向 Giffgaff 使用教程文档的链接,方便用户查阅如何通过 eSIM Tools 网站
完成 giffgaff 的 eSIM 激活流程。
该教程包含从登录、MFA 认证、获取会员信息到最终激活 eSIM 的完整步骤说明,
并配有相关界面截图辅助理解操作流程。
2025-10-07 23:40:17 +08:00
copilot-swe-agent[bot]
978b12f402
docs: Add quick reference and complete changes overview
...
- Add QUICK_REFERENCE.md with cheat sheet and common patterns
- Add CHANGES_OVERVIEW.txt with complete summary
- Include performance metrics visualization
- Document all commands and next steps
Co-authored-by: Silentely <22141172+Silentely@users.noreply.github.com >
2025-10-04 03:15:34 +00:00
copilot-swe-agent[bot]
f9d8fc4baf
docs: Add comprehensive integration guide and improvements summary
...
- Add INTEGRATION_GUIDE.md with real-world examples
- Add IMPROVEMENTS_SUMMARY.md with complete overview
- Include migration checklist and best practices
- Document all performance improvements and metrics
Co-authored-by: Silentely <22141172+Silentely@users.noreply.github.com >
2025-10-04 03:13:23 +00:00
copilot-swe-agent[bot]
bd522e7d7e
Refactor: Improve code quality and performance across scripts and modules
...
- Add parallel processing and caching to image optimization
- Enhance compression with Brotli and intelligent filtering
- Improve Performance module with memory leak prevention
- Optimize webpack config with better chunking and caching
- Add utility library with debounce/throttle/retry functions
- Create validation middleware for Express server
- Add comprehensive architecture documentation
Co-authored-by: Silentely <22141172+Silentely@users.noreply.github.com >
2025-10-04 03:07:23 +00:00
Abner
576f574d29
feat: 更新品牌标识和版权年份
...
- 将品牌名称从 "eSIM工具集" 修改为 "eSIM Tools"
- 更新 GitHub 仓库地址和相关链接
- 添加自定义应用品牌与年份范围配置功能
- 实现统一版权页脚自动注入
- 优化部分页面结构和样式
2025-08-12 19:17:22 +08:00
Abner
dd27453c97
feat(qrcode): 更新二维码生成供应商并调整相关配置
...
- 将二维码生成供应商从 api.qrserver.com 更新为 qrcode.show
- 更新了相关文档、代码和测试中的二维码生成 URL
- 调整了内容安全策略(CSP)以允许新的二维码生成 URL
- 更新了 webpack 配置,为新的二维码生成 URL 添加缓存策略
2025-08-11 21:41:54 +08:00
Abner
e8adcf798c
feat(netlify): 增加 cookie 验证以获取访问令牌
...
- 在 giffgaff-mfa-challenge 和 giffgaff-mfa-validation 函数中添加了 cookie 验证逻辑
- 如果提供 cookie 但没有访问令牌,会尝试使用 cookie 获取访问令牌
- 更新了日志输出,增加了对 cookie 和访问令牌长度的记录
- 修改了 giffgaff-token-exchange 函数,使用 Authorization 头发送客户端凭据
2025-08-10 20:39:25 +08:00
Abner
fdd5602012
docs(README): 更新功能特性描述并精简文档链接
...
- 移除 README.md 中的冗余信息和不必要的文档链接
- 删除 DEPLOYMENT_GUIDE.md 的引用
- 精简 SERVICE_TIME_CHECK.md 和 ICON_FIX.md 的内容
- 移除 CORS_SOLUTION.md 中的其他解决方案部分
2025-08-09 23:19:01 +08:00
Abner
251da627ad
docs(security): 更新内容安全策略并移除冗余代码
...
- 更新内容安全策略以允许 Google Tag Manager
- 移除 verify_cookie.php 文件
- 优化 Service Worker 注册和缓存逻辑
- 更新时间检查逻辑以使用国际时区
- 调整 OAuth 2.0 PKCE 配置,移除前端的 clientSecret
2025-08-09 17:43:44 +08:00
Abner
f97d8339e4
feat(auth): 增加 OAuth 2.0 PKCE 令牌交换功能
...
- 新增 giffgaff-token-exchange.js 函数,用于交换 authorization code 和 access token
- 更新 verify-cookie.js 函数,增加对 cookie 中 access token 的提取和验证
- 修改 giffgaff-graphql.js、giffgaff-mfa-challenge.js 和 giffgaff-mfa-validation.js 函数,支持使用 access token 或 cookie 进行身份验证
- 更新 README.md 和 COOKIE_LOGIN_SETUP.md 文档,说明新的身份验证流程和安全注意事项
2025-08-09 14:39:29 +08:00
Abner
158e579c66
refactor(service-time): 优化服务时间提示文案
...
- 将"可以申请eSIM"改为"当前时间可以申请eSIM"
- 将"不能申请eSIM"改为"当前时间不能申请eSIM"
- 更新相关文档和代码中的文案
2025-08-06 10:48:11 +08:00
Abner
14b576ee9f
refactor: 移除 Netlify 部署相关文件和配置
...
- 删除了 deployment-manifest.json 文件
- 删除了 DEPLOYMENT.md 和 DEPLOYMENT_FIX.md 文档
- 更新了 netlify.toml 配置,简化为基本设置
- 移除了 deploy-prepare.js 和 test-deploy-config.js 脚本
这些更改移除了与 Netlify 部署相关的复杂配置和文档,简化了项目结构。
2025-08-06 00:55:48 +08:00
Abner
d9de45745b
fix(deployment): 修复Netlify部署配置并优化性能
...
- 移除了不支持的配置项,简化了netlify.toml文件结构
- 添加了配置测试脚本,提高了部署的可靠性和稳定性
- 优化了部署流程,大幅减少了部署大小和提高了部署速度
- 调整了服务时间卡片的样式,使布局更加居中和美观
2025-08-06 00:46:34 +08:00
Abner
dd77aabd63
docs(deployment): 添加 Netlify 部署配置和优化指南
...
- 新增 DEPLOYMENT.md 文件,详细说明 Netlify 部署配置和优化策略
- 更新 .netlifyignore 文件,排除非必要文件以提高部署效率
- 修改 netlify.toml 文件,启用资源压缩和缓存控制
- 添加部署分析脚本,生成部署清单和统计信息
- 优化 package.json,增加部署相关命令
2025-08-06 00:41:33 +08:00
Abner
8c3564d40a
refactor(giffgaff): 重构服务时间提醒模块
...
- 调整服务时间提醒的 HTML 结构,提高可读性和可维护性
- 优化服务时间提醒的样式,提升用户体验
- 更新服务时间提醒的消息内容,使其更加清晰
- 调整当前时间显示的样式,增加视觉吸引力
- 将 SECURITY.md 文件移动到 docs 目录
2025-08-06 00:20:47 +08:00
Abner
3e06202664
feat(giffgaff): 添加服务时间检查功能并优化性能
...
- 为 Giffgaff eSIM 申请工具添加实时时间检查功能
- 根据当前时间动态显示服务状态提醒
- 优化页面加载性能
- 更新相关文档
2025-08-06 00:12:02 +08:00
Abner
b55b014c36
feat(giffgaff): implement manual eSIM activation flow and update documentation
...
- replace automatic SIM swap with manual activation process
- add eSIM information display with activation code and SSN
- include step-by-step manual activation guide and confirmation button
- update README and documentation to reflect new activation method
- add service time warning for Giffgaff's maintenance window
- remove outdated deployment options and simplify usage instructions
2025-08-02 17:07:41 +08:00
Abner
64842b97c4
fix(ui): ensure proper visibility toggle for device change and login steps
...
- hide login step and show device change option when switching to device change flow
- reset ui to show login step and hide device change elements on form reset
- update step indicator to skip step 1 when showing device change option
2025-08-02 00:04:42 +08:00
Abner
7559508858
feat(simyo): add device change and activation code handling in session management
...
- 在会话管理中新增设备更换和激活码处理逻辑
- 更新API端点以匹配前端调用路径
- 保留旧端点以确保向后兼容性
- 改进会话恢复逻辑,根据用户之前的选择显示相应步骤
2025-08-01 23:55:16 +08:00
Abner
f03304095f
refactor(docs): remove outdated documentation files
2025-08-01 23:12:06 +08:00
Abner
2c3e30a078
refactor: 项目清理和文档现代化
...
- 更新README.md技术架构描述,强调Node.js + Netlify Functions架构
- 完全重写Cookie登录设置指南,移除PHP依赖说明
- 新增遗留PHP文件说明文档,明确文件状态和处理方式
- 更新前后端架构分析文档,反映当前Node.js架构
- 完善server.js,添加缺失的GraphQL代理函数引用
- 新增项目清理总结文档,详细记录架构升级过程
- 优化项目结构和文档组织,提高可维护性
- 确保所有文档与当前Node.js架构保持一致
2025-08-01 21:42:06 +08:00
Abner
2cac231e01
🔧 Fix MFA
2025-08-01 20:14:30 +08:00
Abner
ecbcf4a3f5
🔧 Fix MFA 403 error + Complete Cookie login implementation
...
🚨 Fixed MFA 403 Error:
- Added required request headers for MFA API calls
- User-Agent, Accept, Origin, Referer headers added
- Both mfa/challenge and mfa/validation endpoints updated
- Should resolve 'Forbidden' error during email verification
🍪 Complete Cookie Login Implementation:
- Created verify_cookie.php backend service
- Full Cookie parsing and validation logic
- Secure API call to Giffgaff for Cookie verification
- Proper error handling and logging
- CORS headers included for cross-origin requests
🎯 Enhanced User Experience:
- Clear status warnings about backend requirements
- Fallback to OAuth when backend unavailable
- Detailed setup instructions for Cookie functionality
- Better error messages and troubleshooting guides
📋 Technical Features:
- Cookie parsing and validation
- Giffgaff API integration for Cookie verification
- Access Token extraction/generation
- Comprehensive error handling
- Security considerations implemented
📚 Documentation Added:
- docs/COOKIE_LOGIN_SETUP.md: Complete deployment guide
- Step-by-step setup instructions
- Troubleshooting section
- Security considerations
- Feature comparison table
🔄 Deployment Options:
1. OAuth Only (Recommended): Zero backend, full functionality
2. OAuth + Cookie: Requires verify_cookie.php deployment
3. Clear UI guidance for both scenarios
This resolves both the MFA authentication issue and provides complete Cookie login capability for users who want it.
2025-08-01 19:52:29 +08:00
Abner
9102df1ada
🚀 Comprehensive Giffgaff improvements: CORS fix + UX + Cookie login
...
🔧 OAuth CORS Fix:
- Added Netlify proxy redirects for all Giffgaff domains
- Environment-aware API endpoint configuration
- /api/giffgaff-id/* → https://id.giffgaff.com/ *
- /api/giffgaff-public/* → https://publicapi.giffgaff.com/ *
- Automatic detection of Netlify vs local environment
🎯 Enhanced User Experience:
- Detailed step-by-step callback URL acquisition guide
- Clear instructions for using browser DevTools Network panel
- Visual examples and format specifications
- Better error messages and troubleshooting tips
🍪 Cookie Login Alternative:
- Added dual login method selection (OAuth vs Cookie)
- Intuitive card-based UI for method selection
- Comprehensive Cookie acquisition guide
- Cookie format validation and error handling
- Seamless integration with existing workflow
- Bypasses OAuth complexity for advanced users
✨ Technical Improvements:
- Dynamic API endpoint switching based on environment
- Enhanced state management with cookie support
- Improved error handling and user feedback
- Responsive design for login method selection
- Cookie utility functions (set, get, erase)
🔄 Login Flow Options:
1. OAuth 2.0 (Recommended): Full security with proxy CORS fix
2. Cookie Login (Advanced): Quick access using existing session
📋 Files Modified:
- netlify.toml: Added Giffgaff proxy redirects
- src/giffgaff/giffgaff_complete_esim.html: Major UX and functionality upgrades
- docs/fixes/GIFFGAFF_COMPREHENSIVE_FIX.md: Complete documentation
This resolves all reported CORS issues and significantly improves user experience with multiple login options.
2025-08-01 19:39:58 +08:00
Abner
c5fbc34d0a
🏗️ Major project restructure and CSP fix
...
🔧 Fixed CSP Issue:
- Root cause: Netlify CSP configuration overriding HTML meta CSP
- Added missing domains: id.giffgaff.com, publicapi.giffgaff.com
- Updated netlify.toml CSP configuration
- This resolves the OAuth token exchange CSP violation
📁 Project Architecture Restructure:
- src/: Source code organized by provider (giffgaff/, simyo/)
- docs/: Documentation categorized (fixes/, guides/, reference/)
- tests/: All test files centralized
- scripts/: Deployment and utility scripts
- postman/: API collections and reference files
🔄 Path Updates:
- Updated netlify.toml redirects for new file locations
- Updated README.md with new project structure
- Updated all internal documentation links
- Maintained backward compatibility for all URLs
📋 Files Moved:
- giffgaff_complete_esim.html → src/giffgaff/
- simyo_complete_esim.html → src/simyo/
- simyo_static.html → src/simyo/
- simyo_proxy_server.js → src/simyo/
- All docs → docs/{fixes,guides,reference}/
- All tests → tests/
- All scripts → scripts/
- Postman collections → postman/
✨ Benefits:
- Improved maintainability and organization
- Better separation of concerns
- Enhanced developer experience
- Cleaner project structure following best practices
- Zero impact on user experience (all URLs preserved)
This major restructure sets foundation for better scalability and maintenance.
2025-08-01 19:28:03 +08:00