|
| 1 | +import { Button } from "./ui/button"; |
| 2 | +import { Card } from "./ui/card"; |
| 3 | + |
| 4 | +export function Certificates() { |
| 5 | + const handleDownload = () => { |
| 6 | + const link = document.createElement('a'); |
| 7 | + link.href = '/certificates/codegate_ca.crt'; |
| 8 | + link.download = 'codegate.crt'; |
| 9 | + document.body.appendChild(link); |
| 10 | + link.click(); |
| 11 | + document.body.removeChild(link); |
| 12 | + }; |
| 13 | + |
| 14 | + return ( |
| 15 | + <div className="max-w-4xl mx-auto h-[calc(100vh-4rem)] overflow-y-auto px-4 pr-6"> |
| 16 | + <h1 className="text-3xl font-bold mb-8">Certificate Download</h1> |
| 17 | + |
| 18 | + <Card className="p-6 mb-8 bg-white shadow-lg border-2 border-teal-100"> |
| 19 | + <div className="flex items-start gap-6"> |
| 20 | + <div className="w-16 h-16 bg-teal-50 rounded-full flex items-center justify-center flex-shrink-0"> |
| 21 | + <svg xmlns="http://www.w3.org/2000/svg" className="h-8 w-8 text-teal-600" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
| 22 | + <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z" /> |
| 23 | + </svg> |
| 24 | + </div> |
| 25 | + <div className="flex-grow"> |
| 26 | + <h2 className="text-xl font-semibold mb-2">CodeGate SSL Certificate</h2> |
| 27 | + <p className="text-gray-600 mb-4"> |
| 28 | + This certificate allows CodeGate to act as a proxy for certain software such as CoPilot. |
| 29 | + </p> |
| 30 | + <Button |
| 31 | + onClick={handleDownload} |
| 32 | + className="bg-teal-600 hover:bg-teal-700 text-white px-4 py-2 rounded-md transition-colors" |
| 33 | + > |
| 34 | + Download Certificate |
| 35 | + </Button> |
| 36 | + </div> |
| 37 | + </div> |
| 38 | + </Card> |
| 39 | + |
| 40 | + <Card className="p-6 mb-8 bg-white shadow-lg border-2 border-teal-100"> |
| 41 | + <h2 className="text-xl font-semibold mb-4">Is this certificate safe to install on my machine?</h2> |
| 42 | + <div className="space-y-4"> |
| 43 | + <div className="flex gap-3"> |
| 44 | + <svg className="w-5 h-5 text-teal-600 flex-shrink-0 mt-1" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
| 45 | + <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" /> |
| 46 | + </svg> |
| 47 | + <p className="text-gray-700"><strong>Local Only:</strong> CodeGate runs entirely on your machine within an isolated container, ensuring all data processing stays local without any external transmissions.</p> |
| 48 | + </div> |
| 49 | + |
| 50 | + <div className="flex gap-3"> |
| 51 | + <svg className="w-5 h-5 text-teal-600 flex-shrink-0 mt-1" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
| 52 | + <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" /> |
| 53 | + </svg> |
| 54 | + <p className="text-gray-700"><strong>Secure Certificate Handling:</strong> This custom CA is locally generated and managed, the developers of CodeGate have no access to it.</p> |
| 55 | + </div> |
| 56 | + |
| 57 | + <div className="flex gap-3"> |
| 58 | + <svg className="w-5 h-5 text-teal-600 flex-shrink-0 mt-1" fill="none" viewBox="0 0 24 24" stroke="currentColor"> |
| 59 | + <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" /> |
| 60 | + </svg> |
| 61 | + <p className="text-gray-700"><strong>No External Communications:</strong> CodeGate is designed with no capability to call home or communicate with external servers, outside of those requested by the IDE or Agent.</p> |
| 62 | + </div> |
| 63 | + </div> |
| 64 | + </Card> |
| 65 | + |
| 66 | + <Card className="p-6 mb-8 bg-white shadow-lg border-2 border-teal-100"> |
| 67 | + <h2 className="text-xl font-semibold mb-4">Installation Instructions</h2> |
| 68 | + <div className="space-y-6"> |
| 69 | + <div> |
| 70 | + <h3 className="font-semibold text-lg mb-2">macOS Instructions:</h3> |
| 71 | + <ol className="list-decimal ml-6 space-y-2 text-gray-700"> |
| 72 | + <li>Double-click the downloaded certificate file</li> |
| 73 | + <li>Keychain Access will open automatically</li> |
| 74 | + <li>Add the certificate to the System keychain</li> |
| 75 | + <li>Double-click the imported certificate</li> |
| 76 | + <li>Expand the "Trust" section</li> |
| 77 | + <li>Set "When using this certificate" to "Always Trust"</li> |
| 78 | + </ol> |
| 79 | + </div> |
| 80 | + |
| 81 | + <div> |
| 82 | + <h3 className="font-semibold text-lg mb-2">Windows Instructions:</h3> |
| 83 | + <ol className="list-decimal ml-6 space-y-2 text-gray-700"> |
| 84 | + <li>Double-click the downloaded certificate file</li> |
| 85 | + <li>Click "Install Certificate"</li> |
| 86 | + <li>Select "Local Machine" and click Next</li> |
| 87 | + <li>Choose "Place all certificates in the following store"</li> |
| 88 | + <li>Click "Browse" and select "Trusted Root Certification Authorities"</li> |
| 89 | + <li>Click "Next" and then "Finish"</li> |
| 90 | + </ol> |
| 91 | + </div> |
| 92 | + |
| 93 | + <div> |
| 94 | + <h3 className="font-semibold text-lg mb-2">Linux Instructions:</h3> |
| 95 | + <ol className="list-decimal ml-6 space-y-2 text-gray-700"> |
| 96 | + <li>Copy the certificate to /usr/local/share/ca-certificates/</li> |
| 97 | + <li>Rename it to have a .crt extension</li> |
| 98 | + <li>Run: sudo update-ca-certificates</li> |
| 99 | + <li>Restart your browser</li> |
| 100 | + </ol> |
| 101 | + </div> |
| 102 | + </div> |
| 103 | + </Card> |
| 104 | + </div> |
| 105 | + ); |
| 106 | +} |
0 commit comments