Compare commits

..

1 Commits

Author SHA1 Message Date
57ee6f55e6 Update dependency @testing-library/jest-dom to v6.5.0
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2024-08-28 00:30:16 +00:00
11 changed files with 879 additions and 1390 deletions

File diff suppressed because it is too large Load Diff

View File

@ -5,45 +5,45 @@
"type": "module", "type": "module",
"dependencies": { "dependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@emotion/react": "^11.13.3", "@emotion/react": "^11.11.4",
"@emotion/styled": "^11.13.0", "@emotion/styled": "^11.11.0",
"@fontsource/roboto": "^5.0.15", "@fontsource/roboto": "^5.0.13",
"@fullcalendar/core": "^6.1.15", "@fullcalendar/core": "^6.1.14",
"@fullcalendar/daygrid": "^6.1.15", "@fullcalendar/daygrid": "^6.1.14",
"@fullcalendar/interaction": "^6.1.15", "@fullcalendar/interaction": "^6.1.14",
"@fullcalendar/list": "^6.1.15", "@fullcalendar/list": "^6.1.14",
"@fullcalendar/react": "^6.1.15", "@fullcalendar/react": "^6.1.14",
"@mdi/js": "^7.2.96", "@mdi/js": "^7.2.96",
"@mdi/react": "^1.6.1", "@mdi/react": "^1.6.1",
"@mui/icons-material": "^6.0.2", "@mui/icons-material": "^5.15.17",
"@mui/lab": "^6.0.0-beta.9", "@mui/lab": "^5.0.0-alpha.140",
"@mui/material": "^6.0.2", "@mui/material": "^5.15.17",
"@mui/x-data-grid": "^7.16.0", "@mui/x-data-grid": "^7.1.1",
"@mui/x-date-pickers": "^7.16.0", "@mui/x-date-pickers": "^7.7.0",
"@mui/x-tree-view": "^7.16.0", "@mui/x-tree-view": "^7.4.0",
"@testing-library/jest-dom": "^6.5.0", "@testing-library/jest-dom": "^6.4.5",
"@testing-library/react": "^16.0.1", "@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.0.0", "@testing-library/user-event": "^14.0.0",
"@types/jest": "^29.0.0", "@types/jest": "^29.0.0",
"@types/react": "^18.3.5", "@types/react": "^18.3.2",
"@types/react-dom": "^18.3.0", "@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.2.1", "@vitejs/plugin-react": "^4.2.1",
"date-and-time": "^3.5.0", "date-and-time": "^3.2.0",
"dayjs": "^1.11.13", "dayjs": "^1.11.11",
"email-validator": "^2.0.4", "email-validator": "^2.0.4",
"filesize": "^10.1.6", "filesize": "^10.1.2",
"jspdf": "^2.5.1", "jspdf": "^2.5.1",
"mui-color-input": "^4.0.0", "mui-color-input": "^2.0.3",
"react": "^18.3.1", "react": "^18.3.1",
"react-dom": "^18.3.1", "react-dom": "^18.3.1",
"react-easy-crop": "^5.0.8", "react-easy-crop": "^5.0.7",
"react-qr-code": "^2.0.14", "react-qr-code": "^2.0.14",
"react-router-dom": "^6.26.2", "react-router-dom": "^6.23.1",
"react-zoom-pan-pinch": "^3.4.4", "react-zoom-pan-pinch": "^3.4.4",
"svg2pdf.js": "^2.2.3", "svg2pdf.js": "^2.2.3",
"typescript": "^5.6.2", "typescript": "^5.4.5",
"vite": "^5.4.3", "vite": "^5.2.11",
"vite-tsconfig-paths": "^5.0.1", "vite-tsconfig-paths": "^4.3.2",
"web-vitals": "^3.5.2" "web-vitals": "^3.5.2"
}, },
"scripts": { "scripts": {

View File

@ -11,7 +11,7 @@ import {
} from "@mui/material"; } from "@mui/material";
import Box from "@mui/material/Box"; import Box from "@mui/material/Box";
import Button from "@mui/material/Button"; import Button from "@mui/material/Button";
import Grid from "@mui/material/Grid2"; import Grid from "@mui/material/Grid";
import TextField from "@mui/material/TextField"; import TextField from "@mui/material/TextField";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import * as React from "react"; import * as React from "react";
@ -167,7 +167,7 @@ export function LoginRoute(): React.ReactElement {
</Button> </Button>
<Grid container> <Grid container>
<Grid> <Grid item xs>
<Typography variant="body2" color={"primary"}> <Typography variant="body2" color={"primary"}>
<Link <Link
to="/password_forgotten" to="/password_forgotten"
@ -177,7 +177,7 @@ export function LoginRoute(): React.ReactElement {
</Link> </Link>
</Typography> </Typography>
</Grid> </Grid>
<Grid> <Grid item>
<Typography variant="body2" color={"primary"}> <Typography variant="body2" color={"primary"}>
<Link <Link
to="/new-account" to="/new-account"

View File

@ -3,8 +3,7 @@ import DeleteIcon from "@mui/icons-material/Delete";
import EditIcon from "@mui/icons-material/Edit"; import EditIcon from "@mui/icons-material/Edit";
import FileDownloadIcon from "@mui/icons-material/FileDownload"; import FileDownloadIcon from "@mui/icons-material/FileDownload";
import SaveIcon from "@mui/icons-material/Save"; import SaveIcon from "@mui/icons-material/Save";
import { Button, Stack } from "@mui/material"; import { Button, Grid, Stack } from "@mui/material";
import Grid from "@mui/material/Grid2";
import React from "react"; import React from "react";
import { useNavigate, useParams } from "react-router-dom"; import { useNavigate, useParams } from "react-router-dom";
import { ServerApi } from "../../../api/ServerApi"; import { ServerApi } from "../../../api/ServerApi";
@ -353,7 +352,7 @@ export function CouplePage(p: {
<Grid container spacing={2}> <Grid container spacing={2}>
{/* General info */} {/* General info */}
<Grid size={{ sm: 12, md: 6 }}> <Grid item sm={12} md={6}>
<PropertiesBox title="Informations générales"> <PropertiesBox title="Informations générales">
{/* Husband */} {/* Husband */}
<br /> <br />
@ -428,7 +427,7 @@ export function CouplePage(p: {
{ {
/* Photo */ !family.family.disable_couple_photos && ( /* Photo */ !family.family.disable_couple_photos && (
<Grid size={{ sm: 12, md: 6 }}> <Grid item sm={12} md={6}>
<PropertiesBox title="Photo"> <PropertiesBox title="Photo">
<div style={{ textAlign: "center" }}> <div style={{ textAlign: "center" }}>
<CouplePhoto couple={couple} width={150} /> <CouplePhoto couple={couple} width={150} />
@ -475,7 +474,7 @@ export function CouplePage(p: {
{/* Children */} {/* Children */}
{p.children && ( {p.children && (
<Grid size={{ sm: 12, md: 6 }}> <Grid item sm={12} md={6}>
<PropertiesBox title="Enfants"> <PropertiesBox title="Enfants">
{p.children.length === 0 ? ( {p.children.length === 0 ? (
<>Aucun enfant</> <>Aucun enfant</>

View File

@ -7,12 +7,12 @@ import FileDownloadIcon from "@mui/icons-material/FileDownload";
import SaveIcon from "@mui/icons-material/Save"; import SaveIcon from "@mui/icons-material/Save";
import { import {
Button, Button,
Grid,
ListItemAvatar, ListItemAvatar,
ListItemButton, ListItemButton,
ListItemText, ListItemText,
Stack, Stack,
} from "@mui/material"; } from "@mui/material";
import Grid from "@mui/material/Grid2";
import * as EmailValidator from "email-validator"; import * as EmailValidator from "email-validator";
import React from "react"; import React from "react";
import { useNavigate, useParams } from "react-router-dom"; import { useNavigate, useParams } from "react-router-dom";
@ -384,7 +384,7 @@ export function MemberPage(p: {
<Grid container spacing={2}> <Grid container spacing={2}>
{/* General info */} {/* General info */}
<Grid size={{ sm: 12, md: 6 }}> <Grid item sm={12} md={6}>
<PropertiesBox title="Informations générales"> <PropertiesBox title="Informations générales">
{/* Sex */} {/* Sex */}
<SexSelection <SexSelection
@ -504,7 +504,7 @@ export function MemberPage(p: {
</Grid> </Grid>
{/* Photo */} {/* Photo */}
<Grid size={{ sm: 12, md: 6 }}> <Grid item sm={12} md={6}>
<PropertiesBox title="Photo"> <PropertiesBox title="Photo">
<div style={{ textAlign: "center" }}> <div style={{ textAlign: "center" }}>
<MemberPhoto member={member} width={150} /> <MemberPhoto member={member} width={150} />
@ -549,7 +549,7 @@ export function MemberPage(p: {
{/* Contact */} {/* Contact */}
{(p.editing || member.hasContactInfo) && ( {(p.editing || member.hasContactInfo) && (
<Grid size={{ sm: 12, md: 6 }}> <Grid item sm={12} md={6}>
<PropertiesBox title="Contact"> <PropertiesBox title="Contact">
{/* Email */} {/* Email */}
<PropEdit <PropEdit
@ -630,7 +630,7 @@ export function MemberPage(p: {
{/* Bio */} {/* Bio */}
{(p.editing || member.hasNote) && ( {(p.editing || member.hasNote) && (
<Grid size={{ sm: 12, md: 6 }}> <Grid item sm={12} md={6}>
<PropertiesBox title="Biographie"> <PropertiesBox title="Biographie">
<PropEdit <PropEdit
label="Biographie" label="Biographie"
@ -651,7 +651,7 @@ export function MemberPage(p: {
{/* Couples */} {/* Couples */}
{p.couples && ( {p.couples && (
<Grid size={{ sm: 12, md: 6 }}> <Grid item sm={12} md={6}>
<PropertiesBox title={member.sex === "F" ? "Époux" : "Épouse"}> <PropertiesBox title={member.sex === "F" ? "Époux" : "Épouse"}>
{p.couples!.length === 0 ? ( {p.couples!.length === 0 ? (
<>{member.sex === "F" ? "Aucun époux" : "Aucune épouse"}</> <>{member.sex === "F" ? "Aucun époux" : "Aucune épouse"}</>
@ -678,7 +678,7 @@ export function MemberPage(p: {
{/* Children */} {/* Children */}
{p.children && ( {p.children && (
<Grid size={{ sm: 12, md: 6 }}> <Grid item sm={12} md={6}>
<PropertiesBox title="Enfants"> <PropertiesBox title="Enfants">
{p.children.length === 0 ? ( {p.children.length === 0 ? (
<>Aucun enfant</> <>Aucun enfant</>
@ -707,7 +707,7 @@ export function MemberPage(p: {
{/* Siblings */} {/* Siblings */}
{p.siblings && ( {p.siblings && (
<Grid size={{ sm: 12, md: 6 }}> <Grid item sm={12} md={6}>
<PropertiesBox title="Frères et sœurs"> <PropertiesBox title="Frères et sœurs">
{p.siblings.length === 0 ? ( {p.siblings.length === 0 ? (
<>Aucun frère ou sœur</> <>Aucun frère ou sœur</>

View File

@ -3,7 +3,7 @@ import Icon from "@mdi/react";
import Avatar from "@mui/material/Avatar"; import Avatar from "@mui/material/Avatar";
import Box from "@mui/material/Box"; import Box from "@mui/material/Box";
import CssBaseline from "@mui/material/CssBaseline"; import CssBaseline from "@mui/material/CssBaseline";
import Grid from "@mui/material/Grid2"; import Grid from "@mui/material/Grid";
import Paper from "@mui/material/Paper"; import Paper from "@mui/material/Paper";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import * as React from "react"; import * as React from "react";
@ -40,7 +40,10 @@ export function BaseLoginPage() {
<Grid container component="main" sx={{ height: "100vh" }}> <Grid container component="main" sx={{ height: "100vh" }}>
<CssBaseline /> <CssBaseline />
<Grid <Grid
size={{ xs: false, sm: 4, md: 7 }} item
xs={false}
sm={4}
md={7}
sx={{ sx={{
backgroundImage: "url(/login_splash.jpg)", backgroundImage: "url(/login_splash.jpg)",
backgroundRepeat: "no-repeat", backgroundRepeat: "no-repeat",
@ -52,12 +55,7 @@ export function BaseLoginPage() {
backgroundPosition: "center", backgroundPosition: "center",
}} }}
/> />
<Grid <Grid item xs={12} sm={8} md={5} component={Paper} elevation={6} square>
size={{ xs: 12, sm: 8, md: 5 }}
component={Paper}
elevation={6}
square
>
<Box <Box
sx={{ sx={{
my: 8, my: 8,

1340
geneit_backend/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -7,37 +7,37 @@ edition = "2021"
[dependencies] [dependencies]
log = "0.4.21" log = "0.4.21"
env_logger = "0.11.5" env_logger = "0.11.3"
clap = { version = "4.5.17", features = ["derive", "env"] } clap = { version = "4.5.4", features = ["derive", "env"] }
lazy_static = "1.5.0" lazy_static = "1.4.0"
lazy-regex = "3.3.0" lazy-regex = "3.1.0"
anyhow = "1.0.87" anyhow = "1.0.83"
actix-web = "4.9.0" actix-web = "4.5.1"
actix-cors = "0.7.0" actix-cors = "0.7.0"
actix-multipart = "0.7.0" actix-multipart = "0.7.0"
actix-remote-ip = "0.1.0" actix-remote-ip = "0.1.0"
futures-util = "0.3.30" futures-util = "0.3.30"
diesel = { version = "2.2.4", features = ["postgres"] } diesel = { version = "2.1.6", features = ["postgres"] }
diesel_migrations = "2.1.0" diesel_migrations = "2.1.0"
serde = { version = "1.0.210", features = ["derive"] } serde = { version = "1.0.198", features = ["derive"] }
serde_json = "1.0.128" serde_json = "1.0.117"
mailchecker = "6.0.8" mailchecker = "6.0.4"
redis = "0.27.0" redis = "0.25.3"
lettre = "0.11.8" lettre = "0.11.7"
rand = "0.8.5" rand = "0.8.5"
bcrypt = "0.15.1" bcrypt = "0.15.1"
light-openid = "1.0.2" light-openid = "1.0.2"
thiserror = "1.0.60" thiserror = "1.0.60"
serde_with = "3.8.1" serde_with = "3.8.1"
rust_iso3166 = "0.1.12" rust_iso3166 = "0.1.12"
rust-s3 = "0.35.1" rust-s3 = "0.34.0"
sha2 = "0.10.8" sha2 = "0.10.8"
image = "0.25.1" image = "0.25.1"
uuid = { version = "1.8.0", features = ["v4"] } uuid = { version = "1.8.0", features = ["v4"] }
httpdate = "1.0.3" httpdate = "1.0.3"
zip = "2.2.0" zip = "2.0.0"
mime_guess = "2.0.4" mime_guess = "2.0.4"
tempfile = "3.12.0" tempfile = "3.10.1"
base64 = "0.22.0" base64 = "0.22.0"
ical = { version = "0.11.0", features = ["generator", "ical", "vcard"] } ical = { version = "0.11.0", features = ["generator", "ical", "vcard"] }
chrono = "0.4.38" chrono = "0.4.38"

View File

@ -6,4 +6,4 @@ RUN apt-get update \
COPY geneit_backend /usr/local/bin/geneit_backend COPY geneit_backend /usr/local/bin/geneit_backend
ENTRYPOINT ["/usr/local/bin/geneit_backend"] ENTRYPOINT /usr/local/bin/geneit_backend

View File

@ -194,7 +194,6 @@ impl AppConfig {
db: self.redis_db_number, db: self.redis_db_number,
username: self.redis_username.clone(), username: self.redis_username.clone(),
password: Some(self.redis_password.clone()), password: Some(self.redis_password.clone()),
protocol: Default::default(),
}, },
} }
} }
@ -246,7 +245,7 @@ impl AppConfig {
} }
/// Get S3 bucket /// Get S3 bucket
pub fn s3_bucket(&self) -> anyhow::Result<Box<Bucket>> { pub fn s3_bucket(&self) -> anyhow::Result<Bucket> {
Ok(Bucket::new( Ok(Bucket::new(
&self.s3_bucket_name, &self.s3_bucket_name,
Region::Custom { Region::Custom {

View File

@ -45,14 +45,14 @@ where
{ {
let value_str = serde_json::to_string(value)?; let value_str = serde_json::to_string(value)?;
execute_request(|conn| Ok(conn.set_ex::<_, _, ()>(key, value_str, lifetime.as_secs())?))?; execute_request(|conn| Ok(conn.set_ex(key, value_str, lifetime.as_secs())?))?;
Ok(()) Ok(())
} }
/// Remove a value from Redis /// Remove a value from Redis
pub async fn remove_value(key: &str) -> anyhow::Result<()> { pub async fn remove_value(key: &str) -> anyhow::Result<()> {
execute_request(|conn| Ok(conn.del::<_, ()>(key)?))?; execute_request(|conn| Ok(conn.del(key)?))?;
Ok(()) Ok(())
} }