SyncAuthPromptModal.jsx 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. import React from 'react';
  2. import { CloudUpload, ShieldCheck, Smartphone, Mic, X } from 'lucide-react';
  3. export const SyncAuthPromptModal = ({ isOpen, onClose, onLoginClick }) => {
  4. if (!isOpen) return null;
  5. return (
  6. <div className="fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/75 backdrop-blur-md animate-fade-in">
  7. <div className="relative w-full max-w-md bg-[#0B0C10] border border-white/15 rounded-3xl p-6 sm:p-8 shadow-2xl text-white space-y-6">
  8. {/* Close Button */}
  9. <div className="flex justify-end">
  10. <button
  11. onClick={onClose}
  12. className="p-1 rounded-full text-slate-400 hover:text-white hover:bg-white/10 transition-colors"
  13. >
  14. <X className="w-5 h-5" />
  15. </button>
  16. </div>
  17. {/* Header Icon */}
  18. <div className="text-center space-y-3">
  19. <div className="w-16 h-16 rounded-full bg-white/5 border border-white/10 flex items-center justify-center mx-auto">
  20. <CloudUpload className="w-8 h-8 text-white" />
  21. </div>
  22. <div className="space-y-1">
  23. <h2 className="text-lg font-bold">同步录音需要登录</h2>
  24. <p className="text-xs text-slate-400 leading-relaxed">
  25. 请先注册或登录星痕现场记录账号<br />数据才能安全同步至云端备份。
  26. </p>
  27. </div>
  28. </div>
  29. {/* Feature List */}
  30. <div className="p-4 rounded-2xl bg-white/[0.04] border border-white/10 space-y-3 text-xs text-slate-300">
  31. <div className="flex items-center space-x-3">
  32. <ShieldCheck className="w-4 h-4 text-white" />
  33. <span>HTTPS 安全传输与账号隔离</span>
  34. </div>
  35. <div className="flex items-center space-x-3">
  36. <Smartphone className="w-4 h-4 text-white" />
  37. <span>账号下的记录增量同步</span>
  38. </div>
  39. <div className="flex items-center space-x-3">
  40. <Mic className="w-4 h-4 text-white" />
  41. <span>专属录音设备绑定与管理</span>
  42. </div>
  43. </div>
  44. {/* Actions */}
  45. <div className="space-y-2 pt-2">
  46. <button
  47. onClick={() => {
  48. onClose();
  49. onLoginClick();
  50. }}
  51. className="w-full py-3 rounded-xl bg-white text-slate-950 font-semibold text-xs shadow-lg hover:bg-slate-100 transition-all"
  52. >
  53. 立即注册 / 登录
  54. </button>
  55. <button
  56. onClick={onClose}
  57. className="w-full py-2 text-xs text-slate-400 hover:text-white transition-colors text-center block"
  58. >
  59. 暂不同步
  60. </button>
  61. </div>
  62. </div>
  63. </div>
  64. );
  65. };