From c0ec080e533e783a9d5eebf681bf5ee7c50c5a99 Mon Sep 17 00:00:00 2001 From: Kalisa <95277748+Kalisa11@users.noreply.github.com> Date: Fri, 24 Nov 2023 13:33:12 +0200 Subject: [PATCH] requested ui changes (#254) Co-authored-by: Yannick M <85898240+mugishayannick@users.noreply.github.com> --- renderer/public/icons/new.svg | 6 +- .../components/MenuDropdown/MenuDropdown.js | 4 +- .../src/components/Projects/NewProject.js | 10 +- .../src/components/Projects/ProjectList.js | 13 +- .../src/components/Projects/ProjectRow.js | 210 +++++++++++------- .../src/components/Projects/SearchTags.js | 4 +- .../Projects/EnhancedTableHead.js | 10 +- .../src/components/context/ProjectContext.js | 6 + renderer/src/layouts/editor/MenuBar.js | 25 +-- .../src/layouts/editor/MenuBar.module.css | 6 +- .../src/layouts/editor/PopoverProjectType.js | 2 +- renderer/src/layouts/editor/SubMenuBar.js | 108 ++++++--- renderer/src/layouts/projects/Layout.js | 105 ++++----- renderer/src/layouts/projects/SideBar.js | 19 +- 14 files changed, 313 insertions(+), 215 deletions(-) diff --git a/renderer/public/icons/new.svg b/renderer/public/icons/new.svg index b2bc4c33d..23ad2112b 100644 --- a/renderer/public/icons/new.svg +++ b/renderer/public/icons/new.svg @@ -1,5 +1,5 @@ - - - + + + diff --git a/renderer/src/components/MenuDropdown/MenuDropdown.js b/renderer/src/components/MenuDropdown/MenuDropdown.js index 4f99bfc5a..b46e21be0 100644 --- a/renderer/src/components/MenuDropdown/MenuDropdown.js +++ b/renderer/src/components/MenuDropdown/MenuDropdown.js @@ -13,7 +13,9 @@ import { fontList as fontsArray, } from 'font-detect-rhl'; -export default function MenuDropdown({ selectedFont, setSelectedFont, buttonStyle }) { +export default function MenuDropdown({ + selectedFont, setSelectedFont, buttonStyle, +}) { const detectedFonts = useDetectFonts({ fonts: fontsArray }); const [query, setQuery] = useState(''); const [isOpen, setIsOpen] = useState(false); diff --git a/renderer/src/components/Projects/NewProject.js b/renderer/src/components/Projects/NewProject.js index 5babc280c..9e153bf69 100644 --- a/renderer/src/components/Projects/NewProject.js +++ b/renderer/src/components/Projects/NewProject.js @@ -65,7 +65,7 @@ function BibleHeaderTagDropDown(headerDropDown, handleDropDown, call) { + + + + )} + { + projects?.length !== 0 && filteredProjects?.length === 0 && ( + + +

No projects found. Try a different search term.

+ + + ) + } + { + showArchived && projects?.length !== 0 && archivedProjects?.length === 0 && ( + + +

There are no archived projects.

+ + + ) + } + {projects?.length !== 0 && filteredProjects && (stableSort( + filteredProjects, getComparator(order, orderBy), orderBy, order, @@ -64,14 +113,22 @@ const ProjectRow = ({ {({ open }) => ( <> - + (showArchived ? '' : handleSelectProject(event, project.name, project.id[0], router, activeNotificationCount, setSelectedProject, setNotifications, setActiveNotificationCount)) + } + > + )} + + + {({ active }) => ( + + )} + + + {({ active }) => ( + + )} + + + + + {t('label-project-id')}
{project.id[0]}
- - -
- - -
- - -
- - {({ active }) => ( - - )} - - - {({ active }) => ( - - )} - - - {({ active }) => ( - - )} - -
-
-
-
- -
diff --git a/renderer/src/components/Projects/SearchTags.js b/renderer/src/components/Projects/SearchTags.js index 47db316c5..f72f4aa77 100644 --- a/renderer/src/components/Projects/SearchTags.js +++ b/renderer/src/components/Projects/SearchTags.js @@ -50,7 +50,7 @@ export default function SearchTags({ }, [query, contentList1]); return ( -
+
handleChange(e.target.value)} - className="pl-10 bg-gray-100 w-full block rounded-full shadow-sm sm:text-sm focus:ring-gray-500 focus:border-primary border-gray-300" + className="pl-10 bg-gray-100 w-full md:w-80 block rounded-full shadow-sm sm:text-sm focus:ring-gray-500 focus:border-primary border-gray-300" />
diff --git a/renderer/src/components/ProjectsPage/Projects/EnhancedTableHead.js b/renderer/src/components/ProjectsPage/Projects/EnhancedTableHead.js index 433f62419..94a22c0dd 100644 --- a/renderer/src/components/ProjectsPage/Projects/EnhancedTableHead.js +++ b/renderer/src/components/ProjectsPage/Projects/EnhancedTableHead.js @@ -4,9 +4,9 @@ import { TableSortLabel, TableCell, } from '@material-ui/core'; -import { - StarIcon, -} from '@heroicons/react/24/outline'; +// import { +// StarIcon, +// } from '@heroicons/react/24/outline'; import { useTranslation } from 'react-i18next'; // import i18n from '../../../translations/i18n'; @@ -54,9 +54,9 @@ function EnhancedTableHead(props) { -