diff --git a/src/assets/styles/components/_web-ide.scss b/src/assets/styles/components/_web-ide.scss index 352929431..9b280bf91 100644 --- a/src/assets/styles/components/_web-ide.scss +++ b/src/assets/styles/components/_web-ide.scss @@ -81,7 +81,7 @@ padding: 0 !important; padding-inline-start: 8px !important; - .folder-container { + .file-container { button::before, i::before { background: transparent !important; @@ -109,15 +109,6 @@ text-align: left; white-space: nowrap; - .project-icon, - .package-icon { - color: $color-success; - } - - .folder-icon { - color: $color-info; - } - .filetype-js { color: $color-warning; } @@ -130,6 +121,59 @@ color: $color-lightgrey; } + &.file-selected { + .filename-text { + color: $color-white !important; + + &::after { + content: '\f35a' !important; + font-family: 'Font Awesome 5 Free', sans-serif !important; + font-size: 16px; + position: absolute; + right: 8px; + } + } + } + } + } + + .folder-container { + button::before, + i::before { + background: transparent !important; + border: 0; + font-size: 16px !important; + margin: 0; + outline: none !important; + padding: 0; + } + + .package-text, + .filename-text { + color: $color-grey !important; + font-size: 14px !important; + padding-left: 8px; + } + + .file, + .package { + background: transparent; + border: 0; + margin: 1px 0; + outline: none !important; // TODO: fix this because it is not accessible; style differently + padding: 3px; + text-align: left; + white-space: nowrap; + + .project-icon, + .package-icon { + color: $color-success; + } + + .folder-icon { + color: $color-info; + } + &.folder-selected { .filename-text { color: $color-white !important; @@ -158,6 +202,12 @@ } } } + .folder-open ~ li { + display: block; + } + .folder-closed ~ li { + display: none; + } } } } diff --git a/src/components/auth/AuthLayout.jsx b/src/components/auth/AuthLayout.jsx index 5516514b2..038237ebf 100644 --- a/src/components/auth/AuthLayout.jsx +++ b/src/components/auth/AuthLayout.jsx @@ -1,7 +1,7 @@ import { Outlet } from 'react-router'; import { Col, Container, Row } from 'reactstrap'; -function AuthLayout({ children }) { +function AuthLayout() { return ( diff --git a/src/components/instance/functions/manage/applicationsEditor/FileBrowser.js b/src/components/instance/functions/manage/applicationsEditor/FileBrowser.js index 9c9094a44..8347098e3 100644 --- a/src/components/instance/functions/manage/applicationsEditor/FileBrowser.js +++ b/src/components/instance/functions/manage/applicationsEditor/FileBrowser.js @@ -43,9 +43,20 @@ const isFolder = (entry) => Boolean(entry.entries); function ProjectIcon() { return ; } -function FolderIcon({ toggleClosed }) { - // eslint-disable-next-line - return ; +function FolderIcon({ toggleClosed, isOpen }) { + return ( + // TODO: A11y on this is not good at all..... Need to refactor the file tree to make the file tree more accessible for ALL users. + + ); } function FiletypeIcon({ extension }) { @@ -99,7 +110,6 @@ function File({ directoryEntry, selectedFile, selectedFolder, onFileSelect, onFo const deployFileIconClass = 'deploy-project'; const isFileSelected = directoryEntry.path === selectedFile; const isFolderSelected = directoryEntry.path === selectedFolder?.path; - // file receives open/close toggle func from // parent. if it's a dir, calls toggle func on click // if it's a flat file, calls onFileSelect so @@ -119,7 +129,6 @@ function File({ directoryEntry, selectedFile, selectedFolder, onFileSelect, onFo // that we don't untoggle directory selection; leave selected if icon clicked. const iconWasClicked = e.target.classList.contains(renameFileIconClass) || e.target.classList.contains(deployFileIconClass); - // if icon's clicked, select, but don't unselect. // if (iconWasClicked) return; @@ -188,7 +197,12 @@ function Folder({ { // FIXME: don't hardcode 'components', get from root .name property of fileTree. directoryEntry.name !== 'components' ? ( -
  • +
  • {directoryEntry.package ? (