| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title>GitHub ↔️ Supabase Connector</title> |
| <link rel="stylesheet" href="style.css"> |
| <script src="https://cdn.tailwindcss.com"></script> |
| <script src="https://unpkg.com/feather-icons"></script> |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> |
| <script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script> |
| </head> |
| <body class="bg-gray-50 min-h-screen"> |
| <custom-navbar></custom-navbar> |
| |
| <main class="container mx-auto px-4 py-12"> |
| <div class="max-w-3xl mx-auto bg-white rounded-xl shadow-md overflow-hidden p-8"> |
| <div class="text-center mb-10"> |
| <h1 class="text-3xl font-bold text-gray-800 mb-2">Connect GitHub ↔️ Supabase</h1> |
| <p class="text-gray-600">Seamlessly integrate your GitHub repositories with Supabase for automated deployments</p> |
| </div> |
|
|
| <div class="grid md:grid-cols-2 gap-8"> |
| |
| <div class="bg-gray-50 p-6 rounded-lg border border-gray-200"> |
| <div class="flex items-center mb-4"> |
| <i data-feather="github" class="w-6 h-6 mr-2 text-gray-800"></i> |
| <h2 class="text-xl font-semibold text-gray-800">GitHub Setup</h2> |
| </div> |
| <p class="text-gray-600 mb-4">Connect your GitHub account to enable repository access.</p> |
| <button id="githubAuth" class="w-full bg-gray-800 hover:bg-gray-700 text-white py-2 px-4 rounded-lg flex items-center justify-center"> |
| <i data-feather="github" class="w-5 h-5 mr-2"></i> |
| Connect GitHub |
| </button> |
| <div id="githubStatus" class="mt-4 text-sm text-gray-500 hidden"> |
| <i data-feather="check-circle" class="w-4 h-4 inline mr-1 text-green-500"></i> |
| <span>Connected</span> |
| </div> |
| </div> |
|
|
| |
| <div class="bg-gray-50 p-6 rounded-lg border border-gray-200"> |
| <div class="flex items-center mb-4"> |
| <i data-feather="database" class="w-6 h-6 mr-2 text-gray-800"></i> |
| <h2 class="text-xl font-semibold text-gray-800">Supabase Setup</h2> |
| </div> |
| <div class="space-y-4"> |
| <div> |
| <label class="block text-sm font-medium text-gray-700 mb-1">Project URL</label> |
| <input type="text" id="supabaseUrl" placeholder="https://your-project-ref.supabase.co" class="w-full px-3 py-2 border border-gray-300 rounded-md"> |
| </div> |
| <div> |
| <label class="block text-sm font-medium text-gray-700 mb-1">API Key</label> |
| <input type="password" id="supabaseKey" placeholder="your-anon-key" class="w-full px-3 py-2 border border-gray-300 rounded-md"> |
| </div> |
| <button id="supabaseConnect" class="w-full bg-indigo-600 hover:bg-indigo-700 text-white py-2 px-4 rounded-lg"> |
| Connect Supabase |
| </button> |
| <div id="supabaseStatus" class="text-sm text-gray-500 hidden"> |
| <i data-feather="check-circle" class="w-4 h-4 inline mr-1 text-green-500"></i> |
| <span>Connected</span> |
| </div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div id="configPanel" class="mt-10 hidden"> |
| <h2 class="text-xl font-semibold text-gray-800 mb-4">Configuration</h2> |
| <div class="bg-gray-50 p-6 rounded-lg border border-gray-200"> |
| <div class="grid md:grid-cols-2 gap-6"> |
| <div> |
| <label class="block text-sm font-medium text-gray-700 mb-1">Select Repository</label> |
| <select id="repoSelect" class="w-full px-3 py-2 border border-gray-300 rounded-md"> |
| <option value="">Loading repositories...</option> |
| </select> |
| </div> |
| <div> |
| <label class="block text-sm font-medium text-gray-700 mb-1">Select Branch</label> |
| <select id="branchSelect" class="w-full px-3 py-2 border border-gray-300 rounded-md" disabled> |
| <option value="">Select repository first</option> |
| </select> |
| </div> |
| </div> |
| <div class="mt-4"> |
| <label class="block text-sm font-medium text-gray-700 mb-1">Deployment Hook URL</label> |
| <input type="text" id="hookUrl" placeholder="https://api.supabase.com/v1/hooks/..." class="w-full px-3 py-2 border border-gray-300 rounded-md"> |
| </div> |
| |
| <div id="dropZone" class="mt-4 border-2 border-dashed border-gray-300 rounded-lg p-8 text-center bg-gray-50 hover:bg-gray-100 transition-colors"> |
| <div class="flex flex-col items-center justify-center"> |
| <i data-feather="upload" class="w-12 h-12 text-gray-400 mb-2"></i> |
| <p class="text-gray-600">Drag & drop files here or click to browse</p> |
| <input type="file" id="fileInput" class="hidden" multiple> |
| <p class="text-xs text-gray-500 mt-2">Supported: .js, .ts, .jsx, .tsx, .sql, .json</p> |
| </div> |
| </div> |
| <div id="fileList" class="mt-2 hidden"> |
| <h3 class="text-sm font-medium text-gray-700">Selected Files:</h3> |
| <ul id="fileItems" class="text-sm text-gray-600"></ul> |
| </div> |
| <button id="saveConfig" class="mt-6 bg-green-600 hover:bg-green-700 text-white py-2 px-6 rounded-lg"> |
| Save Configuration |
| </button> |
| </div> |
| </div> |
| </div> |
| </main> |
|
|
| <custom-footer></custom-footer> |
|
|
| <script src="components/navbar.js"></script> |
| <script src="components/footer.js"></script> |
| <script src="script.js"></script> |
| <script> |
| feather.replace(); |
| |
| |
| if (localStorage.getItem('githubToken')) { |
| document.getElementById('githubAuth').classList.add('hidden'); |
| document.getElementById('githubStatus').classList.remove('hidden'); |
| } |
| </script> |
| <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script> |
| </body> |
| </html> |