-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix(web): improve copy functionality for Google Authenticator secret (#616) #876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
🤖 Advisory Check ResultsThese are advisory checks to help improve code quality. They won't block your PR from being merged. 📋 PR InformationTitle Format: ✅ Good - Follows Conventional Commits 🔧 Backend ChecksGo Formatting: Files needing formattingGo Vet: ✅ Good Fix locally: go fmt ./... # Format code
go vet ./... # Check for issues
go test ./... # Run tests⚛️ Frontend ChecksBuild & Type Check: ✅ Success Fix locally: cd web
npm run build # Test build (includes type checking)📖 ResourcesQuestions? Feel free to ask in the comments! 🙏 These checks are advisory and won't block your PR from being merged. This comment is automatically generated from pr-checks-run.yml. |
🤖 Advisory Check ResultsThese are advisory checks to help improve code quality. They won't block your PR from being merged. 📋 PR InformationTitle Format: ✅ Good - Follows Conventional Commits 🔧 Backend ChecksGo Formatting: ✅ Good Fix locally: go fmt ./... # Format code
go vet ./... # Check for issues
go test ./... # Run tests⚛️ Frontend ChecksBuild & Type Check: ✅ Success Fix locally: cd web
npm run build # Test build (includes type checking)📖 ResourcesQuestions? Feel free to ask in the comments! 🙏 These checks are advisory and won't block your PR from being merged. This comment is automatically generated from pr-checks-run.yml. |
|
Could you provide a snapshot for this? |
|
Havet got what this used for can put some business scenario and test screenshot ? |
…oFxAiOS#616) **问题**: 绑定 Google 验证器时,复制密钥功能无反馈,用户不知道是否复制成功 **修复**: - 添加 copySuccess state 追踪复制状态 - 增强 copyToClipboard 函数: - 使用 async/await 处理异步操作 - 添加视觉反馈(按钮变绿色,显示 ✓ Copied!,2秒后恢复) - 添加错误处理和 document.execCommand 降级方案 - 复制失败时显示错误提示 - 更新复制按钮 UI: - 添加 transition-all 动画效果 - 复制成功时背景变为绿色 (#0ECB81) - 文字从 'Copy' 变为 '✓ Copied!' **测试**: - ✅ 复制成功时按钮变绿并显示 ✓ Copied! - ✅ 2秒后自动恢复原样 - ✅ 降级方案在旧浏览器上工作 - ✅ 与上游最新代码(betaMode, password toggle)兼容 Related to NoFxAiOS#616
29fe11f to
95e4261
Compare
🤖 Advisory Check ResultsThese are advisory checks to help improve code quality. They won't block your PR from being merged. 📋 PR InformationTitle Format: ✅ Good - Follows Conventional Commits 🔧 Backend ChecksGo Formatting: Files needing formattingGo Vet: ✅ Good Fix locally: go fmt ./... # Format code
go vet ./... # Check for issues
go test ./... # Run tests⚛️ Frontend ChecksBuild & Type Check: ✅ Success Fix locally: cd web
npm run build # Test build (includes type checking)📖 ResourcesQuestions? Feel free to ask in the comments! 🙏 These checks are advisory and won't block your PR from being merged. This comment is automatically generated from pr-checks-run.yml. |
Pull Request - Frontend | 前端 PR
📝 Description | 描述
English:
Fixed the issue where the copy button for Google Authenticator secret key had no feedback, leaving users unsure if the copy succeeded.
中文:
修复了 Google 验证器密钥复制按钮无反馈的问题,导致用户不确定复制是否成功。
🎯 Type of Change | 变更类型
🔗 Related Issues | 相关 Issue
📋 Changes Made | 具体变更
English:
copySuccessstate to track copy statuscopyToClipboardfunction with:document.execCommandfor older browsers中文:
copySuccessstate 追踪复制状态copyToClipboard函数:document.execCommand支持旧浏览器🧪 Testing | 测试
Test Environment | 测试环境
Manual Testing | 手动测试
Test Results | 测试结果:
✅ Checklist | 检查清单
Code Quality | 代码质量
By submitting this PR, I confirm | 提交此 PR,我确认: