diff --git a/package.json b/package.json index c1efd81f..4ce35fbc 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "dependencies": { "@atlaskit/icon": "21.1.0", "@atlaskit/media-core": "32.2.0", - "@material-ui/core": "4.12.3", + "@material-ui/core": "4.11.4", "@material-ui/styles": "4.11.4", "classnames": "2.3.1", "cozy-bar": "7.16.0", diff --git a/src/components/notes/EditorCorner.jsx b/src/components/notes/EditorCorner.jsx index 15e7c209..b579f14a 100644 --- a/src/components/notes/EditorCorner.jsx +++ b/src/components/notes/EditorCorner.jsx @@ -7,13 +7,22 @@ import { useI18n } from 'cozy-ui/transpiled/react/I18n' import SharingWidget from 'components/notes/sharing' +// https://mui.com/components/tooltips/#custom-child-element +const ForwardedIcon = React.forwardRef(function ForwardedIcon(props, ref) { + return ( +
+ +
+ ) +}) + const EditorCorner = ({ doc, isPublic, isReadOnly, title }) => { const { t } = useI18n() if (!isPublic) return else if (isReadOnly) { return ( - + ) } else return null diff --git a/src/components/notes/editor.jsx b/src/components/notes/editor.jsx index 19a37549..39811263 100644 --- a/src/components/notes/editor.jsx +++ b/src/components/notes/editor.jsx @@ -109,11 +109,13 @@ export default function Editor(props) { headerMenu={ + returnUrl ? ( + + ) : null } editorCorner={ { const shareCode = getPublicSharecode() const token = shareCode || data.token - const isPublic = shareCode || !token || token == '' + const isPublic = Boolean(shareCode || !token || token == '') // initialize the client to interact with the cozy stack const client = new CozyClient({ diff --git a/yarn.lock b/yarn.lock index 1b15f5b8..4878527c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3098,14 +3098,14 @@ "@kenjiuno/decompressrtf" "^0.1.3" "@kenjiuno/iconvlite-wrapper-with-iso2022jp" "^0.1.0" -"@material-ui/core@4.12.3": - version "4.12.3" - resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.12.3.tgz#80d665caf0f1f034e52355c5450c0e38b099d3ca" - integrity sha512-sdpgI/PL56QVsEJldwEe4FFaFTLUqN+rd7sSZiRCdx2E/C7z5yK0y/khAWVBH24tXwto7I1hCzNWfJGZIYJKnw== +"@material-ui/core@4.11.4": + version "4.11.4" + resolved "https://registry.yarnpkg.com/@material-ui/core/-/core-4.11.4.tgz#4fb9fe5dec5dcf780b687e3a40cff78b2b9640a4" + integrity sha512-oqb+lJ2Dl9HXI9orc6/aN8ZIAMkeThufA5iZELf2LQeBn2NtjVilF5D2w7e9RpntAzDb4jK5DsVhkfOvFY/8fg== dependencies: "@babel/runtime" "^7.4.4" "@material-ui/styles" "^4.11.4" - "@material-ui/system" "^4.12.1" + "@material-ui/system" "^4.11.3" "@material-ui/types" "5.1.0" "@material-ui/utils" "^4.11.2" "@types/react-transition-group" "^4.2.0" @@ -3138,7 +3138,7 @@ jss-plugin-vendor-prefixer "^10.5.1" prop-types "^15.7.2" -"@material-ui/system@^4.12.1": +"@material-ui/system@^4.11.3": version "4.12.1" resolved "https://registry.yarnpkg.com/@material-ui/system/-/system-4.12.1.tgz#2dd96c243f8c0a331b2bb6d46efd7771a399707c" integrity sha512-lUdzs4q9kEXZGhbN7BptyiS1rLNHe6kG9o8Y307HCvF4sQxbCgpL2qi+gUk+yI8a2DNk48gISEQxoxpgph0xIw==