Skip to content

Commit

Permalink
i swear it's the last one
Browse files Browse the repository at this point in the history
  • Loading branch information
Truiteseche committed Nov 11, 2024
1 parent 4de1cfa commit 8d79577
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/components/app/Account/Account.css
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ body:has(#account) {
flex-flow: column nowrap;
overflow: auto;
}
#documents .file-name {
font-size: 18px;
}

.coming-soon {
height: 100%;
Expand Down Expand Up @@ -257,7 +260,7 @@ body:has(#account) {
height: 100%;
width: 100%;
gap: 15px;
color: rgb(var(--text-color));
color: rgb(var(--text-color-alt));
}

.document-container {
Expand Down
6 changes: 3 additions & 3 deletions src/components/app/Messaging/Messaging.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function Messaging({ isLoggedIn, activeAccount, fetchMessages, fe
const navigate = useNavigate();
const location = useLocation();

const { accountsListState, useUserData } = useContext(AppContext);
const { accountsListState, useUserData, isTabletLayout } = useContext(AppContext);
const [selectedMessage, setSelectedMessage] = useState(null);
const [selectedFolder, setSelectedFolder] = useState(0);
const oldSelectedMessage = useRef(selectedMessage);
Expand All @@ -46,7 +46,7 @@ export default function Messaging({ isLoggedIn, activeAccount, fetchMessages, fe


const module = accountsListState[activeAccount].modules?.find(module => module.code === "MESSAGERIE");
let canSendMessages = false && (module?.params?.destAdmin ?? "1") === "1" ||
let canSendMessages = (module?.params?.destAdmin ?? "1") === "1" ||
(module?.params?.destEleve ?? "1") === "1" ||
(module?.params?.destFamille ?? "1") === "1" ||
(module?.params?.destProf ?? "1") === "1" ||
Expand Down Expand Up @@ -242,7 +242,7 @@ export default function Messaging({ isLoggedIn, activeAccount, fetchMessages, fe
<Window allowFullscreen={true} className="inbox-window">
<WindowHeader className="inbox-window-header">
{folders !== undefined && folders.length > 1
? <Tooltip className="folder-tooltip" placement="bottom" closeOnClickInside={true} onClick={(event) => event.stopPropagation()}>
? <Tooltip className="folder-tooltip" placement="bottom" closeOnClickInside={isTabletLayout} onClick={(event) => event.stopPropagation()}>
<TooltipTrigger> <FolderIcon className="folder-icon" /> </TooltipTrigger>
<TooltipContent className="no-questionmark">
<h3>Dossiers</h3>
Expand Down
3 changes: 1 addition & 2 deletions src/components/generic/PopUps/Tooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,14 @@ 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
if (!context.isMounted) return null;

// Gestion du clic à l'intérieur pour fermer la tooltip
const handleClickInside = () => {
if (context.options.closeOnClickInside && isTabletLayout) {
if (context.options.closeOnClickInside) {
context.setIsOpen(false);
}
};
Expand Down

0 comments on commit 8d79577

Please sign in to comment.