fernandosliborioo's picture
continuar
3129a87 verified
Raw History Blame Contribute Delete
6.36 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Users Management - HotmartFlow Integrator</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-gray-50">
<custom-navbar></custom-navbar>
<main class="container mx-auto px-4 py-8">
<div class="flex justify-between items-center mb-8">
<h1 class="text-3xl font-bold text-gray-800">Users Management</h1>
<button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg transition duration-200">
Export Users
</button>
</div>
<!-- Users Table -->
<div class="bg-white rounded-lg shadow-md overflow-hidden">
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Name
</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Email
</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Plan
</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Status
</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Join Date
</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
Actions
</th>
</tr>
</thead>
<tbody class="bg-white divide-y divide-gray-200" id="usersTableBody">
<tr>
<td colspan="5" class="px-6 py-8 text-center">
<div class="animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600 mx-auto"></div>
<p class="text-gray-600 mt-2">Loading users...</p>
</td>
</tr>
</tbody>
</table>
</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>
// Mock users data
const mockUsers = [
{
id: 1,
name: 'John Doe',
email: 'john@example.com',
plan: 'Premium Plan',
status: 'active',
joinDate: '2024-01-15'
},
{
id: 2,
name: 'Jane Smith',
email: 'jane@example.com',
plan: 'Basic Plan',
status: 'blocked',
joinDate: '2024-01-10'
},
{
id: 3,
name: 'Mike Johnson',
email: 'mike@example.com',
plan: 'Enterprise Plan',
status: 'active',
joinDate: '2024-01-08'
},
{
id: 4,
name: 'Sarah Wilson',
email: 'sarah@example.com',
plan: 'Premium Plan',
status: 'active',
joinDate: '2024-01-05'
}
];
// Populate users table
setTimeout(() => {
const tableBody = document.getElementById('usersTableBody');
if (tableBody) {
tableBody.innerHTML = mockUsers.map(user => `
<tr class="hover:bg-gray-50">
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium text-gray-900">${user.name}</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm text-gray-900">${user.email}</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${
user.plan === 'Premium Plan' ? 'bg-purple-100 text-purple-800' :
user.plan === 'Enterprise Plan' ? 'bg-green-100 text-green-800' : 'bg-blue-100 text-blue-800'
}">
${user.plan}
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ${
user.status === 'active' ? 'bg-green-100 text-green-800' : 'bg-red-100 text-red-800'
}">
${user.status}
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">${user.joinDate}</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<button class="text-blue-600 hover:text-blue-900 mr-3">Edit</button>
<button class="text-red-600 hover:text-red-900">Delete</button>
</td>
</tr>
`).join('');
}, 1500);
});
</script>
</body>
</html>