(showArchived ? '' : handleSelectProject(event, project.name, project.id[0], router, activeNotificationCount, setSelectedProject, setNotifications, setActiveNotificationCount))
+ }
+ >
|
{moment(project.date).format('LL')} |
{moment(project.view, 'YYYY-MM-DD h:mm:ss').fromNow()} |
-
-
+ {
+ event.stopPropagation();
+ }}
+ >
+
{open
?
: }
+
|
|
+
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) {
-
+ {/* */}
|
{headCells.map((headCell) => (
diff --git a/renderer/src/components/context/ProjectContext.js b/renderer/src/components/context/ProjectContext.js
index 5fd13a6ba..93ce5c3a1 100644
--- a/renderer/src/components/context/ProjectContext.js
+++ b/renderer/src/components/context/ProjectContext.js
@@ -51,6 +51,8 @@ const ProjectContextProvider = ({ children }) => {
const [selectedProjectMeta, setSelectedProjectMeta] = useState();
const [importedFiles, setImportedFiles] = useState([]);
const [sideBarTab, setSideBarTab] = useState('');
+ const [openImportPopUp, setOpenImportPopUp] = useState(false);
+ const [openExportPopUp, setOpenExportPopUp] = useState(false);
const handleProjectFields = (prop) => (event) => {
setNewProjectFields({ ...newProjectFields, [prop]: event.target.value });
@@ -535,6 +537,8 @@ const ProjectContextProvider = ({ children }) => {
openSideBar,
editorSave,
sideBarTab,
+ openImportPopUp,
+ openExportPopUp,
selectedProjectMeta,
},
actions: {
@@ -557,6 +561,8 @@ const ProjectContextProvider = ({ children }) => {
setLanguages,
setEditorSave,
setSideBarTab,
+ setOpenImportPopUp,
+ setOpenExportPopUp,
setSelectedProjectMeta,
},
};
diff --git a/renderer/src/layouts/editor/MenuBar.js b/renderer/src/layouts/editor/MenuBar.js
index 1550380d8..546f32e86 100644
--- a/renderer/src/layouts/editor/MenuBar.js
+++ b/renderer/src/layouts/editor/MenuBar.js
@@ -8,12 +8,11 @@ import {
import { useRouter } from 'next/navigation';
import { useTranslation } from 'react-i18next';
import EditorSideBar from '@/modules/editorsidebar/EditorSideBar';
-import { ReferenceContext } from '@/components/context/ReferenceContext';
+
import { ProjectContext } from '@/components/context/ProjectContext';
import { saveReferenceResource } from '@/core/projects/updateAgSettings';
import UserProfile from '@/components/Profile/UserProfile';
import { splitStringByLastOccurance } from '@/util/splitStringByLastMarker';
-import styles from './MenuBar.module.css';
import LogoIcon from '@/icons/logo.svg';
export default function TopMenuBar() {
@@ -27,15 +26,6 @@ export default function TopMenuBar() {
},
} = useContext(ProjectContext);
- const {
- state: {
- fontSize,
- },
- actions: {
- setFontsize,
- },
- } = useContext(ReferenceContext);
-
const [projectname, setprojectname] = useState(undefined);
const { t } = useTranslation();
@@ -53,14 +43,7 @@ export default function TopMenuBar() {
function closeSideBar(open) {
setOpenSideBar(open);
}
- const handleFontSize = (status) => {
- if (status === 'dec' && fontSize > 0.70) {
- setFontsize(fontSize - 0.2);
- }
- if (status === 'inc' && fontSize < 2) {
- setFontsize(fontSize + 0.2);
- }
- };
+
const goToProjectPage = async () => {
saveReferenceResource();
router.push('/projects');
@@ -119,7 +102,7 @@ export default function TopMenuBar() {
/>
*/}
-
*/}
{/*
diff --git a/renderer/src/layouts/editor/MenuBar.module.css b/renderer/src/layouts/editor/MenuBar.module.css
index 673fdfb94..f4eba90d8 100644
--- a/renderer/src/layouts/editor/MenuBar.module.css
+++ b/renderer/src/layouts/editor/MenuBar.module.css
@@ -1,5 +1,5 @@
.btn {
- @apply inline-flex items-center px-2 py-1 mx-1 border border-gray-200 rounded-md shadow-sm
+ @apply inline-flex items-center px-2 py-1 mx-1 border border-gray-200 rounded-md shadow-sm
text-sm text-primary bg-gray-100
hover:bg-primary hover:text-white
focus:outline-none focus:ring-1 focus:ring-offset-1 focus:ring-offset-gray-300 focus:ring-gray-300;
@@ -12,11 +12,11 @@
} */
.saved {
- @apply inline-flex items-center px-2 py-1 mx-1 text-sm text-dark font-bold;
+ @apply inline-flex items-center px-2 py-1 mx-1 text-sm text-dark font-bold;
}
.btnDark {
- @apply inline-flex items-center px-2 py-1 mx-2 border border-gray-200 rounded-md shadow-sm
+ @apply inline-flex items-center px-2 py-1 mx-2 border border-gray-200 rounded-md shadow-sm
text-sm text-primary bg-gray-100
hover:bg-gray-800 hover:text-white
focus:outline-none focus:ring-1 focus:ring-offset-1 focus:ring-offset-gray-300 focus:ring-gray-300;
diff --git a/renderer/src/layouts/editor/PopoverProjectType.js b/renderer/src/layouts/editor/PopoverProjectType.js
index 949fa4b54..84696d2ce 100644
--- a/renderer/src/layouts/editor/PopoverProjectType.js
+++ b/renderer/src/layouts/editor/PopoverProjectType.js
@@ -31,7 +31,7 @@ export default function PopoverProjectType(props) {
leaveFrom="opacity-100 translate-y-0"
leaveTo="opacity-0 translate-y-1"
>
-
+
{({ close }) => (
diff --git a/renderer/src/layouts/editor/SubMenuBar.js b/renderer/src/layouts/editor/SubMenuBar.js
index a11d95a51..bf6ce78dc 100644
--- a/renderer/src/layouts/editor/SubMenuBar.js
+++ b/renderer/src/layouts/editor/SubMenuBar.js
@@ -1,16 +1,17 @@
+/* eslint-disable no-unused-vars */
import { useState, useContext, useEffect } from 'react';
-import { BookmarkIcon } from '@heroicons/react/24/solid';
+// import { BookmarkIcon } from '@heroicons/react/24/solid';
import { useTranslation } from 'react-i18next';
import { ReferenceContext } from '@/components/context/ReferenceContext';
-import MenuBar from '@/components/Menubar/MenuBar';
-import CustomUsfmToolbar from '@/components/EditorPage/UsfmEditor/CustomUsfmToolbar';
+// import MenuBar from '@/components/Menubar/MenuBar';
+// import CustomUsfmToolbar from '@/components/EditorPage/UsfmEditor/CustomUsfmToolbar';
import { ProjectContext } from '@/components/context/ProjectContext';
import CustomNofications from '@/components/Notification/CustomNofications';
import localforage from 'localforage';
import EditorSync from '@/components/Sync/Gitea/EditorSync/EditorSync';
// import useNetwork from '@/components/hooks/useNetowrk';
import { isElectron } from '@/core/handleElectron';
-import Font from '@/icons/font.svg';
+// import Font from '@/icons/font.svg';
import ColumnsIcon from '@/icons/basil/Outline/Interface/Columns.svg';
import MenuDropdown from '../../components/MenuDropdown/MenuDropdown';
import menuStyles from './MenuBar.module.css';
@@ -21,11 +22,11 @@ const activate = () => {
// console.log('rename');
};
-const EditorTools = [
- {
- renderElement:
,
- },
-];
+// const EditorTools = [
+// {
+// renderElement:
,
+// },
+// ];
export default function SubMenuBar() {
// const [snackBar, setSnackBar] = useState(true);
@@ -59,19 +60,19 @@ export default function SubMenuBar() {
};
const { t } = useTranslation();
// const networkState = useNetwork();
- const FileMenuItems = [
- {
- itemname: t('label-bookmarks'),
- icon:
,
- callback: openBookMarks,
- },
- {
- itemname: 'Font',
- icon:
,
- renderElement:
,
- callback: activate,
- },
- ];
+ // const FileMenuItems = [
+ // {
+ // itemname: t('label-bookmarks'),
+ // icon:
,
+ // callback: openBookMarks,
+ // },
+ // {
+ // itemname: 'Font',
+ // icon:
,
+ // renderElement:
,
+ // callback: activate,
+ // },
+ // ];
const handleResource = () => {
if (layout === 0) {
@@ -127,6 +128,22 @@ export default function SubMenuBar() {
supabaseResourceType();
}
});
+ const {
+ state: {
+ fontSize,
+ },
+ actions: {
+ setFontsize,
+ },
+ } = useContext(ReferenceContext);
+ const handleFontSize = (status) => {
+ if (status === 'dec' && fontSize > 0.70) {
+ setFontsize(fontSize - 0.2);
+ }
+ if (status === 'inc' && fontSize < 2) {
+ setFontsize(fontSize + 0.2);
+ }
+ };
return (
<>
@@ -203,17 +220,52 @@ export default function SubMenuBar() {
*/}