Remove unused components and models for improved maintainability
- Deleted redundant components (`AddActionButton`, `AlertBox`, `AlertStack`, `BackButton`, `CancelButton`, and `CollapsableArea`) and related files. - Removed unused models (`Book`, `BookSerie`, `BookTables`, `Character`, and `Chapter`) to reduce codebase clutter. - Updated project structure and references to reflect these removals.
This commit is contained in:
@@ -1,25 +1,28 @@
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-fontawesome';
|
||||
import {faExternalLinkAlt, faFileContract} from '@fortawesome/free-solid-svg-icons';
|
||||
// Removed Next.js router and Link imports for Electron
|
||||
import React from 'react';
|
||||
import {ExternalLink, FileText} from 'lucide-react';
|
||||
import Button from '@/components/ui/Button';
|
||||
import {AppRouterInstance, Link, useRouter} from '@/lib/navigation';
|
||||
|
||||
interface TermsOfUseProps {
|
||||
onAccept: () => void;
|
||||
}
|
||||
|
||||
export default function TermsOfUse({onAccept}: TermsOfUseProps) {
|
||||
const router: AppRouterInstance = useRouter();
|
||||
|
||||
function handleAcceptTerm(): void {
|
||||
onAccept();
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className="fixed inset-0 z-50 bg-black/90 backdrop-blur-sm flex items-center justify-center p-6 font-['Lora']">
|
||||
className="fixed inset-0 z-50 bg-darkest-background/90 backdrop-blur-sm flex items-center justify-center p-6 font-['Lora']">
|
||||
<div
|
||||
className="bg-tertiary border border-primary/40 rounded-2xl shadow-2xl max-w-2xl w-full max-h-[90vh] overflow-hidden">
|
||||
<div className="px-8 py-6 border-b border-secondary/40 bg-gradient-to-r from-primary/10 to-primary/5">
|
||||
className="bg-tertiary border border-primary/40 rounded-2xl max-w-2xl w-full max-h-[90vh] overflow-hidden">
|
||||
<div className="px-8 py-6 border-b border-secondary bg-gradient-to-r from-primary/10 to-primary/5">
|
||||
<div className="flex items-center space-x-4">
|
||||
<div className="bg-primary/20 p-3 rounded-xl">
|
||||
<FontAwesomeIcon icon={faFileContract} className="text-primary text-2xl"/>
|
||||
<FileText className="text-primary w-6 h-6" strokeWidth={1.75}/>
|
||||
</div>
|
||||
<div>
|
||||
<h2 className="text-text-primary font-bold text-2xl">Termes d'utilisation</h2>
|
||||
@@ -52,7 +55,7 @@ export default function TermsOfUse({onAccept}: TermsOfUseProps) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="bg-secondary/20 border border-secondary/30 rounded-xl p-6">
|
||||
<div className="bg-tertiary border border-secondary rounded-xl p-6">
|
||||
<h3 className="text-text-primary font-semibold text-lg mb-4">
|
||||
Documentation complète
|
||||
</h3>
|
||||
@@ -67,14 +70,14 @@ export default function TermsOfUse({onAccept}: TermsOfUseProps) {
|
||||
className="inline-flex items-center space-x-2 text-primary hover:text-primary-light transition-colors duration-200 font-medium"
|
||||
>
|
||||
<span>Consulter les termes complets</span>
|
||||
<FontAwesomeIcon icon={faExternalLinkAlt} className="text-sm"/>
|
||||
<ExternalLink className="w-4 h-4" strokeWidth={1.75}/>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div className="bg-warning/10 border border-warning/30 rounded-xl p-6">
|
||||
<div className="flex items-start space-x-3">
|
||||
<div className="bg-warning/20 p-2 rounded-lg mt-1">
|
||||
<FontAwesomeIcon icon={faFileContract} className="text-warning text-lg"/>
|
||||
<FileText className="text-warning w-5 h-5" strokeWidth={1.75}/>
|
||||
</div>
|
||||
<div>
|
||||
<h4 className="text-text-primary font-semibold text-base mb-2">
|
||||
@@ -90,28 +93,23 @@ export default function TermsOfUse({onAccept}: TermsOfUseProps) {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="px-8 py-6 bg-secondary/10 border-t border-secondary/30 rounded-b-2xl">
|
||||
<div className="px-8 py-6 bg-secondary border-t border-secondary rounded-b-2xl">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center space-x-2 text-text-secondary text-sm">
|
||||
<FontAwesomeIcon icon={faFileContract} className="text-primary"/>
|
||||
<FileText className="text-primary w-4 h-4" strokeWidth={1.75}/>
|
||||
<span>Décision requise pour continuer</span>
|
||||
</div>
|
||||
<div className="flex items-center space-x-4">
|
||||
<a
|
||||
<Link
|
||||
href="https://eritors.com"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="text-muted hover:text-text-primary px-6 py-3 rounded-xl hover:bg-secondary/30 transition-all duration-200 text-sm font-medium hover:scale-105"
|
||||
>
|
||||
Refuser et quitter
|
||||
</a>
|
||||
<button
|
||||
onClick={handleAcceptTerm}
|
||||
className="bg-primary hover:bg-primary-dark text-text-primary px-8 py-3 rounded-xl transition-all duration-200 text-sm font-bold shadow-lg hover:shadow-xl transform hover:scale-105"
|
||||
className="text-muted hover:text-text-primary px-6 py-3 rounded-xl hover:bg-secondary transition-colors duration-150 text-sm font-medium"
|
||||
type="button"
|
||||
>
|
||||
Refuser et quitter
|
||||
</Link>
|
||||
<Button variant="primary" size="lg" onClick={handleAcceptTerm}>
|
||||
J'accepte les termes
|
||||
</button>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user