mirror of
https://github.com/ets-cfuhrman-pfe/EvalueTonSavoir.git
synced 2025-08-11 21:23:54 -04:00
Text en français + changement button
This commit is contained in:
parent
4bcae67f0e
commit
1fd40bcdc8
8 changed files with 29 additions and 45 deletions
|
|
@ -8,7 +8,7 @@ const Footer: React.FC<FooterProps> = () => {
|
|||
<footer className="py-4 mt-auto">
|
||||
<div className="container text-center">
|
||||
<div className="mb-2">
|
||||
Réalisé avec ❤ à Montréal par des finissant•e•s de l'ETS
|
||||
Réalisé avec ❤ à Montréal par des finissant•e•s de l'ÉTS
|
||||
</div>
|
||||
<div className="d-flex justify-content-center align-items-center">
|
||||
<a
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
import React, { useState } from 'react';
|
||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||
import FileCopyIcon from '@mui/icons-material/FileCopy';
|
||||
import { Button } from '@mui/material';
|
||||
|
||||
const GiftCheatSheet: React.FC = () => {
|
||||
const [copySuccess, setCopySuccess] = useState(false);
|
||||
|
|
@ -58,13 +59,9 @@ const GiftCheatSheet: React.FC = () => {
|
|||
{QuestionVraiFaux}
|
||||
</code>
|
||||
</pre>
|
||||
<button
|
||||
className="btn btn-outline-primary btn-sm"
|
||||
onClick={() => copyToClipboard(QuestionVraiFaux)}
|
||||
>
|
||||
<FileCopyIcon style={{ fontSize: 18, marginRight: '5px' }} />
|
||||
<Button variant="contained" onClick={() => copyToClipboard(QuestionVraiFaux)} className="mb-4" startIcon={<FileCopyIcon />} >
|
||||
Copier
|
||||
</button>
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
|
||||
|
|
@ -76,13 +73,9 @@ const GiftCheatSheet: React.FC = () => {
|
|||
{QuestionChoixMul}
|
||||
</code>
|
||||
</pre>
|
||||
<button
|
||||
className="btn btn-outline-primary btn-sm"
|
||||
onClick={() => copyToClipboard(QuestionChoixMul)}
|
||||
>
|
||||
<FileCopyIcon style={{ fontSize: 18, marginRight: '5px' }} />
|
||||
<Button variant="contained" onClick={() => copyToClipboard(QuestionChoixMul)} className="mb-4" startIcon={<FileCopyIcon />} >
|
||||
Copier
|
||||
</button>
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
|
||||
|
|
@ -94,13 +87,9 @@ const GiftCheatSheet: React.FC = () => {
|
|||
{QuestionChoixMulMany}
|
||||
</code>
|
||||
</pre>
|
||||
<button
|
||||
className="btn btn-outline-primary btn-sm"
|
||||
onClick={() => copyToClipboard(QuestionChoixMulMany)}
|
||||
>
|
||||
<FileCopyIcon style={{ fontSize: 18, marginRight: '5px' }} />
|
||||
<Button variant="contained" onClick={() => copyToClipboard(QuestionChoixMulMany)} className="mb-4" startIcon={<FileCopyIcon />} >
|
||||
Copier
|
||||
</button>
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
|
||||
|
|
@ -112,13 +101,9 @@ const GiftCheatSheet: React.FC = () => {
|
|||
{QuestionCourte}
|
||||
</code>
|
||||
</pre>
|
||||
<button
|
||||
className="btn btn-outline-primary btn-sm"
|
||||
onClick={() => copyToClipboard(QuestionCourte)}
|
||||
>
|
||||
<FileCopyIcon style={{ fontSize: 18, marginRight: '5px' }} />
|
||||
<Button variant="contained" onClick={() => copyToClipboard(QuestionCourte)} className="mb-4" startIcon={<FileCopyIcon />} >
|
||||
Copier
|
||||
</button>
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
|
||||
|
|
@ -130,13 +115,9 @@ const GiftCheatSheet: React.FC = () => {
|
|||
{QuestionNum}
|
||||
</code>
|
||||
</pre>
|
||||
<button
|
||||
className="btn btn-outline-primary btn-sm"
|
||||
onClick={() => copyToClipboard(QuestionNum)}
|
||||
>
|
||||
<FileCopyIcon style={{ fontSize: 18, marginRight: '5px' }} />
|
||||
<Button variant="contained" onClick={() => copyToClipboard(QuestionNum)} className="mb-4" startIcon={<FileCopyIcon />} >
|
||||
Copier
|
||||
</button>
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import * as React from 'react';
|
|||
import { Button } from '@mui/material';
|
||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||
import ExitToAppIcon from '@mui/icons-material/ExitToApp';
|
||||
import LoginIcon from '@mui/icons-material/Login';
|
||||
|
||||
interface HeaderProps {
|
||||
isLoggedIn: boolean;
|
||||
|
|
@ -13,7 +14,7 @@ const Header: React.FC<HeaderProps> = ({ isLoggedIn, handleLogout }) => {
|
|||
const navigate = useNavigate();
|
||||
|
||||
return (
|
||||
<header className="d-flex justify-content-between align-items-center p-3 bg-white shadow-sm">
|
||||
<header className="d-flex justify-content-between align-items-center p-3">
|
||||
<img
|
||||
src="/logo.png"
|
||||
alt="Logo"
|
||||
|
|
@ -25,21 +26,20 @@ const Header: React.FC<HeaderProps> = ({ isLoggedIn, handleLogout }) => {
|
|||
{isLoggedIn ? (
|
||||
<Button
|
||||
variant="outlined"
|
||||
color="primary"
|
||||
onClick={() => {
|
||||
handleLogout();
|
||||
navigate('/');
|
||||
}}
|
||||
className="ms-2"
|
||||
className="mb-4"
|
||||
startIcon={<ExitToAppIcon />}
|
||||
>
|
||||
Logout
|
||||
Déconnexion
|
||||
</Button>
|
||||
) : (
|
||||
<Link to="/login" className="text-decoration-none">
|
||||
<button className="btn btn-outline-primary ms-2">
|
||||
<Button variant="contained" className="mb-4" startIcon={<LoginIcon />} >
|
||||
Connexion
|
||||
</button>
|
||||
</Button>
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { TextField, Button, CircularProgress } from '@mui/material';
|
|||
import LoginContainer from '../../../../components/LoginContainer/LoginContainer';
|
||||
import ApiService from '../../../../services/ApiService';
|
||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||
import LoginIcon from '@mui/icons-material/Login';
|
||||
|
||||
const SimpleLogin: React.FC = () => {
|
||||
const [email, setEmail] = useState('');
|
||||
|
|
@ -32,7 +33,7 @@ const SimpleLogin: React.FC = () => {
|
|||
<LoginContainer title='' error={connectionError}>
|
||||
{/* Email Input */}
|
||||
<TextField
|
||||
label="Email"
|
||||
label="Courriel"
|
||||
variant="outlined"
|
||||
className="mb-3 w-100" // Bootstrap classes for spacing and width
|
||||
value={email}
|
||||
|
|
@ -61,8 +62,9 @@ const SimpleLogin: React.FC = () => {
|
|||
disabled={!email || !password || isConnecting}
|
||||
startIcon={isConnecting ? <CircularProgress size={20} /> : null}
|
||||
size="large"
|
||||
startIcon={<LoginIcon />}
|
||||
>
|
||||
Login
|
||||
Se connecter
|
||||
</Button>
|
||||
|
||||
{/* Links Section */}
|
||||
|
|
|
|||
|
|
@ -588,7 +588,7 @@ const Dashboard: React.FC = () => {
|
|||
<div className="folder-tab">{folderName}</div>
|
||||
<CardContent className="p-3">
|
||||
{quizzesByFolder[folderName].map((quiz: QuizType) => (
|
||||
<div className="d-flex align-items-center mb-3 p-2 bg-light rounded" key={quiz._id}>
|
||||
<div className="d-flex align-items-center mb-3 p-2 rounded" key={quiz._id}>
|
||||
<div className="flex-grow-1 me-3 text-truncate">
|
||||
<Button
|
||||
variant="outlined"
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import ApiService from '../../../services/ApiService';
|
|||
import { escapeForGIFT } from '../../../utils/giftUtils';
|
||||
import { Upload } from '@mui/icons-material';
|
||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||
import SaveIcon from '@mui/icons-material/Save';
|
||||
|
||||
interface EditQuizParams {
|
||||
id: string;
|
||||
|
|
@ -199,7 +200,7 @@ const QuizForm: React.FC = () => {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<Button variant="contained" onClick={handleQuizSave} className="mb-4">
|
||||
<Button variant="contained" onClick={handleQuizSave} className="mb-4" startIcon={<SaveIcon />} >
|
||||
Enregistrer
|
||||
</Button>
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ describe('Users', () => {
|
|||
password: 'hashedPassword',
|
||||
created_at: expect.any(Date),
|
||||
});
|
||||
expect(users.folders.create).toHaveBeenCalledWith('Dossier par Défaut', expect.any(String));
|
||||
expect(users.folders.create).toHaveBeenCalledWith('Dossier par défaut', expect.any(String));
|
||||
expect(result.insertedId).toBeDefined(); // Ensure result has insertedId
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ class Users {
|
|||
let created_user = await userCollection.insertOne(newUser);
|
||||
let user = await this.getById(created_user.insertedId)
|
||||
|
||||
const folderTitle = "Dossier par Défaut";
|
||||
const folderTitle = "Dossier par défaut";
|
||||
|
||||
const userId = newUser._id ? newUser._id.toString() : 'x';
|
||||
await this.folders.create(folderTitle, userId);
|
||||
|
|
|
|||
Loading…
Reference in a new issue