commit avant register et responsive

This commit is contained in:
root
2025-08-31 16:23:13 +02:00
parent dfaae262c7
commit 849167994c
8 changed files with 2101 additions and 30 deletions

View File

@@ -6,9 +6,7 @@
class="bg-primary-600 hover:bg-primary-700 text-white rounded-full p-4 shadow-lg hover:shadow-xl transition-all duration-200 transform hover:scale-110"
title="Signaler un problème ou une amélioration"
>
<svg class="w-6 h-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" />
</svg>
<Ticket class="w-6 h-6" />
</button>
</div>
@@ -132,7 +130,7 @@ import { useToast } from 'vue-toastification'
import { useRouter } from 'vue-router'
import axios from '@/utils/axios'
import { useAuthStore } from '@/stores/auth'
import { Plus, X, Send } from 'lucide-vue-next'
import { Plus, X, Send, Ticket } from 'lucide-vue-next'
import LoadingLogo from '@/components/LoadingLogo.vue'
const toast = useToast()

View File

@@ -181,8 +181,9 @@
type="button"
@click="$refs.mediaInput.click()"
class="btn-secondary"
:disabled="isUploading"
>
Sélectionner des fichiers
{{ isUploading ? 'Upload en cours...' : 'Sélectionner des fichiers' }}
</button>
</div>
@@ -248,8 +249,9 @@
type="button"
@click="$refs.mediaInput.click()"
class="btn-secondary text-sm"
:disabled="isUploading"
>
Ajouter plus de fichiers
{{ isUploading ? 'Upload en cours...' : 'Ajouter plus de fichiers' }}
</button>
</div>
</div>
@@ -305,8 +307,11 @@
:disabled="creating || newAlbum.media.length === 0 || isUploading"
class="flex-1 btn-primary"
>
<span v-if="isUploading">
<Upload class="w-4 h-4 mr-2 animate-spin" />
<span v-if="isUploading" class="flex items-center justify-center">
<svg class="animate-spin -ml-1 mr-3 h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.291z"></path>
</svg>
Upload en cours...
</span>
<span v-else-if="creating">
@@ -435,7 +440,7 @@ async function fetchUsers() {
async function fetchUploadLimits() {
try {
const response = await axios.get('/api/settings/upload-limits')
const response = await axios.get('/api/settings/public/upload-limits')
uploadLimits.value = response.data
} catch (error) {
console.error('Error fetching upload limits:', error)

View File

@@ -245,7 +245,7 @@ const stats = ref({})
const user = computed(() => authStore.user)
const nextEvent = computed(() => upcomingEvents.value[0])
const recentPosts = computed(() => stats.value.recent_posts || 0)
const activeMembers = computed(() => stats.value.active_members || 0)
const activeMembers = computed(() => stats.value.total_users || 0)
function formatDate(date) {
return format(new Date(date), 'EEEE d MMMM à HH:mm', { locale: fr })

View File

@@ -17,8 +17,8 @@
<div class="text-sm text-gray-600">En cours</div>
</div>
<div class="bg-white rounded-lg shadow p-4 text-center">
<div class="text-2xl font-bold text-green-600">{{ ticketStats.resolved }}</div>
<div class="text-sm text-gray-600">Résolus</div>
<div class="text-2xl font-bold text-green-600">{{ ticketStats.closed }}</div>
<div class="text-sm text-gray-600">Fermés</div>
</div>
<div class="bg-white rounded-lg shadow p-4 text-center">
<div class="text-2xl font-bold text-gray-600">{{ ticketStats.total }}</div>
@@ -70,12 +70,6 @@
<p class="text-gray-600">
{{ selectedStatus ? `Aucun ticket avec le statut "${getStatusLabel(selectedStatus)}"` : 'Vous n\'avez pas encore créé de ticket' }}
</p>
<button
@click="showTicketModal = true"
class="mt-4 btn-primary"
>
Créer mon premier ticket
</button>
</div>
<!-- Tickets List -->
@@ -356,7 +350,7 @@ const ticketStats = computed(() => {
const stats = {
open: tickets.value.filter(t => t.status === 'open').length,
in_progress: tickets.value.filter(t => t.status === 'in_progress').length,
resolved: tickets.value.filter(t => t.status === 'resolved').length,
closed: tickets.value.filter(t => t.status === 'closed').length,
total: tickets.value.length
}
return stats
@@ -378,7 +372,6 @@ function getStatusLabel(status) {
const labels = {
'open': 'Ouvert',
'in_progress': 'En cours',
'resolved': 'Résolu',
'closed': 'Fermé'
}
return labels[status] || status
@@ -409,7 +402,7 @@ function getStatusBadgeClass(status) {
const classes = {
'open': 'bg-blue-100 text-blue-800',
'in_progress': 'bg-yellow-100 text-yellow-800',
'resolved': 'bg-green-100 text-green-800',
'closed': 'bg-gray-100 text-gray-800'
}
return classes[status] || 'bg-gray-100 text-gray-800'

View File

@@ -116,7 +116,16 @@
class="fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center p-4"
>
<div class="bg-white rounded-xl max-w-2xl w-full p-6 max-h-[90vh] overflow-y-auto">
<h2 class="text-xl font-semibold mb-4">Créer un nouveau vlog</h2>
<div class="flex items-center justify-between mb-4">
<h2 class="text-xl font-semibold">Créer un nouveau vlog</h2>
<div v-if="creating" class="flex items-center space-x-2 text-primary-600">
<svg class="animate-spin h-5 w-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
<span class="text-sm font-medium">Upload en cours...</span>
</div>
</div>
<form @submit.prevent="createVlog" class="space-y-4">
<div>
@@ -160,8 +169,9 @@
type="button"
@click="$refs.videoInput.click()"
class="btn-secondary"
:disabled="creating"
>
Sélectionner une vidéo
{{ creating ? 'Upload en cours...' : 'Sélectionner une vidéo' }}
</button>
</div>
@@ -200,8 +210,9 @@
type="button"
@click="$refs.thumbnailInput.click()"
class="btn-secondary"
:disabled="creating"
>
Sélectionner une image
{{ creating ? 'Upload en cours...' : 'Sélectionner une image' }}
</button>
</div>
@@ -234,7 +245,14 @@
:disabled="creating || !newVlog.video"
class="flex-1 btn-primary"
>
{{ creating ? 'Création...' : 'Créer le vlog' }}
<span v-if="creating" class="flex items-center justify-center">
<svg class="animate-spin -ml-1 mr-3 h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
<circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle>
<path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path>
</svg>
Upload en cours...
</span>
<span v-else>Créer le vlog</span>
</button>
</div>
</form>
@@ -374,7 +392,7 @@ async function fetchUsers() {
async function fetchUploadLimits() {
try {
const response = await axios.get('/api/settings/upload-limits')
const response = await axios.get('/api/settings/public/upload-limits')
uploadLimits.value = response.data
} catch (error) {
console.error('Error fetching upload limits:', error)