diff --git a/package.json b/package.json index 2c906eda9..f21f63b65 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@graasp/query-client": "3.0.0", "@graasp/sdk": "4.2.1", "@graasp/translations": "1.25.3", - "@graasp/ui": "4.11.0", + "@graasp/ui": "4.12.0", "@mui/icons-material": "5.15.14", "@mui/lab": "5.0.0-alpha.169", "@mui/material": "5.15.14", diff --git a/src/components/layout/Header.tsx b/src/components/layout/Header.tsx index 271eba004..6bb7fdfd7 100644 --- a/src/components/layout/Header.tsx +++ b/src/components/layout/Header.tsx @@ -2,14 +2,17 @@ import { Link } from 'react-router-dom'; import MenuIcon from '@mui/icons-material/Menu'; import MenuOpenIcon from '@mui/icons-material/MenuOpen'; -import { AppBar, Toolbar, Typography, styled } from '@mui/material'; +import PersonIcon from '@mui/icons-material/Person'; +import { AppBar, Toolbar, Typography, styled, useTheme } from '@mui/material'; import IconButton from '@mui/material/IconButton'; import { GraaspLogo, Platform, PlatformSwitch, + PlatformSwitchProps, defaultHostsMapper, + useMobileView, usePlatformNavigation, } from '@graasp/ui'; @@ -38,6 +41,10 @@ const StyledLink = styled(Link)(() => ({ display: 'flex', alignItems: 'center', })); +const AccountIcon: PlatformSwitchProps['CustomMobileIcon'] = (props) => ( + // eslint-disable-next-line react/jsx-props-no-spreading + +); type Props = { isMenuOpen: boolean; @@ -53,6 +60,8 @@ export const platformsHostsMap = defaultHostsMapper({ }); const Header = ({ isMenuOpen, toggleMenu }: Props): JSX.Element => { + const theme = useTheme(); + const { isMobile } = useMobileView(); const getNavigationEvents = usePlatformNavigation(platformsHostsMap); const platformProps = { [Platform.Builder]: { @@ -98,7 +107,20 @@ const Header = ({ isMenuOpen, toggleMenu }: Props): JSX.Element => { {APP_NAME} - + diff --git a/yarn.lock b/yarn.lock index 4d7669557..c1688f4c0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1648,9 +1648,9 @@ __metadata: languageName: node linkType: hard -"@graasp/ui@npm:4.11.0": - version: 4.11.0 - resolution: "@graasp/ui@npm:4.11.0" +"@graasp/ui@npm:4.12.0": + version: 4.12.0 + resolution: "@graasp/ui@npm:4.12.0" dependencies: "@ag-grid-community/client-side-row-model": "npm:31.1.1" "@ag-grid-community/react": "npm:^31.1.1" @@ -1658,14 +1658,14 @@ __metadata: "@storybook/react-vite": "npm:7.6.17" http-status-codes: "npm:2.3.0" interweave: "npm:13.1.0" - katex: "npm:0.16.9" + katex: "npm:0.16.10" lodash.truncate: "npm:4.4.2" react-cookie-consent: "npm:9.0.0" react-quill: "npm:2.0.0" react-rnd: "npm:10.4.1" react-text-mask: "npm:5.5.0" uuid: "npm:9.0.1" - vitest: "npm:1.3.1" + vitest: "npm:1.4.0" peerDependencies: "@emotion/cache": ~11.10.7 || ~11.11.0 "@emotion/react": ~11.10.6 || ~11.11.0 @@ -1682,7 +1682,7 @@ __metadata: react-router-dom: ^6.11.0 stylis: ^4.1.3 stylis-plugin-rtl: ^2.1.1 - checksum: 10/4fefdb4e23d0f4838cfbd895512ed55b2757167edee68f3d76220b130cff4bbb7b093480a32f361be63d0ff8d74f5ca8b7a6367156d13060fa24d0e6876797f5 + checksum: 10/27e550404d31d8b2cadb117e6cd3e0763379fd899336bfff59847a9424da0a6a47e4dd795a0175dbe35a898b37b94f68c70150142d6208f2642563b3b84cdacc languageName: node linkType: hard @@ -3488,57 +3488,57 @@ __metadata: languageName: node linkType: hard -"@vitest/expect@npm:1.3.1": - version: 1.3.1 - resolution: "@vitest/expect@npm:1.3.1" +"@vitest/expect@npm:1.4.0": + version: 1.4.0 + resolution: "@vitest/expect@npm:1.4.0" dependencies: - "@vitest/spy": "npm:1.3.1" - "@vitest/utils": "npm:1.3.1" + "@vitest/spy": "npm:1.4.0" + "@vitest/utils": "npm:1.4.0" chai: "npm:^4.3.10" - checksum: 10/7c2818b2080ec107cffcc1566195132695c8e87cba883e878c2f36ac4d8107bb0a1f8d3823ccc0da5989e245ea114b8afffe790512aebcde8537ac8c1bcf3454 + checksum: 10/00d794a807b7e496d8450133430c8528d4b6cfaba9520bf49640c941b14acaa7b28f151c249b44d935740cae887f0648980db63f38e37bdeb6c2906387e15188 languageName: node linkType: hard -"@vitest/runner@npm:1.3.1": - version: 1.3.1 - resolution: "@vitest/runner@npm:1.3.1" +"@vitest/runner@npm:1.4.0": + version: 1.4.0 + resolution: "@vitest/runner@npm:1.4.0" dependencies: - "@vitest/utils": "npm:1.3.1" + "@vitest/utils": "npm:1.4.0" p-limit: "npm:^5.0.0" pathe: "npm:^1.1.1" - checksum: 10/dcd452216b83406df49e298da5e49dbc45c542f755a726a132461b94a84c386b6cabcdfce17fc2d31fa66fd5ea4e57be3618c7dc627b17791e2a1a065d919616 + checksum: 10/7b8a692de5cef72ef698e83eb5bbb89076924e7a557ed087e80c5080e000a575f34c481f3b880aa2588da5a095504dc55216c319f6924eddfcfc3412f10a27b2 languageName: node linkType: hard -"@vitest/snapshot@npm:1.3.1": - version: 1.3.1 - resolution: "@vitest/snapshot@npm:1.3.1" +"@vitest/snapshot@npm:1.4.0": + version: 1.4.0 + resolution: "@vitest/snapshot@npm:1.4.0" dependencies: magic-string: "npm:^0.30.5" pathe: "npm:^1.1.1" pretty-format: "npm:^29.7.0" - checksum: 10/2212ae82eb8d458ddaa6c28c7e33b6a8c8897e298b88e458bf83e7f9bf767fd716ed507f3cd41ebbe145d59baa72220e9f494552f92cc22b39241dc32b8ad8e1 + checksum: 10/43e22f8aeef4b87bcce79b37775415d4b558e32d906992d4a0acbe81c8e84cbfe3e488dd32c504c4f4d8f2c3f96842acb524b4b210036fda6796e64d0140d5f6 languageName: node linkType: hard -"@vitest/spy@npm:1.3.1": - version: 1.3.1 - resolution: "@vitest/spy@npm:1.3.1" +"@vitest/spy@npm:1.4.0": + version: 1.4.0 + resolution: "@vitest/spy@npm:1.4.0" dependencies: tinyspy: "npm:^2.2.0" - checksum: 10/544c8a30fdeb32fb7bf2c2b5816519be943f5ef90668c306b14efdde7676771d0e83cf0e0a5c79fad722be3839432226bcf74173110a032299821e00b67f47e6 + checksum: 10/0e48f9a64f62801c2abf10df1013ec5e5b75c47bdca6a5d4c8246b3dd7bdf01ade3df6c99fd0751a870a16bd63c127b3e58e0f5cbc320c48d0727ab5da89d028 languageName: node linkType: hard -"@vitest/utils@npm:1.3.1": - version: 1.3.1 - resolution: "@vitest/utils@npm:1.3.1" +"@vitest/utils@npm:1.4.0": + version: 1.4.0 + resolution: "@vitest/utils@npm:1.4.0" dependencies: diff-sequences: "npm:^29.6.3" estree-walker: "npm:^3.0.3" loupe: "npm:^2.3.7" pretty-format: "npm:^29.7.0" - checksum: 10/170c62e6c348562f611d8caddc893e8cba75ed89986e09aa2f0fe6812c96664e8d0f6e329f7a96a4c9cdecf147f4853e4054c3db597b111ec993d3cdd546eddc + checksum: 10/2261705e2edc10376f2524a4bf6616688680094d94fff683681a1ef8d3d59271dee2d80893efad8e6437bbdb00390e2edd754d94cf42100db86f2cfd9c44826f languageName: node linkType: hard @@ -7081,7 +7081,7 @@ __metadata: "@graasp/query-client": "npm:3.0.0" "@graasp/sdk": "npm:4.2.1" "@graasp/translations": "npm:1.25.3" - "@graasp/ui": "npm:4.11.0" + "@graasp/ui": "npm:4.12.0" "@mui/icons-material": "npm:5.15.14" "@mui/lab": "npm:5.0.0-alpha.169" "@mui/material": "npm:5.15.14" @@ -8307,14 +8307,14 @@ __metadata: languageName: node linkType: hard -"katex@npm:0.16.9": - version: 0.16.9 - resolution: "katex@npm:0.16.9" +"katex@npm:0.16.10": + version: 0.16.10 + resolution: "katex@npm:0.16.10" dependencies: commander: "npm:^8.3.0" bin: katex: cli.js - checksum: 10/0a1ea1e87c286f845ccd12adadb39e5bc6655c830229195697e5ed74b525f3a4595e77ed3de57d3cfc678476c4bc074ee421fc2dc156554a11968f9d9b5093ea + checksum: 10/367034012311c695791de4553b3e4c7a9f36d126a0cae17b97f4e8832ced2559961f9fa6d39e0116e1374013e12ac8af159eb014678f06b4acf5e547292ea3e5 languageName: node linkType: hard @@ -11900,9 +11900,9 @@ __metadata: languageName: node linkType: hard -"vite-node@npm:1.3.1": - version: 1.3.1 - resolution: "vite-node@npm:1.3.1" +"vite-node@npm:1.4.0": + version: 1.4.0 + resolution: "vite-node@npm:1.4.0" dependencies: cac: "npm:^6.7.14" debug: "npm:^4.3.4" @@ -11911,7 +11911,7 @@ __metadata: vite: "npm:^5.0.0" bin: vite-node: vite-node.mjs - checksum: 10/d6ca8cd5b84768f9a0f12d4327a6aca5200001bd9111991df89ad742e059566a95f8298047af7144ca128120fc67cbd7d37b3fda9700ab07f8fc130d2ad58665 + checksum: 10/691e828c2abe6b62d44183c4e04bdfd119fed405439126fbdc5bfb791644baee3961c1ce429a67b360cc3d8b7c472160c7e82c59491f044a232b4ff480d8a2a2 languageName: node linkType: hard @@ -12061,15 +12061,15 @@ __metadata: languageName: node linkType: hard -"vitest@npm:1.3.1": - version: 1.3.1 - resolution: "vitest@npm:1.3.1" +"vitest@npm:1.4.0": + version: 1.4.0 + resolution: "vitest@npm:1.4.0" dependencies: - "@vitest/expect": "npm:1.3.1" - "@vitest/runner": "npm:1.3.1" - "@vitest/snapshot": "npm:1.3.1" - "@vitest/spy": "npm:1.3.1" - "@vitest/utils": "npm:1.3.1" + "@vitest/expect": "npm:1.4.0" + "@vitest/runner": "npm:1.4.0" + "@vitest/snapshot": "npm:1.4.0" + "@vitest/spy": "npm:1.4.0" + "@vitest/utils": "npm:1.4.0" acorn-walk: "npm:^8.3.2" chai: "npm:^4.3.10" debug: "npm:^4.3.4" @@ -12083,13 +12083,13 @@ __metadata: tinybench: "npm:^2.5.1" tinypool: "npm:^0.8.2" vite: "npm:^5.0.0" - vite-node: "npm:1.3.1" + vite-node: "npm:1.4.0" why-is-node-running: "npm:^2.2.2" peerDependencies: "@edge-runtime/vm": "*" "@types/node": ^18.0.0 || >=20.0.0 - "@vitest/browser": 1.3.1 - "@vitest/ui": 1.3.1 + "@vitest/browser": 1.4.0 + "@vitest/ui": 1.4.0 happy-dom: "*" jsdom: "*" peerDependenciesMeta: @@ -12107,7 +12107,7 @@ __metadata: optional: true bin: vitest: vitest.mjs - checksum: 10/41a8405d65b3b3a48b97b020fae50bdc928a8ebb55b4d24e8867e1ba23d298ea810b37ca6530ab87f6b51d3dc1ada1e067e7bc252a99d8f5439ca4ce6831d1f6 + checksum: 10/cf4675657f4a9ea755d0af70d62827fca9daee64e81d0392067c70a0d1f5f8fd4a47523e28ecf42d667e4d4d7c68b09d5e08389d4b58dc36065364f6c76cda7d languageName: node linkType: hard