- améliore l'export/import (format de fichiers en paramètres, amélioration de la robustesse, )
- ajout bouton tout effacer des propositions et participants
This commit is contained in:
@@ -7,6 +7,7 @@ import { authService } from '@/lib/auth';
|
||||
import CreateCampaignModal from '@/components/CreateCampaignModal';
|
||||
import EditCampaignModal from '@/components/EditCampaignModal';
|
||||
import DeleteCampaignModal from '@/components/DeleteCampaignModal';
|
||||
import ShareModal from '@/components/ShareModal';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card';
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
@@ -14,7 +15,7 @@ import { Badge } from '@/components/ui/badge';
|
||||
|
||||
import AuthGuard from '@/components/AuthGuard';
|
||||
import Footer from '@/components/Footer';
|
||||
import { FolderOpen, Users, FileText, Plus, BarChart3, Settings, Check, Copy, Mail } from 'lucide-react';
|
||||
import { FolderOpen, Users, FileText, Plus, BarChart3, Settings, Check, Copy, Mail, Share2 } from 'lucide-react';
|
||||
import StatusSwitch from '@/components/StatusSwitch';
|
||||
import { MarkdownContent } from '@/components/MarkdownContent';
|
||||
|
||||
@@ -27,6 +28,7 @@ function AdminPageContent() {
|
||||
const [showCreateModal, setShowCreateModal] = useState(false);
|
||||
const [showEditModal, setShowEditModal] = useState(false);
|
||||
const [showDeleteModal, setShowDeleteModal] = useState(false);
|
||||
const [showShareModal, setShowShareModal] = useState(false);
|
||||
const [selectedCampaign, setSelectedCampaign] = useState<Campaign | null>(null);
|
||||
|
||||
const [copiedCampaignId, setCopiedCampaignId] = useState<string | null>(null);
|
||||
@@ -433,6 +435,18 @@ function AdminPageContent() {
|
||||
<Copy className="w-3 h-3" />
|
||||
)}
|
||||
</Button>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
className="h-7 w-7 p-0 text-slate-400 hover:text-slate-600"
|
||||
onClick={() => {
|
||||
setSelectedCampaign(campaign);
|
||||
setShowShareModal(true);
|
||||
}}
|
||||
title="Partager le lien"
|
||||
>
|
||||
<Share2 className="w-3 h-3" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -474,6 +488,14 @@ function AdminPageContent() {
|
||||
{selectedCampaign && (
|
||||
<DeleteCampaignModal isOpen={showDeleteModal} onClose={() => setShowDeleteModal(false)} onSuccess={handleCampaignDeleted} campaign={selectedCampaign} />
|
||||
)}
|
||||
{selectedCampaign && (
|
||||
<ShareModal
|
||||
isOpen={showShareModal}
|
||||
onClose={() => setShowShareModal(false)}
|
||||
campaignTitle={selectedCampaign.title}
|
||||
depositUrl={`${window.location.origin}/p/${selectedCampaign.slug || 'campagne'}`}
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* Footer */}
|
||||
<Footer />
|
||||
|
||||
Reference in New Issue
Block a user