diff --git a/client/modules/IDE/components/FileNode.jsx b/client/modules/IDE/components/FileNode.jsx index cb872eb982..f41d2c110d 100644 --- a/client/modules/IDE/components/FileNode.jsx +++ b/client/modules/IDE/components/FileNode.jsx @@ -343,16 +343,20 @@ const FileNode = ({ {t('FileNode.AddFile')} - {authenticated && ( -
  • - -
  • - )} +
  • + +
  • )}
  • diff --git a/client/modules/IDE/components/Sidebar.jsx b/client/modules/IDE/components/Sidebar.jsx index 24fd487c9a..725003ec86 100644 --- a/client/modules/IDE/components/Sidebar.jsx +++ b/client/modules/IDE/components/Sidebar.jsx @@ -124,19 +124,23 @@ export default function SideBar() { {t('Sidebar.AddFile')}
  • - {isAuthenticated && ( -
  • - -
  • - )} +
  • + +
  • )} diff --git a/client/styles/components/_sidebar.scss b/client/styles/components/_sidebar.scss index 1f1d5972e6..bca3cdfd1c 100644 --- a/client/styles/components/_sidebar.scss +++ b/client/styles/components/_sidebar.scss @@ -322,7 +322,6 @@ .sidebar__file-item--closed .file-item__children { display: none; } - .sidebar__project-options { @extend %dropdown-open-right; display: none; @@ -332,3 +331,48 @@ display: flex; } } + +// Custom tooltip for upload file when login is required +.tooltipped-login { + position: relative; + + &::before, + &::after { + position: absolute; + z-index: 1000000; + display: none; + pointer-events: none; + } + + &::after { + padding: 5px 8px; + font-size: #{math.div(12, $base-font-size)}rem; + font-family: Montserrat, sans-serif; + content: attr(aria-label); + border-radius: 3px; + background-color: white !important; + color: black !important; + text-align: center; + white-space: pre; + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); + } + + &::before { + display: none; + } + + &:hover::after, + &:active::after, + &:focus::after { + display: inline-block; + text-decoration: none; + } + + &::after { + bottom: -35px; + right: auto; + left: 5px; + transform: none; + } +} + diff --git a/translations/locales/en-US/translations.json b/translations/locales/en-US/translations.json index 376c18471c..1656391aae 100644 --- a/translations/locales/en-US/translations.json +++ b/translations/locales/en-US/translations.json @@ -268,7 +268,8 @@ "AddFile": "Create file", "AddFileARIA": "add file", "UploadFile": "Upload file", - "UploadFileARIA": "upload file" + "UploadFileARIA": "upload file", + "UploadFileRequiresLogin": "You must log in to upload files" }, "FileNode": { "OpenFolderARIA": "Open folder contents", @@ -280,6 +281,7 @@ "AddFileARIA": "add file", "UploadFile": "Upload file", "UploadFileARIA": "upload file", + "UploadFileRequiresLogin": "You must log in to upload files", "Rename": "Rename", "Delete": "Delete" },