kuro223 commited on
Commit
6e3cc2c
·
1 Parent(s): 938aa20
Files changed (1) hide show
  1. templates/admin.html +20 -20
templates/admin.html CHANGED
@@ -80,7 +80,7 @@
80
  </div>
81
 
82
  <div class="flex items-center space-x-4">
83
- <button id="refreshBtn" class="px-4 py-2 bg-blue-600 hover:bg-blue-700 rounded-lg transition-colors duration-200 flex items-center space-x-2">
84
  <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
85
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/>
86
  </svg>
@@ -93,9 +93,9 @@
93
 
94
  <!-- Stats Bar -->
95
  <div class="bg-slate-800/30 border-b border-slate-700/30">
96
- <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4">
97
- <div class="grid grid-cols-1 md:grid-cols-4 gap-4">
98
- <div class="bg-gradient-to-r from-blue-500/20 to-blue-600/20 rounded-lg p-4 border border-blue-500/30">
99
  <div class="flex items-center">
100
  <div class="p-2 bg-blue-500/30 rounded-lg">
101
  <svg class="w-6 h-6 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@@ -109,7 +109,7 @@
109
  </div>
110
  </div>
111
 
112
- <div class="bg-gradient-to-r from-green-500/20 to-green-600/20 rounded-lg p-4 border border-green-500/30">
113
  <div class="flex items-center">
114
  <div class="p-2 bg-green-500/30 rounded-lg">
115
  <svg class="w-6 h-6 text-green-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@@ -123,7 +123,7 @@
123
  </div>
124
  </div>
125
 
126
- <div class="bg-gradient-to-r from-purple-500/20 to-purple-600/20 rounded-lg p-4 border border-purple-500/30">
127
  <div class="flex items-center">
128
  <div class="p-2 bg-purple-500/30 rounded-lg">
129
  <svg class="w-6 h-6 text-purple-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@@ -137,7 +137,7 @@
137
  </div>
138
  </div>
139
 
140
- <div class="bg-gradient-to-r from-orange-500/20 to-orange-600/20 rounded-lg p-4 border border-orange-500/30">
141
  <div class="flex items-center">
142
  <div class="p-2 bg-orange-500/30 rounded-lg">
143
  <svg class="w-6 h-6 text-orange-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@@ -155,9 +155,9 @@
155
  </div>
156
 
157
  <!-- Main Content -->
158
- <main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
159
  <!-- Search & Filter -->
160
- <div class="mb-6">
161
  <div class="flex flex-col sm:flex-row gap-4 items-center justify-between">
162
  <div class="relative flex-1 max-w-md">
163
  <svg class="absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@@ -199,23 +199,23 @@
199
  </div>
200
 
201
  <!-- Conversations Grid -->
202
- <div id="conversationsGrid" class="grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-6 hidden">
203
  <!-- Les conversations seront ajoutées ici dynamiquement -->
204
  </div>
205
 
206
  <!-- Modal pour voir une conversation -->
207
  <div id="conversationModal" class="fixed inset-0 bg-black/50 backdrop-blur-sm z-50 hidden">
208
- <div class="flex items-center justify-center min-h-screen p-4">
209
- <div class="bg-slate-800 rounded-2xl max-w-4xl w-full max-h-[80vh] overflow-hidden">
210
- <div class="flex items-center justify-between p-6 border-b border-slate-700">
211
  <h2 class="text-xl font-bold text-white" id="modalTitle">Conversation</h2>
212
- <button id="closeModal" class="text-slate-400 hover:text-white transition-colors">
213
  <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
214
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
215
  </svg>
216
  </button>
217
  </div>
218
- <div class="p-6 overflow-y-auto max-h-96" id="modalContent">
219
  <!-- Contenu de la conversation -->
220
  </div>
221
  </div>
@@ -305,11 +305,11 @@
305
  }) : 'Inconnue';
306
 
307
  return `
308
- <div class="conversation-card bg-slate-800/50 rounded-xl border border-slate-700/50 p-6 cursor-pointer hover:border-slate-600"
309
  onclick="openConversation('${conv.id}')">
310
- <div class="flex items-start justify-between mb-4">
311
- <div class="flex items-center space-x-3">
312
- <div class="w-10 h-10 bg-gradient-to-r from-blue-500 to-purple-600 rounded-lg flex items-center justify-center">
313
  <svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
314
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/>
315
  </svg>
@@ -332,7 +332,7 @@
332
  </div>
333
  </div>
334
 
335
- <div class="mb-4">
336
  <p class="text-sm text-slate-300 line-clamp-2">
337
  ${lastMessage.content ?
338
  (lastMessage.content.length > 100 ?
 
80
  </div>
81
 
82
  <div class="flex items-center space-x-4">
83
+ <button id="refreshBtn" class="px-6 py-3 bg-blue-600 hover:bg-blue-700 rounded-lg transition-colors duration-200 flex items-center space-x-2">
84
  <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
85
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"/>
86
  </svg>
 
93
 
94
  <!-- Stats Bar -->
95
  <div class="bg-slate-800/30 border-b border-slate-700/30">
96
+ <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6 sm:py-8">
97
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-6">
98
+ <div class="bg-gradient-to-r from-blue-500/20 to-blue-600/20 rounded-lg p-6 border border-blue-500/30">
99
  <div class="flex items-center">
100
  <div class="p-2 bg-blue-500/30 rounded-lg">
101
  <svg class="w-6 h-6 text-blue-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
 
109
  </div>
110
  </div>
111
 
112
+ <div class="bg-gradient-to-r from-green-500/20 to-green-600/20 rounded-lg p-6 border border-green-500/30">
113
  <div class="flex items-center">
114
  <div class="p-2 bg-green-500/30 rounded-lg">
115
  <svg class="w-6 h-6 text-green-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
 
123
  </div>
124
  </div>
125
 
126
+ <div class="bg-gradient-to-r from-purple-500/20 to-purple-600/20 rounded-lg p-6 border border-purple-500/30">
127
  <div class="flex items-center">
128
  <div class="p-2 bg-purple-500/30 rounded-lg">
129
  <svg class="w-6 h-6 text-purple-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
 
137
  </div>
138
  </div>
139
 
140
+ <div class="bg-gradient-to-r from-orange-500/20 to-orange-600/20 rounded-lg p-6 border border-orange-500/30">
141
  <div class="flex items-center">
142
  <div class="p-2 bg-orange-500/30 rounded-lg">
143
  <svg class="w-6 h-6 text-orange-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
 
155
  </div>
156
 
157
  <!-- Main Content -->
158
+ <main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12 sm:py-16">
159
  <!-- Search & Filter -->
160
+ <div class="mb-8 sm:mb-10">
161
  <div class="flex flex-col sm:flex-row gap-4 items-center justify-between">
162
  <div class="relative flex-1 max-w-md">
163
  <svg class="absolute left-3 top-1/2 transform -translate-y-1/2 w-5 h-5 text-slate-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
 
199
  </div>
200
 
201
  <!-- Conversations Grid -->
202
+ <div id="conversationsGrid" class="grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-8 sm:gap-10 hidden">
203
  <!-- Les conversations seront ajoutées ici dynamiquement -->
204
  </div>
205
 
206
  <!-- Modal pour voir une conversation -->
207
  <div id="conversationModal" class="fixed inset-0 bg-black/50 backdrop-blur-sm z-50 hidden">
208
+ <div class="flex items-center justify-center min-h-screen p-6 sm:p-4">
209
+ <div class="bg-slate-800 rounded-2xl max-w-4xl w-full max-h-[85vh] overflow-hidden">
210
+ <div class="flex items-center justify-between p-8 border-b border-slate-700">
211
  <h2 class="text-xl font-bold text-white" id="modalTitle">Conversation</h2>
212
+ <button id="closeModal" class="text-slate-400 hover:text-white transition-colors p-2">
213
  <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
214
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
215
  </svg>
216
  </button>
217
  </div>
218
+ <div class="p-8 overflow-y-auto max-h-[60vh]" id="modalContent">
219
  <!-- Contenu de la conversation -->
220
  </div>
221
  </div>
 
305
  }) : 'Inconnue';
306
 
307
  return `
308
+ <div class="conversation-card bg-slate-800/50 rounded-xl border border-slate-700/50 p-8 cursor-pointer hover:border-slate-600"
309
  onclick="openConversation('${conv.id}')">
310
+ <div class="flex items-start justify-between mb-6">
311
+ <div class="flex items-center space-x-4">
312
+ <div class="w-12 h-12 bg-gradient-to-r from-blue-500 to-purple-600 rounded-lg flex items-center justify-center">
313
  <svg class="w-5 h-5 text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
314
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"/>
315
  </svg>
 
332
  </div>
333
  </div>
334
 
335
+ <div class="mb-6">
336
  <p class="text-sm text-slate-300 line-clamp-2">
337
  ${lastMessage.content ?
338
  (lastMessage.content.length > 100 ?