Skip to content

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

chore: small ui improvements

Ilian Sapundshiev6c1f598b0c16
diff --git a/app/components/CommonIcons.tsx b/app/components/CommonIcons.tsx
index 4078ec699..805349453 100644
--- a/app/components/CommonIcons.tsx
+++ b/app/components/CommonIcons.tsx
@@ -60,7 +60,9 @@ export { default as OpenLinkIcon } from '@mui/icons-material/Link';
export { default as KeyShortcutsIcon } from '@mui/icons-material/Keyboard';
-export { default as CancelIcon } from '@mui/icons-material/Cancel';
+export { default as CancelIcon } from '@mui/icons-material/Undo';
+
+export { default as CloseEditIcon } from '@mui/icons-material/DisabledByDefault';
export { default as OpenNewWindowIcon } from '@mui/icons-material/OpenInBrowser';
@@ -103,3 +105,5 @@ export { default as CloseIcon } from '@mui/icons-material/Close';
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';
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsx
index 066289110..a7ca600d3 100644
--- a/app/components/EntryContainer.tsx
+++ b/app/components/EntryContainer.tsx
@@ -35,7 +35,7 @@ import EditIcon from '@mui/icons-material/Edit';
import SaveIcon from '@mui/icons-material/Save';
import Box from '@mui/material/Box';
import ButtonGroup from '@mui/material/ButtonGroup';
-import { CancelIcon } from '-/components/CommonIcons';
+import { CancelIcon, CloseEditIcon } from '-/components/CommonIcons';
import { getUuid } from '@tagspaces/tagspaces-common/utils-io';
import { buffer } from '@tagspaces/tagspaces-common/misc';
import AppConfig from '-/AppConfig';
@@ -858,6 +858,15 @@ function EntryContainer(props: Props) {
</Tooltip>
);
+ let closeCancelIcon;
+ if (desktopMode) {
+ closeCancelIcon = fileChanged.current ? (
+ <CancelIcon />
+ ) : (
+ <CloseEditIcon />
+ );
+ }
+
let editFile = null;
if (editingSupported) {
if (openedFile.editMode) {
@@ -870,7 +879,7 @@ function EntryContainer(props: Props) {
size="small"
variant="outlined"
color="primary"
- startIcon={desktopMode && <CancelIcon />}
+ startIcon={closeCancelIcon}
>
{fileChanged.current
? i18n.t('core:cancel')
diff --git a/app/components/EntryContainerMenu.tsx b/app/components/EntryContainerMenu.tsx
index f50902605..4bbac0d17 100644
--- a/app/components/EntryContainerMenu.tsx
+++ b/app/components/EntryContainerMenu.tsx
@@ -10,6 +10,7 @@ import {
ListItemText,
Menu,
MenuItem,
+ MenuList,
Divider,
Typography
} from '@mui/material';
@@ -437,7 +438,7 @@ function EntryContainerMenu(props: Props) {
horizontal: 'left'
}}
>
- {menuItems}
+ <MenuList>{menuItems}</MenuList>
</Menu>
{isDeleteEntryModalOpened && (
<ConfirmDialog
diff --git a/app/components/EntryContainerTitle.tsx b/app/components/EntryContainerTitle.tsx
index b013ebb50..7649375dd 100644
--- a/app/components/EntryContainerTitle.tsx
+++ b/app/components/EntryContainerTitle.tsx
@@ -33,7 +33,7 @@ import {
import i18n from '-/services/i18n';
import Tooltip from '-/components/Tooltip';
import PlatformIO from '-/services/platform-facade';
-import MoreVertIcon from '@mui/icons-material/MoreVert';
+import { FolderIcon, MoreMenuIcon } from '-/components/CommonIcons';
import AppConfig from '-/AppConfig';
import EntryContainerMenu from '-/components/EntryContainerMenu';
import { getSharingLink, loadJSONFile } from '-/services/utils-io';
@@ -166,7 +166,7 @@ function EntryContainerTitle(props: Props) {
>
{//'.' +
extractFileExtension(openedFile.path, PlatformIO.getDirSeparator())}
- <MoreVertIcon style={{ fontSize: 20 }} />
+ <MoreMenuIcon style={{ fontSize: 20 }} />
</FileBadge>
</>
) : (
@@ -183,11 +183,12 @@ function EntryContainerTitle(props: Props) {
style={{
backgroundColor: AppConfig.defaultFolderColor,
display: 'flex',
- alignItems: 'center'
+ alignItems: 'center',
+ paddingLeft: 10
}}
>
- {i18n.t('core:folder')}
- <MoreVertIcon style={{ fontSize: 20 }} />
+ <FolderIcon style={{ fontSize: 20 }} />
+ <MoreMenuIcon style={{ fontSize: 20 }} />
</FileBadge>
)}
<Tooltip title={openedFile.isFile && fileName}>
diff --git a/app/components/menus/BookmarksMenu.tsx b/app/components/menus/BookmarksMenu.tsx
index 8cb60a55d..17693eb74 100644
--- a/app/components/menus/BookmarksMenu.tsx
+++ b/app/components/menus/BookmarksMenu.tsx
@@ -19,10 +19,8 @@
import React from 'react';
import ListItemText from '@mui/material/ListItemText';
import ListItemIcon from '@mui/material/ListItemIcon';
-import Menu from '@mui/material/Menu';
-import MenuItem from '@mui/material/MenuItem';
-import RefreshIcon from '@mui/icons-material/Refresh';
-import DeleteIcon from '@mui/icons-material/Delete';
+import { Menu, MenuList, MenuItem } from '@mui/material';
+import { DeleteIcon, ReloadIcon } from '-/components/CommonIcons';
import i18n from '-/services/i18n';
import { Pro } from '../../pro';
@@ -48,7 +46,7 @@ function BookmarksMenu(props: Props) {
}}
>
<ListItemIcon>
- <RefreshIcon />
+ <ReloadIcon />
</ListItemIcon>
<ListItemText primary={<>{i18n.t('core:refresh')}</>} />
</MenuItem>
@@ -71,11 +69,9 @@ function BookmarksMenu(props: Props) {
);
return (
- <div style={{ overflowY: 'hidden' }}>
- <Menu anchorEl={props.anchorEl} open={props.open} onClose={props.onClose}>
- {menuItems}
- </Menu>
- </div>
+ <Menu anchorEl={props.anchorEl} open={props.open} onClose={props.onClose}>
+ <MenuList>{menuItems}</MenuList>
+ </Menu>
);
}