TagSpaces is an offline, open source, document manager with tagging support
chore: optimization of button position in the entry properties toolbar
Ilian Sapundshiev3a372c50c4ab
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsxindex 58af9c440..00b4c019c 100644--- a/app/components/EntryContainer.tsx+++ b/app/components/EntryContainer.tsx@@ -728,64 +728,6 @@ function EntryContainer(props: Props) {<DetailsIcon color={isPropPanelVisible ? 'primary' : 'action'} /></IconButton></Tooltip>- <Tooltip title={i18n.t('core:switchToFullscreen')}>- <IconButton- aria-label={i18n.t('core:switchToFullscreen')}- data-tid="fileContainerSwitchToFullScreen"- onClick={toggleFullScreen}- size="large"- >- <FullScreenIcon />- </IconButton>- </Tooltip>- <Tooltip title={i18n.t('core:navigateToParentDirectory')}>- <IconButton- aria-label={i18n.t('core:navigateToParentDirectory')}- onClick={navigateToFolder}- style={{ transform: 'rotate(-90deg)' }}- size="large"- >- <OpenNewWindowIcon />- </IconButton>- </Tooltip>- {!AppConfig.isCordova && (- <Tooltip title={i18n.t('core:openInWindow')}>- <IconButton- aria-label={i18n.t('core:openInWindow')}- onClick={openInNewWindow}- size="large"- >- <OpenNewWindowIcon />- </IconButton>- </Tooltip>- )}- {AppConfig.isCordova && (- <Tooltip title={i18n.t('core:shareFile')}>- <IconButton- aria-label={i18n.t('core:shareFile')}- data-tid="shareFile"- onClick={() => shareFile(`file:///${openedFile.path}`)}- size="large"- >- <ShareIcon />- </IconButton>- </Tooltip>- )}- {!(- PlatformIO.haveObjectStoreSupport() ||- PlatformIO.haveWebDavSupport() ||- AppConfig.isWeb- ) && (- <Tooltip title={i18n.t('core:openFileExternally')}>- <IconButton- aria-label={i18n.t('core:openFileExternally')}- onClick={openNatively}- size="large"- >- <OpenNativelyIcon />- </IconButton>- </Tooltip>- )}<Tooltip title={i18n.t('core:downloadFile')}><IconButtonaria-label={i18n.t('core:downloadFile')}@@ -846,15 +788,76 @@ function EntryContainer(props: Props) {<FileDownloadIcon /></IconButton></Tooltip>- {!props.isReadOnlyMode && (- <Tooltip title={i18n.t('core:deleteEntry')}>+ <Tooltip title={i18n.t('core:switchToFullscreen')}>+ <IconButton+ aria-label={i18n.t('core:switchToFullscreen')}+ data-tid="fileContainerSwitchToFullScreen"+ onClick={toggleFullScreen}+ size="large"+ >+ <FullScreenIcon />+ </IconButton>+ </Tooltip>+ {props.isDesktopMode && (+ <Tooltip title={i18n.t('core:openInFullWidth')}><IconButton- data-tid="deleteEntryTID"- aria-label={i18n.t('core:deleteEntry')}- onClick={() => setDeleteEntryModalOpened(true)}+ data-tid="openInFullWidthTID"+ aria-label={i18n.t('core:openInFullWidth')}+ onClick={() => {+ props.toggleEntryFullWidth();+ closePanel();+ }}size="large">- <DeleteIcon />+ <ExpandIcon />+ </IconButton>+ </Tooltip>+ )}+ <Tooltip title={i18n.t('core:navigateToParentDirectory')}>+ <IconButton+ aria-label={i18n.t('core:navigateToParentDirectory')}+ onClick={navigateToFolder}+ style={{ transform: 'rotate(-90deg)' }}+ size="large"+ >+ <OpenNewWindowIcon />+ </IconButton>+ </Tooltip>+ {!AppConfig.isCordova && (+ <Tooltip title={i18n.t('core:openInWindow')}>+ <IconButton+ aria-label={i18n.t('core:openInWindow')}+ onClick={openInNewWindow}+ size="large"+ >+ <OpenNewWindowIcon />+ </IconButton>+ </Tooltip>+ )}+ {AppConfig.isCordova && (+ <Tooltip title={i18n.t('core:shareFile')}>+ <IconButton+ aria-label={i18n.t('core:shareFile')}+ data-tid="shareFile"+ onClick={() => shareFile(`file:///${openedFile.path}`)}+ size="large"+ >+ <ShareIcon />+ </IconButton>+ </Tooltip>+ )}+ {!(+ PlatformIO.haveObjectStoreSupport() ||+ PlatformIO.haveWebDavSupport() ||+ AppConfig.isWeb+ ) && (+ <Tooltip title={i18n.t('core:openFileExternally')}>+ <IconButton+ aria-label={i18n.t('core:openFileExternally')}+ onClick={openNatively}+ size="large"+ >+ <OpenNativelyIcon /></IconButton></Tooltip>)}@@ -868,18 +871,15 @@ function EntryContainer(props: Props) {<RefreshIcon /></IconButton></Tooltip>- {props.isDesktopMode && (- <Tooltip title={i18n.t('core:openInFullWidth')}>+ {!props.isReadOnlyMode && (+ <Tooltip title={i18n.t('core:deleteEntry')}><IconButton- data-tid="openInFullWidthTID"- aria-label={i18n.t('core:openInFullWidth')}- onClick={() => {- props.toggleEntryFullWidth();- closePanel();- }}+ data-tid="deleteEntryTID"+ aria-label={i18n.t('core:deleteEntry')}+ onClick={() => setDeleteEntryModalOpened(true)}size="large">- <ExpandIcon />+ <DeleteIcon /></IconButton></Tooltip>)}