Spaces:
Running
Running
File size: 5,425 Bytes
50b6691 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | <!DOCTYPE html>
<html lang="pt">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Dashboard - Candidaturas RP</title>
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>
<body class="bg-gray-900 text-white">
<div class="flex h-screen">
<!-- Sidebar -->
<div class="bg-gray-800 w-64 p-4">
<div class="flex items-center mb-8">
<img src="http://static.photos/gaming/200x200/42" class="h-10 w-10 rounded-full mr-3" alt="Logo">
<h1 class="text-xl font-bold">Admin Panel</h1>
</div>
<nav>
<ul>
<li class="mb-2">
<a href="#" class="block px-4 py-2 rounded bg-gray-700">Candidaturas</a>
</li>
<li class="mb-2">
<a href="players.html" class="block px-4 py-2 rounded hover:bg-gray-700">Jogadores Aprovados</a>
</li>
<li class="mb-2">
<a href="strikes.html" class="block px-4 py-2 rounded hover:bg-gray-700">Strikes</a>
</li>
<li>
<a href="#" id="logout" class="block px-4 py-2 rounded hover:bg-gray-700">Sair</a>
</li>
</ul>
</nav>
</div>
<!-- Main Content -->
<div class="flex-1 p-8 overflow-auto">
<div class="bg-gray-800 rounded-lg p-6">
<h2 class="text-xl font-bold mb-4">Gerenciamento de Candidaturas</h2>
<div class="mb-4 flex justify-between items-center">
<div class="flex space-x-2">
<button class="px-4 py-2 bg-indigo-600 rounded">Todas</button>
<button class="px-4 py-2 bg-gray-700 rounded">Pendentes</button>
<button class="px-4 py-2 bg-gray-700 rounded">Aprovadas</button>
<button class="px-4 py-2 bg-gray-700 rounded">Rejeitadas</button>
</div>
<input type="text" placeholder="Buscar..." class="p-2 bg-gray-700 rounded">
</div>
<div class="overflow-x-auto">
<table class="w-full">
<thead>
<tr class="border-b border-gray-700">
<th class="p-2 text-left">ID</th>
<th class="p-2 text-left">Nome</th>
<th class="p-2 text-left">Personagem</th>
<th class="p-2 text-left">Boost</th>
<th class="p-2 text-left">Data</th>
<th class="p-2 text-left">Status</th>
<th class="p-2 text-left">Ações</th>
</tr>
</thead>
<tbody>
<!-- Applications will be loaded here -->
</tbody>
</table>
</div>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2"></script>
<script>
const { createClient } = supabase
const supabaseUrl = 'SUPABASE_URL'
const supabaseKey = 'SUPABASE_KEY'
const supabase = createClient(supabaseUrl, supabaseKey)
document.getElementById('logout').addEventListener('click', async () => {
await supabase.auth.signOut()
window.location.href = 'index.html'
})
// Load applications
async function loadApplications() {
// In a real app, this would fetch from your database
// For demo we'll just show some sample data
const tableBody = document.querySelector('tbody')
const sampleData = [
{
id: 1,
name: "João Silva",
character: "Carlos Mendes",
boost: "Boost 1",
date: "2023-10-15",
status: "Pendente"
},
// More sample data...
]
tableBody.innerHTML = sampleData.map(app => `
<tr class="border-b border-gray-700 hover:bg-gray-700">
<td class="p-2">${app.id}</td>
<td class="p-2">${app.name}</td>
<td class="p-2">${app.character}</td>
<td class="p-2">${app.boost}</td>
<td class="p-2">${app.date}</td>
<td class="p-2">${app.status}</td>
<td class="p-2">
<button class="px-2 py-1 bg-green-600 rounded mr-1">Aprovar</button>
<button class="px-2 py-1 bg-red-600 rounded mr-1">Rejeitar</button>
<button class="px-2 py-1 bg-blue-600 rounded">Ver</button>
</td>
</tr>
`).join('')
}
loadApplications()
</script>
</body>
</html> |