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">
|
<footer className="py-4 mt-auto">
|
||||||
<div className="container text-center">
|
<div className="container text-center">
|
||||||
<div className="mb-2">
|
<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>
|
||||||
<div className="d-flex justify-content-center align-items-center">
|
<div className="d-flex justify-content-center align-items-center">
|
||||||
<a
|
<a
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||||
import FileCopyIcon from '@mui/icons-material/FileCopy';
|
import FileCopyIcon from '@mui/icons-material/FileCopy';
|
||||||
|
import { Button } from '@mui/material';
|
||||||
|
|
||||||
const GiftCheatSheet: React.FC = () => {
|
const GiftCheatSheet: React.FC = () => {
|
||||||
const [copySuccess, setCopySuccess] = useState(false);
|
const [copySuccess, setCopySuccess] = useState(false);
|
||||||
|
|
@ -58,13 +59,9 @@ const GiftCheatSheet: React.FC = () => {
|
||||||
{QuestionVraiFaux}
|
{QuestionVraiFaux}
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
<button
|
<Button variant="contained" onClick={() => copyToClipboard(QuestionVraiFaux)} className="mb-4" startIcon={<FileCopyIcon />} >
|
||||||
className="btn btn-outline-primary btn-sm"
|
|
||||||
onClick={() => copyToClipboard(QuestionVraiFaux)}
|
|
||||||
>
|
|
||||||
<FileCopyIcon style={{ fontSize: 18, marginRight: '5px' }} />
|
|
||||||
Copier
|
Copier
|
||||||
</button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -76,13 +73,9 @@ const GiftCheatSheet: React.FC = () => {
|
||||||
{QuestionChoixMul}
|
{QuestionChoixMul}
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
<button
|
<Button variant="contained" onClick={() => copyToClipboard(QuestionChoixMul)} className="mb-4" startIcon={<FileCopyIcon />} >
|
||||||
className="btn btn-outline-primary btn-sm"
|
|
||||||
onClick={() => copyToClipboard(QuestionChoixMul)}
|
|
||||||
>
|
|
||||||
<FileCopyIcon style={{ fontSize: 18, marginRight: '5px' }} />
|
|
||||||
Copier
|
Copier
|
||||||
</button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -94,13 +87,9 @@ const GiftCheatSheet: React.FC = () => {
|
||||||
{QuestionChoixMulMany}
|
{QuestionChoixMulMany}
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
<button
|
<Button variant="contained" onClick={() => copyToClipboard(QuestionChoixMulMany)} className="mb-4" startIcon={<FileCopyIcon />} >
|
||||||
className="btn btn-outline-primary btn-sm"
|
|
||||||
onClick={() => copyToClipboard(QuestionChoixMulMany)}
|
|
||||||
>
|
|
||||||
<FileCopyIcon style={{ fontSize: 18, marginRight: '5px' }} />
|
|
||||||
Copier
|
Copier
|
||||||
</button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -112,13 +101,9 @@ const GiftCheatSheet: React.FC = () => {
|
||||||
{QuestionCourte}
|
{QuestionCourte}
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
<button
|
<Button variant="contained" onClick={() => copyToClipboard(QuestionCourte)} className="mb-4" startIcon={<FileCopyIcon />} >
|
||||||
className="btn btn-outline-primary btn-sm"
|
|
||||||
onClick={() => copyToClipboard(QuestionCourte)}
|
|
||||||
>
|
|
||||||
<FileCopyIcon style={{ fontSize: 18, marginRight: '5px' }} />
|
|
||||||
Copier
|
Copier
|
||||||
</button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
@ -130,13 +115,9 @@ const GiftCheatSheet: React.FC = () => {
|
||||||
{QuestionNum}
|
{QuestionNum}
|
||||||
</code>
|
</code>
|
||||||
</pre>
|
</pre>
|
||||||
<button
|
<Button variant="contained" onClick={() => copyToClipboard(QuestionNum)} className="mb-4" startIcon={<FileCopyIcon />} >
|
||||||
className="btn btn-outline-primary btn-sm"
|
|
||||||
onClick={() => copyToClipboard(QuestionNum)}
|
|
||||||
>
|
|
||||||
<FileCopyIcon style={{ fontSize: 18, marginRight: '5px' }} />
|
|
||||||
Copier
|
Copier
|
||||||
</button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import * as React from 'react';
|
||||||
import { Button } from '@mui/material';
|
import { Button } from '@mui/material';
|
||||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||||
import ExitToAppIcon from '@mui/icons-material/ExitToApp';
|
import ExitToAppIcon from '@mui/icons-material/ExitToApp';
|
||||||
|
import LoginIcon from '@mui/icons-material/Login';
|
||||||
|
|
||||||
interface HeaderProps {
|
interface HeaderProps {
|
||||||
isLoggedIn: boolean;
|
isLoggedIn: boolean;
|
||||||
|
|
@ -13,7 +14,7 @@ const Header: React.FC<HeaderProps> = ({ isLoggedIn, handleLogout }) => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
return (
|
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
|
<img
|
||||||
src="/logo.png"
|
src="/logo.png"
|
||||||
alt="Logo"
|
alt="Logo"
|
||||||
|
|
@ -25,22 +26,21 @@ const Header: React.FC<HeaderProps> = ({ isLoggedIn, handleLogout }) => {
|
||||||
{isLoggedIn ? (
|
{isLoggedIn ? (
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
color="primary"
|
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
handleLogout();
|
handleLogout();
|
||||||
navigate('/');
|
navigate('/');
|
||||||
}}
|
}}
|
||||||
className="ms-2"
|
className="mb-4"
|
||||||
startIcon={<ExitToAppIcon />}
|
startIcon={<ExitToAppIcon />}
|
||||||
>
|
>
|
||||||
Logout
|
Déconnexion
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<Link to="/login" className="text-decoration-none">
|
<Link to="/login" className="text-decoration-none">
|
||||||
<button className="btn btn-outline-primary ms-2">
|
<Button variant="contained" className="mb-4" startIcon={<LoginIcon />} >
|
||||||
Connexion
|
Connexion
|
||||||
</button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import { TextField, Button, CircularProgress } from '@mui/material';
|
||||||
import LoginContainer from '../../../../components/LoginContainer/LoginContainer';
|
import LoginContainer from '../../../../components/LoginContainer/LoginContainer';
|
||||||
import ApiService from '../../../../services/ApiService';
|
import ApiService from '../../../../services/ApiService';
|
||||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||||
|
import LoginIcon from '@mui/icons-material/Login';
|
||||||
|
|
||||||
const SimpleLogin: React.FC = () => {
|
const SimpleLogin: React.FC = () => {
|
||||||
const [email, setEmail] = useState('');
|
const [email, setEmail] = useState('');
|
||||||
|
|
@ -32,7 +33,7 @@ const SimpleLogin: React.FC = () => {
|
||||||
<LoginContainer title='' error={connectionError}>
|
<LoginContainer title='' error={connectionError}>
|
||||||
{/* Email Input */}
|
{/* Email Input */}
|
||||||
<TextField
|
<TextField
|
||||||
label="Email"
|
label="Courriel"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
className="mb-3 w-100" // Bootstrap classes for spacing and width
|
className="mb-3 w-100" // Bootstrap classes for spacing and width
|
||||||
value={email}
|
value={email}
|
||||||
|
|
@ -61,8 +62,9 @@ const SimpleLogin: React.FC = () => {
|
||||||
disabled={!email || !password || isConnecting}
|
disabled={!email || !password || isConnecting}
|
||||||
startIcon={isConnecting ? <CircularProgress size={20} /> : null}
|
startIcon={isConnecting ? <CircularProgress size={20} /> : null}
|
||||||
size="large"
|
size="large"
|
||||||
|
startIcon={<LoginIcon />}
|
||||||
>
|
>
|
||||||
Login
|
Se connecter
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
{/* Links Section */}
|
{/* Links Section */}
|
||||||
|
|
|
||||||
|
|
@ -588,7 +588,7 @@ const Dashboard: React.FC = () => {
|
||||||
<div className="folder-tab">{folderName}</div>
|
<div className="folder-tab">{folderName}</div>
|
||||||
<CardContent className="p-3">
|
<CardContent className="p-3">
|
||||||
{quizzesByFolder[folderName].map((quiz: QuizType) => (
|
{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">
|
<div className="flex-grow-1 me-3 text-truncate">
|
||||||
<Button
|
<Button
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ import ApiService from '../../../services/ApiService';
|
||||||
import { escapeForGIFT } from '../../../utils/giftUtils';
|
import { escapeForGIFT } from '../../../utils/giftUtils';
|
||||||
import { Upload } from '@mui/icons-material';
|
import { Upload } from '@mui/icons-material';
|
||||||
import 'bootstrap/dist/css/bootstrap.min.css';
|
import 'bootstrap/dist/css/bootstrap.min.css';
|
||||||
|
import SaveIcon from '@mui/icons-material/Save';
|
||||||
|
|
||||||
interface EditQuizParams {
|
interface EditQuizParams {
|
||||||
id: string;
|
id: string;
|
||||||
|
|
@ -199,7 +200,7 @@ const QuizForm: React.FC = () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Button variant="contained" onClick={handleQuizSave} className="mb-4">
|
<Button variant="contained" onClick={handleQuizSave} className="mb-4" startIcon={<SaveIcon />} >
|
||||||
Enregistrer
|
Enregistrer
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ describe('Users', () => {
|
||||||
password: 'hashedPassword',
|
password: 'hashedPassword',
|
||||||
created_at: expect.any(Date),
|
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
|
expect(result.insertedId).toBeDefined(); // Ensure result has insertedId
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ class Users {
|
||||||
let created_user = await userCollection.insertOne(newUser);
|
let created_user = await userCollection.insertOne(newUser);
|
||||||
let user = await this.getById(created_user.insertedId)
|
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';
|
const userId = newUser._id ? newUser._id.toString() : 'x';
|
||||||
await this.folders.create(folderTitle, userId);
|
await this.folders.create(folderTitle, userId);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue