Skip to content

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

polish: adding tooltips and other ui changes (#1305)

Ilian4cd23ced9d0b
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsx
index a806c9428..d99ccf755 100644
--- a/app/components/EntryContainer.tsx
+++ b/app/components/EntryContainer.tsx
@@ -22,6 +22,7 @@ import { bindActionCreators } from 'redux';
import { GlobalHotKeys } from 'react-hotkeys';
import Button from '@material-ui/core/Button';
import Fab from '@material-ui/core/Fab';
+import Tooltip from '@material-ui/core/Tooltip';
import IconButton from '@material-ui/core/IconButton';
import SaveIcon from '@material-ui/icons/Save';
import CloseIcon from '@material-ui/icons/Close';
@@ -38,7 +39,7 @@ import DeleteIcon from '@material-ui/icons/Delete';
import ShareIcon from '@material-ui/icons/Share';
import { withStyles } from '@material-ui/core/styles';
import RefreshIcon from '@material-ui/icons/Refresh';
-import { Box, Typography } from '@material-ui/core';
+import Box from '@material-ui/core/Box';
import EntryProperties from '-/components/EntryProperties';
import ConfirmDialog from '-/components/dialogs/ConfirmDialog';
import AppConfig from '-/config';
@@ -57,6 +58,7 @@ import {
import { buffer } from '-/utils/misc';
import {
actions as SettingsActions,
+ isDesktopMode,
getKeyBindingObject
} from '-/reducers/settings';
import TaggingActions from '-/reducers/tagging-actions';
@@ -206,6 +208,7 @@ interface Props {
setLastSelectedEntry: (path: string) => void;
setSelectedEntries: (selectedEntries: Array<Object>) => void;
currentDirectoryPath: string | null;
+ isDesktopMode: boolean;
}
const EntryContainer = (props: Props) => {
@@ -653,154 +656,165 @@ const EntryContainer = (props: Props) => {
const renderFileToolbar = classes => (
<div className={classes.toolbar2}>
<div className={classes.flexLeft}>
- <IconButton
- title={i18n.t('core:toggleProperties')}
- aria-label={i18n.t('core:toggleProperties')}
- onClick={togglePanel}
- data-tid="fileContainerToggleProperties"
- >
- <DetailsIcon color={isPropPanelVisible ? 'primary' : 'action'} />
- </IconButton>
- <IconButton
- title={i18n.t('core:switchToFullscreen')}
- aria-label={i18n.t('core:switchToFullscreen')}
- data-tid="fileContainerSwitchToFullScreen"
- onClick={toggleFullScreen}
- >
- <FullScreenIcon />
- </IconButton>
- {AppConfig.isCordova && (
+ <Tooltip title={i18n.t('core:toggleProperties')}>
<IconButton
- title={i18n.t('core:shareFile')}
- aria-label={i18n.t('core:shareFile')}
- data-tid="shareFile"
- onClick={() => shareFile(`file:///${openedFile.path}`)}
+ // title={i18n.t('core:toggleProperties')}
+ aria-label={i18n.t('core:toggleProperties')}
+ onClick={togglePanel}
+ data-tid="fileContainerToggleProperties"
>
- <ShareIcon />
+ <DetailsIcon color={isPropPanelVisible ? 'primary' : 'action'} />
</IconButton>
- )}
- {!(PlatformIO.haveObjectStoreSupport() || AppConfig.isWeb) && (
+ </Tooltip>
+ <Tooltip title={i18n.t('core:switchToFullscreen')}>
<IconButton
- title={i18n.t('core:openFileExternally')}
- aria-label={i18n.t('core:openFileExternally')}
- onClick={openNatively}
+ // title={i18n.t('core:switchToFullscreen')}
+ aria-label={i18n.t('core:switchToFullscreen')}
+ data-tid="fileContainerSwitchToFullScreen"
+ onClick={toggleFullScreen}
>
- <OpenNativelyIcon />
+ <FullScreenIcon />
</IconButton>
+ </Tooltip>
+ {AppConfig.isCordova && (
+ <Tooltip title={i18n.t('core:shareFile')}>
+ <IconButton
+ // title={i18n.t('core:shareFile')}
+ aria-label={i18n.t('core:shareFile')}
+ data-tid="shareFile"
+ onClick={() => shareFile(`file:///${openedFile.path}`)}
+ >
+ <ShareIcon />
+ </IconButton>
+ </Tooltip>
)}
- <IconButton
- title={i18n.t('core:downloadFile')}
- aria-label={i18n.t('core:downloadFile')}
- onClick={() => {
- const entryName = `${baseName(
- openedFile.path,
- PlatformIO.getDirSeparator()
- )}`;
- const fileName = extractFileName(
- entryName,
- PlatformIO.getDirSeparator()
- );
+ {!(PlatformIO.haveObjectStoreSupport() || AppConfig.isWeb) && (
+ <Tooltip title={i18n.t('core:openFileExternally')}>
+ <IconButton
+ // title={i18n.t('core:openFileExternally')}
+ aria-label={i18n.t('core:openFileExternally')}
+ onClick={openNatively}
+ >
+ <OpenNativelyIcon />
+ </IconButton>
+ </Tooltip>
+ )}
+ <Tooltip title={i18n.t('core:downloadFile')}>
+ <IconButton
+ // title={i18n.t('core:downloadFile')}
+ aria-label={i18n.t('core:downloadFile')}
+ onClick={() => {
+ const entryName = `${baseName(
+ openedFile.path,
+ PlatformIO.getDirSeparator()
+ )}`;
+ const fileName = extractFileName(
+ entryName,
+ PlatformIO.getDirSeparator()
+ );
- if (AppConfig.isCordova) {
- if (openedFile.url) {
- downloadCordova(openedFile.url, entryName);
- } else {
- console.log('Can only download HTTP/HTTPS URIs');
- props.showNotification(
- i18n.t('core:cantDownloadLocalFile'),
- NotificationTypes.default
- );
- }
- } else {
- const downloadLink = document.getElementById('downloadFile');
- if (downloadLink) {
- if (AppConfig.isWeb) {
- // eslint-disable-next-line no-restricted-globals
- const { protocol } = location;
- // eslint-disable-next-line no-restricted-globals
- const { hostname } = location;
- // eslint-disable-next-line no-restricted-globals
- const { port } = location;
- const link = `${protocol}//${hostname}${
- port !== '' ? `:${port}` : ''
- }/${openedFile.path}`;
- downloadLink.setAttribute('href', link);
+ if (AppConfig.isCordova) {
+ if (openedFile.url) {
+ downloadCordova(openedFile.url, entryName);
} else {
- downloadLink.setAttribute(
- 'href',
- `file:///${openedFile.path}`
+ console.log('Can only download HTTP/HTTPS URIs');
+ props.showNotification(
+ i18n.t('core:cantDownloadLocalFile'),
+ NotificationTypes.default
);
}
+ } else {
+ const downloadLink = document.getElementById('downloadFile');
+ if (downloadLink) {
+ if (AppConfig.isWeb) {
+ // eslint-disable-next-line no-restricted-globals
+ const { protocol } = location;
+ // eslint-disable-next-line no-restricted-globals
+ const { hostname } = location;
+ // eslint-disable-next-line no-restricted-globals
+ const { port } = location;
+ const link = `${protocol}//${hostname}${
+ port !== '' ? `:${port}` : ''
+ }/${openedFile.path}`;
+ downloadLink.setAttribute('href', link);
+ } else {
+ downloadLink.setAttribute(
+ 'href',
+ `file:///${openedFile.path}`
+ );
+ }
- if (openedFile.url) {
- // mostly the s3 case
- downloadLink.setAttribute('target', '_blank');
- downloadLink.setAttribute('href', openedFile.url);
- }
+ if (openedFile.url) {
+ // mostly the s3 case
+ downloadLink.setAttribute('target', '_blank');
+ downloadLink.setAttribute('href', openedFile.url);
+ }
- downloadLink.setAttribute('download', fileName); // works only for same origin
- downloadLink.click();
+ downloadLink.setAttribute('download', fileName); // works only for same origin
+ downloadLink.click();
+ }
}
- }
- }}
- >
- <FileDownloadIcon />
- </IconButton>
- {/* !this.props.isReadOnlyMode && (
- <IconButton
- aria-label={i18n.t('core:duplicateFile')}
- title={i18n.t('core:duplicateFile')}
- onClick={() => {
- this.setState({ shouldCopyFile: true });
}}
>
- <CopyContentIcon />
+ <FileDownloadIcon />
</IconButton>
- ) */}
+ </Tooltip>
{!props.isReadOnlyMode && (
+ <Tooltip title={i18n.t('core:deleteEntry')}>
+ <IconButton
+ data-tid="deleteEntryTID"
+ // title={i18n.t('core:deleteEntry')}
+ aria-label={i18n.t('core:deleteEntry')}
+ onClick={() => setDeleteEntryModalOpened(true)}
+ >
+ <DeleteIcon />
+ </IconButton>
+ </Tooltip>
+ )}
+ <Tooltip title={i18n.t('core:reloadFile')}>
<IconButton
- data-tid="deleteEntryTID"
- title={i18n.t('core:deleteEntry')}
- aria-label={i18n.t('core:deleteEntry')}
- onClick={() => setDeleteEntryModalOpened(true)}
+ data-tid="reloadFileTID"
+ // title={i18n.t('core:reloadFile')}
+ aria-label={i18n.t('core:reloadFile')}
+ onClick={reloadDocument}
>
- <DeleteIcon />
+ <RefreshIcon />
</IconButton>
+ </Tooltip>
+ {props.isDesktopMode && (
+ <Tooltip title={i18n.t('core:openInFullWidth')}>
+ <IconButton
+ data-tid="openInFullWidthTID"
+ title={i18n.t('core:openInFullWidth')}
+ aria-label={i18n.t('core:openInFullWidth')}
+ onClick={props.toggleEntryFullWidth}
+ >
+ <ExpandIcon />
+ </IconButton>
+ </Tooltip>
)}
- <IconButton
- data-tid="reloadFileTID"
- title={i18n.t('core:reloadFile')}
- aria-label={i18n.t('core:reloadFile')}
- onClick={reloadDocument}
- >
- <RefreshIcon />
- </IconButton>
- <IconButton
- data-tid="openInFullWidthTID"
- title={i18n.t('core:openInFullWidth')}
- aria-label={i18n.t('core:openInFullWidth')}
- onClick={props.toggleEntryFullWidth}
- >
- <ExpandIcon />
- </IconButton>
</div>
<div className={classes.entryNavigationSection}>
- <IconButton
- title={i18n.t('core:openPrevFileTooltip')}
- aria-label={i18n.t('core:openPrevFileTooltip')}
- data-tid="fileContainerPrevFile"
- onClick={openPrevFile}
- >
- <ArrowLeftIcon />
- </IconButton>
- <IconButton
- title={i18n.t('core:openNextFileTooltip')}
- aria-label={i18n.t('core:openNextFileTooltip')}
- data-tid="fileContainerNextFile"
- onClick={openNextFile}
- >
- <ArrowRightIcon />
- </IconButton>
+ <Tooltip title={i18n.t('core:openPrevFileTooltip')}>
+ <IconButton
+ // title={i18n.t('core:openPrevFileTooltip')}
+ aria-label={i18n.t('core:openPrevFileTooltip')}
+ data-tid="fileContainerPrevFile"
+ onClick={openPrevFile}
+ >
+ <ArrowLeftIcon />
+ </IconButton>
+ </Tooltip>
+ <Tooltip title={i18n.t('core:openNextFileTooltip')}>
+ <IconButton
+ // title={i18n.t('core:openNextFileTooltip')}
+ aria-label={i18n.t('core:openNextFileTooltip')}
+ data-tid="fileContainerNextFile"
+ onClick={openNextFile}
+ >
+ <ArrowRightIcon />
+ </IconButton>
+ </Tooltip>
</div>
</div>
);
@@ -809,31 +823,35 @@ const EntryContainer = (props: Props) => {
<div className={props.classes.toolbar2}>
<div className={props.classes.flexLeft}>
{!(PlatformIO.haveObjectStoreSupport() || AppConfig.isWeb) && (
+ <Tooltip title={i18n.t('core:openDirectoryExternally')}>
+ <IconButton
+ // title={i18n.t('core:openDirectoryExternally')}
+ aria-label={i18n.t('core:openDirectoryExternally')}
+ onClick={openNatively}
+ >
+ <OpenNativelyIcon />
+ </IconButton>
+ </Tooltip>
+ )}
+ <Tooltip title={i18n.t('core:reloadDirectory')}>
<IconButton
- title={i18n.t('core:openDirectoryExternally')}
- aria-label={i18n.t('core:openDirectoryExternally')}
- onClick={openNatively}
+ // title={i18n.t('core:reloadDirectory')}
+ aria-label={i18n.t('core:reloadDirectory')}
+ onClick={reloadDocument}
>
- <OpenNativelyIcon />
+ <RefreshIcon />
</IconButton>
- )}
- <IconButton
- title={i18n.t('core:reloadDirectory')}
- aria-label={i18n.t('core:reloadDirectory')}
- onClick={reloadDocument}
- >
- <RefreshIcon />
- </IconButton>
+ </Tooltip>
{!props.isReadOnlyMode && (
- <div>
+ <Tooltip title={i18n.t('core:deleteDirectory')}>
<IconButton
- title={i18n.t('core:deleteDirectory')}
+ // title={i18n.t('core:deleteDirectory')}
aria-label={i18n.t('core:deleteDirectory')}
onClick={() => setDeleteEntryModalOpened(true)}
>
<DeleteIcon />
</IconButton>
- </div>
+ </Tooltip>
)}
</div>
</div>
@@ -1269,7 +1287,8 @@ function mapStateToProps(state) {
return {
settings: state.settings,
isReadOnlyMode: isReadOnlyMode(state),
- keyBindings: getKeyBindingObject(state)
+ keyBindings: getKeyBindingObject(state),
+ isDesktopMode: isDesktopMode(state)
};
}
diff --git a/app/components/dialogs/LocalForm.tsx b/app/components/dialogs/LocalForm.tsx
index bf8aa4c67..943781f18 100644
--- a/app/components/dialogs/LocalForm.tsx
+++ b/app/components/dialogs/LocalForm.tsx
@@ -89,6 +89,7 @@ const LocalForm = (props: Props) => {
margin="dense"
name="path"
fullWidth={true}
+ inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
data-tid="locationPath"
onChange={event => setPath(event.target.value)}
value={path}
@@ -115,6 +116,7 @@ const LocalForm = (props: Props) => {
required
margin="dense"
name="name"
+ inputProps={{ autoCorrect: 'off' }}
onChange={event => setName(event.target.value)}
value={name}
data-tid="locationName"
diff --git a/app/components/dialogs/ObjectStoreForm.tsx b/app/components/dialogs/ObjectStoreForm.tsx
index 6e092d020..2dc4ce80e 100644
--- a/app/components/dialogs/ObjectStoreForm.tsx
+++ b/app/components/dialogs/ObjectStoreForm.tsx
@@ -203,6 +203,7 @@ const ObjectStoreForm = (props: Props) => {
autoFocus
margin="dense"
name="storeName"
+ inputProps={{ autoCorrect: 'off' }}
fullWidth={true}
data-tid="locationName"
onChange={event => setStoreName(event.target.value)}
@@ -222,6 +223,7 @@ const ObjectStoreForm = (props: Props) => {
margin="dense"
name="storePath"
fullWidth={true}
+ inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
data-tid="locationPath"
onChange={event => setStorePath(event.target.value)}
value={storePath}
@@ -241,6 +243,7 @@ const ObjectStoreForm = (props: Props) => {
name="accessKeyId"
fullWidth={true}
data-tid="accessKeyId"
+ inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
onChange={event => setAccessKeyId(event.target.value)}
value={accessKeyId}
/>
@@ -260,6 +263,7 @@ const ObjectStoreForm = (props: Props) => {
type={showSecretAccessKey ? 'text' : 'password'}
fullWidth={true}
data-tid="secretAccessKey"
+ inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
onChange={event => setSecretAccessKey(event.target.value)}
value={secretAccessKey}
endAdornment={
@@ -290,6 +294,7 @@ const ObjectStoreForm = (props: Props) => {
name="bucketName"
fullWidth={true}
data-tid="bucketName"
+ inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
onChange={event => setBucketName(event.target.value)}
value={bucketName}
/>
diff --git a/app/perspectives/grid-perspective/components/MainContainer.tsx b/app/perspectives/grid-perspective/components/MainContainer.tsx
index 60a34ddfb..f6295db55 100644
--- a/app/perspectives/grid-perspective/components/MainContainer.tsx
+++ b/app/perspectives/grid-perspective/components/MainContainer.tsx
@@ -28,7 +28,8 @@ import { Tag } from '-/reducers/taglibrary';
import {
getSupportedFileTypes,
getDesktopMode,
- getKeyBindingObject
+ getKeyBindingObject,
+ isDesktopMode
} from '-/reducers/settings';
import { sortByCriteria, isObj, isVisibleOnScreen } from '-/utils/misc';
import styles from './styles.css';
@@ -97,6 +98,7 @@ interface Props {
autohide: boolean
) => void;
currentLocation: Location;
+ isDesktopMode: boolean;
}
interface State {
@@ -772,7 +774,8 @@ class GridPerspective extends React.Component<Props, State> {
directoryContent,
selectedEntries,
loadParentDirectoryContent,
- theme
+ theme,
+ isDesktopMode
} = this.props;
const { layoutType, entrySize, sortBy, orderBy } = this.state;
const selectedFilePaths = selectedEntries
@@ -823,6 +826,7 @@ class GridPerspective extends React.Component<Props, State> {
openDeleteFileDialog={this.openDeleteFileDialog}
handleSortingMenu={this.handleSortingMenu}
handleOptionsMenu={this.handleOptionsMenu}
+ isDesktopMode={isDesktopMode}
/>
<GlobalHotKeys keyMap={this.keyMap} handlers={this.keyBindingHandlers}>
<GridPagination
@@ -995,7 +999,8 @@ function mapStateToProps(state) {
desktopMode: getDesktopMode(state),
selectedEntries: getSelectedEntries(state),
keyBindings: getKeyBindingObject(state),
- currentLocation: getLocation(state, state.app.currentLocationId)
+ currentLocation: getLocation(state, state.app.currentLocationId),
+ isDesktopMode: isDesktopMode(state)
};
}
diff --git a/app/perspectives/grid-perspective/components/MainToolbar.tsx b/app/perspectives/grid-perspective/components/MainToolbar.tsx
index b4cdb5fd6..a3abc9c26 100644
--- a/app/perspectives/grid-perspective/components/MainToolbar.tsx
+++ b/app/perspectives/grid-perspective/components/MainToolbar.tsx
@@ -18,6 +18,7 @@
import React from 'react';
import Toolbar from '@material-ui/core/Toolbar';
+import Tooltip from '@material-ui/core/Tooltip';
import SettingsIcon from '@material-ui/icons/Settings';
import IconButton from '@material-ui/core/IconButton';
import ParentDirIcon from '@material-ui/icons/SubdirectoryArrowLeft';
@@ -46,6 +47,7 @@ interface Props {
handleSortingMenu: (event: Object) => void;
handleOptionsMenu: (event: Object) => void;
layoutType: string;
+ isDesktopMode: boolean;
}
const MainToolbar = (props: Props) => {
@@ -63,101 +65,122 @@ const MainToolbar = (props: Props) => {
openDeleteFileDialog,
fileOperationsEnabled,
handleSortingMenu,
- handleOptionsMenu
+ handleOptionsMenu,
+ isDesktopMode
} = props;
return (
<Toolbar className={classes.topToolbar} data-tid="perspectiveGridToolbar">
- <IconButton
- title={i18n.t('core:toggleSelectAllFiles')}
- data-tid="gridPerspectiveSelectAllFiles"
- onClick={toggleSelectAllFiles}
- >
- {allFilesSelected ? <SelectAllIcon /> : <DeSelectAllIcon />}
- </IconButton>
- <IconButton
- title={i18n.t('core:navigateToParentDirectory')}
- aria-label={i18n.t('core:navigateToParentDirectory')}
- data-tid="gridPerspectiveOnBackButton"
- onClick={loadParentDirectoryContent}
- >
- <ParentDirIcon />
- </IconButton>
- {layoutType === 'row' ? (
+ <Tooltip title={i18n.t('core:toggleSelectAllFiles')}>
<IconButton
- title={i18n.t('core:switchToGridView')}
- aria-label={i18n.t('core:switchToGridView')}
- data-tid="gridPerspectiveSwitchLayoutToGrid"
- onClick={() => {
- handleLayoutSwitch('grid');
- }}
+ // title={i18n.t('core:toggleSelectAllFiles')}
+ data-tid="gridPerspectiveSelectAllFiles"
+ onClick={toggleSelectAllFiles}
>
- <ViewGridIcon />
+ {allFilesSelected ? <SelectAllIcon /> : <DeSelectAllIcon />}
</IconButton>
+ </Tooltip>
+ {isDesktopMode && (
+ <Tooltip title={i18n.t('core:navigateToParentDirectory')}>
+ <IconButton
+ // title={i18n.t('core:navigateToParentDirectory')}
+ aria-label={i18n.t('core:navigateToParentDirectory')}
+ data-tid="gridPerspectiveOnBackButton"
+ onClick={loadParentDirectoryContent}
+ >
+ <ParentDirIcon />
+ </IconButton>
+ </Tooltip>
+ )}
+ {layoutType === 'row' ? (
+ <Tooltip title={i18n.t('core:switchToGridView')}>
+ <IconButton
+ title={i18n.t('core:switchToGridView')}
+ aria-label={i18n.t('core:switchToGridView')}
+ data-tid="gridPerspectiveSwitchLayoutToGrid"
+ onClick={() => {
+ handleLayoutSwitch('grid');
+ }}
+ >
+ <ViewGridIcon />
+ </IconButton>
+ </Tooltip>
) : (
- <IconButton
- title={i18n.t('core:switchToListView')}
- aria-label={i18n.t('core:switchToListView')}
- data-tid="gridPerspectiveSwitchLayoutToRow"
- onClick={() => {
- handleLayoutSwitch('row');
- }}
- >
- <ViewListIcon />
- </IconButton>
+ <Tooltip title={i18n.t('core:switchToListView')}>
+ <IconButton
+ title={i18n.t('core:switchToListView')}
+ aria-label={i18n.t('core:switchToListView')}
+ data-tid="gridPerspectiveSwitchLayoutToRow"
+ onClick={() => {
+ handleLayoutSwitch('row');
+ }}
+ >
+ <ViewListIcon />
+ </IconButton>
+ </Tooltip>
)}
{!isReadOnlyMode && (
- <IconButton
- title={i18n.t('core:tagSelectedEntries')}
- aria-label={i18n.t('core:tagSelectedEntries')}
- data-tid="gridPerspectiveAddRemoveTags"
- disabled={selectedEntries.length < 1}
- onClick={openAddRemoveTagsDialog}
- >
- <TagIcon />
- </IconButton>
+ <Tooltip title={i18n.t('core:tagSelectedEntries')}>
+ <IconButton
+ title={i18n.t('core:tagSelectedEntries')}
+ aria-label={i18n.t('core:tagSelectedEntries')}
+ data-tid="gridPerspectiveAddRemoveTags"
+ disabled={selectedEntries.length < 1}
+ onClick={openAddRemoveTagsDialog}
+ >
+ <TagIcon />
+ </IconButton>
+ </Tooltip>
+ )}
+ {!isReadOnlyMode && (
+ <Tooltip title={i18n.t('core:copyMoveSelectedEntries')}>
+ <IconButton
+ title={i18n.t('core:copyMoveSelectedEntries')}
+ aria-label={i18n.t('core:copyMoveSelectedEntries')}
+ data-tid="gridPerspectiveCopySelectedFiles"
+ disabled={!fileOperationsEnabled}
+ onClick={openMoveCopyFilesDialog}
+ >
+ <CopyIcon />
+ </IconButton>
+ </Tooltip>
)}
{!isReadOnlyMode && (
+ <Tooltip title={i18n.t('core:deleteSelectedEntries')}>
+ <IconButton
+ title={i18n.t('core:deleteSelectedEntries')}
+ aria-label={i18n.t('core:deleteSelectedEntries')}
+ data-tid="gridPerspectiveDeleteMultipleFiles"
+ disabled={!fileOperationsEnabled}
+ onClick={openDeleteFileDialog}
+ >
+ <DeleteIcon />
+ </IconButton>
+ </Tooltip>
+ )}
+ <Tooltip title={i18n.t('core:sort')}>
<IconButton
- title={i18n.t('core:copyMoveSelectedEntries')}
- aria-label={i18n.t('core:copyMoveSelectedEntries')}
- data-tid="gridPerspectiveCopySelectedFiles"
- disabled={!fileOperationsEnabled}
- onClick={openMoveCopyFilesDialog}
+ title={i18n.t('core:sort')}
+ aria-label={i18n.t('core:sort')}
+ data-tid="gridPerspectiveSortMenu"
+ onClick={e => {
+ handleSortingMenu(e);
+ }}
>
- <CopyIcon />
+ <SwapVertIcon />
</IconButton>
- )}
- {!isReadOnlyMode && (
+ </Tooltip>
+ <Tooltip title={i18n.t('core:options')}>
<IconButton
- title={i18n.t('core:deleteSelectedEntries')}
- aria-label={i18n.t('core:deleteSelectedEntries')}
- data-tid="gridPerspectiveDeleteMultipleFiles"
- disabled={!fileOperationsEnabled}
- onClick={openDeleteFileDialog}
+ title={i18n.t('core:options')}
+ data-tid="gridPerspectiveOptionsMenu"
+ onClick={e => {
+ handleOptionsMenu(e);
+ }}
>
- <DeleteIcon />
+ <SettingsIcon />
</IconButton>
- )}
- <IconButton
- title={i18n.t('core:sort')}
- aria-label={i18n.t('core:sort')}
- data-tid="gridPerspectiveSortMenu"
- onClick={e => {
- handleSortingMenu(e);
- }}
- >
- <SwapVertIcon />
- </IconButton>
- <IconButton
- title={i18n.t('core:options')}
- data-tid="gridPerspectiveOptionsMenu"
- onClick={e => {
- handleOptionsMenu(e);
- }}
- >
- <SettingsIcon />
- </IconButton>
+ </Tooltip>
</Toolbar>
);
};