amauricunha commited on
Commit
879d451
Β·
verified Β·
1 Parent(s): 0143084

Upload admin.html

Browse files
Files changed (1) hide show
  1. templates/admin.html +107 -68
templates/admin.html CHANGED
@@ -1,73 +1,112 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>English Helper - Admin Panel</title>
7
- <script src="https://cdn.tailwindcss.com"></script>
8
- <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
9
- <style>
10
- /* Tailwind utility classes should be used directly in HTML, not via @apply in <style> */
11
- .spinner {
12
- border: 3px solid #f3f3f3;
13
- border-top: 3px solid #3498db;
14
- border-radius: 50%;
15
- width: 20px;
16
- height: 20px;
17
- animation: spin 1s linear infinite;
18
- display: inline-block;
19
- margin-right: 10px;
20
- }
21
- @keyframes spin {
22
- 0% { transform: rotate(0deg); }
23
- 100% { transform: rotate(360deg); }
24
- }
25
- .table-container {
26
- max-height: 600px;
27
- overflow-y: auto;
28
- }
29
- </style>
30
- </head>
31
- <body class="bg-gray-100 min-h-screen">
32
- <!-- Admin Login Modal removed: admin panel is always accessible -->
33
-
34
- <!-- Admin Interface -->
35
- <div id="adminInterface">
36
- <!-- Header -->
37
- <header class="bg-white shadow-md">
38
- <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
39
- <div class="flex justify-between items-center py-4">
40
- <div class="flex items-center">
41
- <h1 class="text-2xl font-bold text-gray-900">πŸŽ“ English Helper Admin</h1>
42
- </div>
43
- <!-- Admin user info and logout removed -->
44
  </div>
45
  </div>
46
- </header>
47
-
48
- <!-- Navigation Tabs -->
49
- <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mt-6">
50
- <div class="border-b border-gray-200">
51
- <nav class="-mb-px flex space-x-8">
52
- <button onclick="showTab('dashboard')" class="admin-tab active" data-tab="dashboard">
53
- πŸ“Š Dashboard
54
- </button>
55
- <button onclick="showTab('users')" class="admin-tab" data-tab="users">
56
- πŸ‘₯ Users
57
- {% extends "base.html" %}
58
- {% block title %}Admin - English Helper{% endblock %}
59
- {% block content %}
60
- <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
61
- <h1 class="text-2xl font-bold mb-4">Painel de AdministraΓ§Γ£o</h1>
62
- <!-- Aqui vai o conteΓΊdo do painel admin, tabs, cards, grΓ‘ficos, etc. -->
63
- <p>Gerencie usuΓ‘rios, flashcards e estatΓ­sticas do sistema.</p>
64
- <!-- Mantenha seus scripts JS e componentes aqui, se necessΓ‘rio -->
65
- </div>
66
- {% endblock %}
67
- <span class="text-sm text-gray-500">${formatDate(activity.timestamp)}</span>
68
- </div>
69
- `).join('');
70
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
 
72
  async function loadUsers() {
73
  try {
 
1
+ {% extends "base.html" %}
2
+ {% block title %}Admin - English Helper{% endblock %}
3
+ {% block content %}
4
+ <style>
5
+ .spinner {
6
+ border: 3px solid #f3f3f3;
7
+ border-top: 3px solid #3498db;
8
+ border-radius: 50%;
9
+ width: 20px;
10
+ height: 20px;
11
+ animation: spin 1s linear infinite;
12
+ display: inline-block;
13
+ margin-right: 10px;
14
+ }
15
+ @keyframes spin {
16
+ 0% { transform: rotate(0deg); }
17
+ 100% { transform: rotate(360deg); }
18
+ }
19
+ .table-container {
20
+ max-height: 600px;
21
+ overflow-y: auto;
22
+ }
23
+ </style>
24
+
25
+ <div id="adminInterface">
26
+ <!-- Header -->
27
+ <header class="bg-white shadow-md">
28
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
29
+ <div class="flex justify-between items-center py-4">
30
+ <div class="flex items-center">
31
+ <h1 class="text-2xl font-bold text-gray-900">πŸŽ“ English Helper Admin</h1>
 
 
 
 
 
 
 
 
 
 
 
 
32
  </div>
33
  </div>
34
+ </div>
35
+ </header>
36
+
37
+ <!-- Navigation Tabs -->
38
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mt-6">
39
+ <div class="border-b border-gray-200">
40
+ <nav class="-mb-px flex space-x-8">
41
+ <button onclick="showTab('dashboard')" class="admin-tab active" data-tab="dashboard">
42
+ πŸ“Š Dashboard
43
+ </button>
44
+ <button onclick="showTab('users')" class="admin-tab" data-tab="users">
45
+ πŸ‘₯ Users
46
+ </button>
47
+ <button onclick="showTab('database')" class="admin-tab" data-tab="database">
48
+ πŸ—„οΈ Database
49
+ </button>
50
+ <button onclick="showTab('tokens')" class="admin-tab" data-tab="tokens">
51
+ πŸ’³ Token Usage
52
+ </button>
53
+ <button onclick="showTab('system')" class="admin-tab" data-tab="system">
54
+ 🩺 System Health
55
+ </button>
56
+ </nav>
57
+ </div>
58
+ </div>
59
+
60
+ <!-- Tab Content -->
61
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
62
+ <!-- Dashboard Tab -->
63
+ <div id="dashboardTab" class="tab-content">
64
+ <!-- ...existing dashboard content... -->
65
+ </div>
66
+
67
+ <!-- Users Tab -->
68
+ <div id="usersTab" class="tab-content hidden">
69
+ <!-- ...existing users content... -->
70
+ </div>
71
+
72
+ <!-- Database Tab -->
73
+ <div id="databaseTab" class="tab-content hidden">
74
+ <!-- ...existing database content... -->
75
+ </div>
76
+
77
+ <!-- Token Usage Tab -->
78
+ <div id="tokensTab" class="tab-content hidden">
79
+ <!-- ...existing token usage content... -->
80
+ </div>
81
+
82
+ <!-- System Health Tab -->
83
+ <div id="systemTab" class="tab-content hidden">
84
+ <!-- ...existing system health content... -->
85
+ </div>
86
+ </div>
87
+ </div>
88
+
89
+ <!-- User Detail Modal -->
90
+ <div id="userDetailModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
91
+ <div class="bg-white rounded-lg p-6 max-w-4xl w-full mx-4 max-h-screen overflow-y-auto">
92
+ <div class="flex justify-between items-center mb-4">
93
+ <!-- ...existing modal header... -->
94
+ </div>
95
+ <div id="userDetailContent">
96
+ <!-- ...existing modal content... -->
97
+ </div>
98
+ </div>
99
+ </div>
100
+
101
+ <!-- Toast Notifications -->
102
+ <div id="toastContainer" class="fixed top-4 right-4 z-50"></div>
103
+
104
+ <script src="https://cdn.tailwindcss.com"></script>
105
+ <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
106
+ <script>
107
+ // ...existing admin JS code...
108
+ </script>
109
+ {% endblock %}
110
 
111
  async function loadUsers() {
112
  try {