diff --git a/public/images/folder.svg b/public/images/folder.svg new file mode 100644 index 0000000..15941e5 --- /dev/null +++ b/public/images/folder.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/components/app/Grades/Strengths.css b/src/components/app/Grades/Strengths.css index 71246a6..5415274 100644 --- a/src/components/app/Grades/Strengths.css +++ b/src/components/app/Grades/Strengths.css @@ -103,12 +103,11 @@ ol.strengths-container { border-radius: 50px; box-shadow: var(--box-shadow-element); - /* animation: 0.5s unroll 0s forwards; */ - transform: rotateX(-90deg); + visibility: hidden; + transform: rotateX(-90deg); animation: .5s var(--timing-function-spring-effect) 0s unroll forwards; animation-delay: calc(var(--order) * 75ms); - /* transform: rotateX(-90deg); */ cursor: pointer; transition: all 0.1s, outline 0s; diff --git a/src/components/app/Messaging/Inbox.jsx b/src/components/app/Messaging/Inbox.jsx index 132a59b..87e1e02 100644 --- a/src/components/app/Messaging/Inbox.jsx +++ b/src/components/app/Messaging/Inbox.jsx @@ -76,7 +76,7 @@ export default function Inbox({ selectedMessage, setSelectedMessage, selectedFol
{messages.get() !== undefined && (messageFolders.get() !== undefined && messageFolders.get()?.find((folder) => folder.id === selectedFolder)?.fetched) - ? (messages.get().length > 0 + ? (messages.get().filter((message) => message.folderId === selectedFolder).length > 0 ?
    {messages.get().filter((message) => message.folderId === selectedFolder).filter(filterResearch).map((message, index) =>
  • handleClick(message)} onKeyDown={(event) => handleKeyDown(event, message)} key={message.id} role="button" tabIndex={0}> @@ -91,7 +91,9 @@ export default function Inbox({ selectedMessage, setSelectedMessage, selectedFol
  • )}
- :

Vous n'avez reçu aucun message. Tendez l'oreille et profitez de cet instant de silence

+ : (messages.get().length > 0 + ?

Ce dossier est vide. Peut-être qu'il attend juste un miracle... ou un clic

+ :

Vous n'avez reçu aucun message. Tendez l'oreille et profitez de cet instant de silence

) ) :
    diff --git a/src/components/app/Messaging/Messaging.css b/src/components/app/Messaging/Messaging.css index daa819b..79d3ce3 100644 --- a/src/components/app/Messaging/Messaging.css +++ b/src/components/app/Messaging/Messaging.css @@ -3,6 +3,40 @@ height: 100%; } +.folder-tooltip { + position: absolute; + top: 50%; + left: 5px; + transform: translateY(-50%); + height: 40px; + width: 40px; + border-radius: 10px; + cursor: pointer; + transition: .1s; +} +.folder-tooltip div { + display: flex; + align-items: center; + justify-content: center; + height: 100%; + width: 100%; +} +.folder-tooltip:has([data-state="open"]) { + background-color: rgb(var(--text-color-main), .15); +} + +.folder-tooltip .folder-icon { + height: 33px; + transition: .1s; +} +.folder-tooltip .folder-icon path { + stroke: rgba(var(--text-color-alt), .7); + transition: .1s; +} +.folder-tooltip:has([data-state="open"]) .folder-icon path { + stroke: rgb(var(--text-color-main)); +} + .folders-container { list-style-type: none; /* padding: 15px; */ @@ -10,9 +44,7 @@ flex-flow: column nowrap; gap: 10px; } -.folders-container .folder-button-container { - /* margin-bottom: 10px; */ -} + h3:has(~ .folders-container) { margin-bottom: 10px; diff --git a/src/components/app/Messaging/Messaging.jsx b/src/components/app/Messaging/Messaging.jsx index c09c0dd..717f042 100644 --- a/src/components/app/Messaging/Messaging.jsx +++ b/src/components/app/Messaging/Messaging.jsx @@ -16,6 +16,8 @@ import "./Messaging.css"; import Inbox from "./Inbox"; import MessageReader from "./MessageReader"; import { Tooltip, TooltipContent, TooltipTrigger } from "../../generic/PopUps/Tooltip"; +import FolderIcon from "../../graphics/FolderIcon"; +import { capitalizeFirstLetter } from "../../../utils/utils"; export default function Messaging({ isLoggedIn, activeAccount, fetchMessages, fetchMessageContent, fetchMessageMarkAsUnread }) { @@ -109,18 +111,18 @@ export default function Messaging({ isLoggedIn, activeAccount, fetchMessages, fe {messageFolders.get() !== undefined && messageFolders.get().length > 1 - ? - dossiers + ? event.stopPropagation()}> +

    Dossiers

      - {messageFolders.get().map((folder) =>
    • )} + {messageFolders.get().map((folder) =>
    • )}
    : null } -

    {messageFolders.get()?.find((item) => item.id === selectedFolder)?.name ?? "Boîte de réception"}

    +

    {capitalizeFirstLetter(messageFolders.get()?.find((item) => item.id === selectedFolder)?.name ?? "Boîte de réception")}

    diff --git a/src/components/graphics/FolderIcon.jsx b/src/components/graphics/FolderIcon.jsx new file mode 100644 index 0000000..e28f899 --- /dev/null +++ b/src/components/graphics/FolderIcon.jsx @@ -0,0 +1,9 @@ +import "./graphics.css" + +export default function FolderIcon({ className = "", id = "", alt, ...props }) { + return ( + + + + ) +}