Skip to content

TagSpaces is an offline, open source, document manager with tagging support

chore: added icons to the entry detail tabs

Ilian Sapundshiev9272cc94ee2a
diff --git a/app/components/CommonIcons.tsx b/app/components/CommonIcons.tsx
index dca4fe09a..4cd31bb9c 100644
--- a/app/components/CommonIcons.tsx
+++ b/app/components/CommonIcons.tsx
@@ -107,3 +107,7 @@ export { default as SelectedIcon } from '@mui/icons-material/CheckCircle';
export { default as UnSelectedIcon } from '@mui/icons-material/RadioButtonUnchecked';
export { default as MoreMenuIcon } from '@mui/icons-material/MoreVert';
+
+export { default as RevisionIcon } from '@mui/icons-material/Restore';
+
+export { default as DescriptionIcon } from '@mui/icons-material/Subject';
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsx
index f9f320cec..25a828802 100644
--- a/app/components/EntryContainer.tsx
+++ b/app/components/EntryContainer.tsx
@@ -933,6 +933,7 @@ function EntryContainer(props: Props) {
openPanel={openPanel}
toggleProperties={toggleProperties}
marginRight={marginRight}
+ isDesktopMode={desktopMode}
/>
);
diff --git a/app/components/EntryContainerTabs.tsx b/app/components/EntryContainerTabs.tsx
index e1c81da56..146bdaf28 100644
--- a/app/components/EntryContainerTabs.tsx
+++ b/app/components/EntryContainerTabs.tsx
@@ -39,6 +39,11 @@ import {
getEntryContainerTab,
getMapTileServer
} from '-/reducers/settings';
+import {
+ FolderPropertiesIcon,
+ DescriptionIcon,
+ RevisionIcon
+} from '-/components/CommonIcons';
import EditDescription from '-/components/EditDescription';
import { useTranslation } from 'react-i18next';
@@ -70,11 +75,12 @@ const StyledTabs = styled((props: StyledTabsProps) => (
interface StyledTabProps {
label: string;
+ icon: any;
onClick: (event: React.SyntheticEvent) => void;
}
const StyledTab = styled((props: StyledTabProps) => (
- <Tab disableRipple {...props} />
+ <Tab disableRipple iconPosition="start" {...props} />
))(({ theme }) => ({
textTransform: 'none',
fontWeight: theme.typography.fontWeightRegular,
@@ -100,6 +106,7 @@ interface Props {
openedFile: OpenedEntry;
openPanel: () => void;
toggleProperties: () => void;
+ isDesktopMode: boolean;
marginRight: string;
}
@@ -120,6 +127,7 @@ function EntryContainerTabs(props: Props) {
const directoryPath = useSelector(getDirectoryPath);
const tileServer = useSelector(getMapTileServer);
const dispatch: AppDispatch = useDispatch();
+ const { isDesktopMode } = props;
function TsTabPanel(tprops: TabPanelProps) {
const { children, value, index, ...other } = tprops;
@@ -237,20 +245,23 @@ function EntryContainerTabs(props: Props) {
>
<StyledTab
data-tid="detailsTabTID"
- label={t('core:details')}
+ icon={<FolderPropertiesIcon />}
+ label={isDesktopMode && t('core:details')}
{...a11yProps(0)}
onClick={handleTabClick}
/>
<StyledTab
data-tid="descriptionTabTID"
- label={t('core:filePropertiesDescription')}
+ icon={<DescriptionIcon />}
+ label={isDesktopMode && t('core:filePropertiesDescription')}
{...a11yProps(1)}
onClick={handleTabClick}
/>
{openedFile.isFile && (
<StyledTab
data-tid="revisionsTabTID"
- label={t('core:revisions')}
+ icon={<RevisionIcon />}
+ label={isDesktopMode && t('core:revisions')}
{...a11yProps(2)}
onClick={handleTabClick}
/>
diff --git a/app/components/Revisions.tsx b/app/components/Revisions.tsx
index c4f467e36..934d998e5 100644
--- a/app/components/Revisions.tsx
+++ b/app/components/Revisions.tsx
@@ -35,7 +35,7 @@ import { TS } from '-/tagspaces.namespace';
import { format, formatDistanceToNow } from 'date-fns';
import DeleteIcon from '@mui/icons-material/Delete';
import PreviewIcon from '@mui/icons-material/Preview';
-import RestoreIcon from '@mui/icons-material/Restore';
+import RestoreIcon from '@mui/icons-material/SettingsBackupRestore';
import IconButton from '@mui/material/IconButton';
import AppConfig from '-/AppConfig';
import {
diff --git a/app/containers/Root.tsx b/app/containers/Root.tsx
index 525b58158..31b6eddcf 100644
--- a/app/containers/Root.tsx
+++ b/app/containers/Root.tsx
@@ -41,7 +41,7 @@ export default function Root({ store, persistor }: RootType) {
}, []);
if (!initialized) {
- return <LoadingScreen />;
+ return <span />;
}
let appContent = (
@@ -67,7 +67,7 @@ export default function Root({ store, persistor }: RootType) {
* @see https://github.com/rt2zz/redux-persist/blob/master/docs/PersistGate.md
*/}
<PersistGate
- loading={<LoadingScreen />}
+ // loading={<LoadingScreen />}
onBeforeLift={() => {
// eslint-disable-next-line react/prop-types
if (!AppConfig.isAmplify) {
diff --git a/app/locales/en/core.json b/app/locales/en/core.json
index 0816839ee..122f59f0d 100644
--- a/app/locales/en/core.json
+++ b/app/locales/en/core.json
@@ -337,7 +337,7 @@
"taggroupTitleHelper": "Empty Title",
"toggleProperties": "Toggle properties",
"switchToFullscreen": "Switch to fullscreen",
- "openInFullWidth": "Open in full width",
+ "openInFullWidth": "Toggle full width",
"openDirectoryExternally": "Open Folder Externally",
"toggleEntryProperties": "Toggle entry properties",
"closeEntry": "Close entry",