Résultats
@@ -292,5 +293,6 @@ export default function Results({ activeAccount, sortedGrades, selectedPeriod, s
+
)
}
\ No newline at end of file
diff --git a/src/components/generic/Window.jsx b/src/components/generic/Window.jsx
index 959a181..4d8405d 100644
--- a/src/components/generic/Window.jsx
+++ b/src/components/generic/Window.jsx
@@ -773,22 +773,18 @@ export function WindowsContainer({ children, name = "", className = "", id = "",
function cleanup() {
for (let header of headers) {
- header.removeEventListener("mousedown", handleMouseDown);
- header.removeEventListener("touchstart", handleMouseDown);
+ header.removeEventListener("pointerdown", handleMouseDown);
for (let child of header.children) {
- child.removeEventListener("mousedown", stopEventPropagation);
- child.removeEventListener("touchstart", stopEventPropagation);
+ child.removeEventListener("pointerdown", stopEventPropagation);
}
}
}
for (let header of headers) {
if (allowWindowsManagement) {
- header.addEventListener("mousedown", handleMouseDown);
- header.addEventListener("touchstart", handleMouseDown);
+ header.addEventListener("pointerdown", handleMouseDown);
for (let child of header.children) {
- child.addEventListener("mousedown", stopEventPropagation);
- child.addEventListener("touchstart", stopEventPropagation);
+ child.addEventListener("pointerdown", stopEventPropagation);
}
}
}
@@ -798,7 +794,6 @@ export function WindowsContainer({ children, name = "", className = "", id = "",
};
}, [isTabletLayout, allowWindowsManagement]);
-
useEffect(() => {
// load and apply old windowArrangement
if (name) {
From ec03262430b37aa9d773e39703d355a885e341cc Mon Sep 17 00:00:00 2001
From: Fefedu973 <80718477+Fefedu973@users.noreply.github.com>
Date: Mon, 11 Nov 2024 14:41:42 +0100
Subject: [PATCH 3/4] better mobile layout
---
src/components/app/Messaging/MessageReader.css | 11 +++++++++++
src/components/app/Messaging/MessageReader.jsx | 2 +-
src/components/app/Messaging/Messaging.jsx | 2 +-
src/components/generic/PopUps/Tooltip.jsx | 16 +++++++++++++---
4 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/src/components/app/Messaging/MessageReader.css b/src/components/app/Messaging/MessageReader.css
index a8657e3..e596f37 100644
--- a/src/components/app/Messaging/MessageReader.css
+++ b/src/components/app/Messaging/MessageReader.css
@@ -112,6 +112,17 @@
}
}
+@media (max-width: 600px) {
+ #message-reader .email-footer {
+ height: 200px;
+ flex-direction: column;
+ }
+
+ .actions-container {
+ margin: auto;
+ }
+}
+
#message-reader .attachments-container {
list-style-type: none;
height: 100%;
diff --git a/src/components/app/Messaging/MessageReader.jsx b/src/components/app/Messaging/MessageReader.jsx
index f03cce0..b3eedf6 100644
--- a/src/components/app/Messaging/MessageReader.jsx
+++ b/src/components/app/Messaging/MessageReader.jsx
@@ -138,7 +138,7 @@ export default function MessageReader({ selectedMessage, fetchMessageMarkAsUnrea
}
}>
Imprimer
{parsedHashFolder != -2 && parsedHashFolder != -1 && parsedHashFolder != -4 ? (
-
+
Changer De Dossier
diff --git a/src/components/app/Messaging/Messaging.jsx b/src/components/app/Messaging/Messaging.jsx
index 427ebdc..2a6ac2f 100644
--- a/src/components/app/Messaging/Messaging.jsx
+++ b/src/components/app/Messaging/Messaging.jsx
@@ -242,7 +242,7 @@ export default function Messaging({ isLoggedIn, activeAccount, fetchMessages, fe
{folders !== undefined && folders.length > 1
- ? event.stopPropagation()}>
+ ? event.stopPropagation()}>
Dossiers
diff --git a/src/components/generic/PopUps/Tooltip.jsx b/src/components/generic/PopUps/Tooltip.jsx
index 0a650c1..30a48b4 100644
--- a/src/components/generic/PopUps/Tooltip.jsx
+++ b/src/components/generic/PopUps/Tooltip.jsx
@@ -126,6 +126,7 @@ function useTooltip(options) {
isOpen,
setIsOpen,
arrowRef,
+ options,
...interactions,
...transition,
...data
@@ -146,7 +147,7 @@ function useTooltipContext() {
};
export function Tooltip({ children, className = "", id = "", ...options }) {
- const tooltip = useTooltip(options)
+ const tooltip = useTooltip(options);
return (
@@ -154,7 +155,7 @@ export function Tooltip({ children, className = "", id = "", ...options }) {
{children}
- )
+ );
}
export const TooltipTrigger = forwardRef(function TooltipTrigger({ children, ...props }, propRef) {
@@ -198,6 +199,13 @@ export const TooltipContent = forwardRef(function TooltipContent({ children, sty
// Affiche / N'affiche pas la tooltip
if (!context.isMounted) return null;
+ // Gestion du clic à l'intérieur pour fermer la tooltip
+ const handleClickInside = () => {
+ if (context.options.closeOnClickInside) {
+ context.setIsOpen(false);
+ }
+ };
+
return (
{children}
- )
+ );
});
+
From 307cde9cd1f722dfdeaf44f95dca47fcecf4c621 Mon Sep 17 00:00:00 2001
From: Fefedu973 <80718477+Fefedu973@users.noreply.github.com>
Date: Mon, 11 Nov 2024 14:47:32 +0100
Subject: [PATCH 4/4] only for mobile close tooltip
---
src/components/generic/PopUps/Tooltip.jsx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/components/generic/PopUps/Tooltip.jsx b/src/components/generic/PopUps/Tooltip.jsx
index 30a48b4..ec271e8 100644
--- a/src/components/generic/PopUps/Tooltip.jsx
+++ b/src/components/generic/PopUps/Tooltip.jsx
@@ -19,6 +19,7 @@ import {
useMergeRefs,
FloatingPortal
} from "@floating-ui/react";
+import { AppContext } from "../../../App";
// Check out the FloatingUI docs for more information : https://floating-ui.com/docs/react
import './Tooltip.css'
@@ -194,6 +195,7 @@ export const TooltipTrigger = forwardRef(function TooltipTrigger({ children, ...
export const TooltipContent = forwardRef(function TooltipContent({ children, style, className = "", ...props }, propRef) {
const context = useTooltipContext();
+ const { isTabletLayout } = useContext(AppContext);
const ref = useMergeRefs([context.refs.setFloating, children.ref, propRef]);
// Affiche / N'affiche pas la tooltip
@@ -201,7 +203,7 @@ export const TooltipContent = forwardRef(function TooltipContent({ children, sty
// Gestion du clic à l'intérieur pour fermer la tooltip
const handleClickInside = () => {
- if (context.options.closeOnClickInside) {
+ if (context.options.closeOnClickInside && isTabletLayout) {
context.setIsOpen(false);
}
};