Skip to content

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

chore: renaming component Tooltip to TsTooltip

Ilian Sapundshiev6678e2c99918
diff --git a/src/renderer/components/CustomLogo.tsx b/src/renderer/components/CustomLogo.tsx
index f62fca948..ee1814a7c 100644
--- a/src/renderer/components/CustomLogo.tsx
+++ b/src/renderer/components/CustomLogo.tsx
@@ -19,7 +19,7 @@
import AppConfig from '-/AppConfig';
import LogoIcon from '-/assets/icons/icon.png';
// import TextLogoIcon from '-/assets/images/text-logo.svg';
-import Tooltip from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsIconButton from '-/components/TsIconButton';
import { useAboutDialogContext } from '-/components/dialogs/hooks/useAboutDialogContext';
import { isUpdateAvailable } from '-/reducers/app';
@@ -59,7 +59,7 @@ function CustomLogo() {
} as React.CSSProperties
}
>
- <Tooltip
+ <TsTooltip
title={updateAvailable ? t('core:newVersionAvailable') : tsAboutTitle}
placeCloser
>
@@ -142,7 +142,7 @@ function CustomLogo() {
</>
)}
</Badge>
- </Tooltip>
+ </TsTooltip>
</Box>
);
}
diff --git a/src/renderer/components/EditDescriptionButtons.tsx b/src/renderer/components/EditDescriptionButtons.tsx
index 22f5ce478..c8e3f5a27 100644
--- a/src/renderer/components/EditDescriptionButtons.tsx
+++ b/src/renderer/components/EditDescriptionButtons.tsx
@@ -19,7 +19,7 @@
import AppConfig from '-/AppConfig';
import { MoreMenuIcon } from '-/components/CommonIcons';
import { ProTooltip } from '-/components/HelperComponents';
-import Tooltip from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsButton from '-/components/TsButton';
import TsIconButton from '-/components/TsIconButton';
import AiGenDescButton from '-/components/chat/AiGenDescButton';
@@ -127,7 +127,7 @@ const EditDescriptionButtons: React.FC<ButtonsProps> = ({
};
const descrChangedMarker = isDescriptionChanged ? (
- <Tooltip title={t('core:fileChanged')}>
+ <TsTooltip title={t('core:fileChanged')}>
<span
data-tid="descriptionChangedTID"
style={{
@@ -138,7 +138,7 @@ const EditDescriptionButtons: React.FC<ButtonsProps> = ({
>
{String.fromCharCode(0x25cf)}
</span>
- </Tooltip>
+ </TsTooltip>
) : null;
return (
@@ -166,7 +166,7 @@ const EditDescriptionButtons: React.FC<ButtonsProps> = ({
{t('core:cancel')}
</TsButton>
)}
- <Tooltip
+ <TsTooltip
arrow
placement="top"
title={!isEditDescriptionMode ? t('core:editDescription') : ''}
@@ -209,7 +209,7 @@ const EditDescriptionButtons: React.FC<ButtonsProps> = ({
t('core:editDescription')
)}
</TsButton>
- </Tooltip>
+ </TsTooltip>
</ButtonGroup>
<ProTooltip
tooltip={'Add AI generated description based on the file content'}
diff --git a/src/renderer/components/EditSearchQuery.tsx b/src/renderer/components/EditSearchQuery.tsx
index 7347415a4..fdf823eeb 100644
--- a/src/renderer/components/EditSearchQuery.tsx
+++ b/src/renderer/components/EditSearchQuery.tsx
@@ -33,7 +33,7 @@ import {
VideoIcon,
} from '-/components/CommonIcons';
import TagsSelect from '-/components/TagsSelect';
-import TooltipTS from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsDatePicker from '-/components/TsDatePicker';
import TsIconButton from '-/components/TsIconButton';
import TsSelect from '-/components/TsSelect';
@@ -207,7 +207,7 @@ function EditSearchQuery(props: Props) {
input: {
endAdornment: (
<InputAdornment position="end">
- <TooltipTS
+ <TsTooltip
title={
<>
<Typography
@@ -256,7 +256,7 @@ function EditSearchQuery(props: Props) {
}
>
<InfoTooltipIcon />
- </TooltipTS>
+ </TsTooltip>
</InputAdornment>
),
},
@@ -639,7 +639,7 @@ function EditSearchQuery(props: Props) {
</TsSelect>
</FormControl>
<FormControl>
- <TooltipTS title={t('enterTimePeriodTooltip')}>
+ <TsTooltip title={t('enterTimePeriodTooltip')}>
<LocalizationProvider dateAdapter={AdapterDateFns}>
<Box
sx={{
@@ -689,7 +689,7 @@ function EditSearchQuery(props: Props) {
</div>
</Box>
</LocalizationProvider>
- </TooltipTS>
+ </TsTooltip>
</FormControl>
</Stack>
);
diff --git a/src/renderer/components/EntryContainerButtons.tsx b/src/renderer/components/EntryContainerButtons.tsx
index eaf40b6c0..ea99ae196 100644
--- a/src/renderer/components/EntryContainerButtons.tsx
+++ b/src/renderer/components/EntryContainerButtons.tsx
@@ -27,7 +27,8 @@ import { useOpenedEntryContext } from '-/hooks/useOpenedEntryContext';
import TsSwitch from '-/components/TsSwitch';
import { Pro } from '-/pro';
import { isDesktopMode, isRevisionsEnabled } from '-/reducers/settings';
-import { Box, ButtonGroup, Tooltip } from '@mui/material';
+import { Box, ButtonGroup } from '@mui/material';
+import TsTooltip from '-/components/TsTooltip';
import React from 'react';
import { useTranslation } from 'react-i18next';
import { useSelector } from 'react-redux';
@@ -71,7 +72,7 @@ function EntryContainerButtons(props: EntryContainerButtonsProps) {
};
const autoSave = isEditable(openedEntry) && revisionsEnabled && (
- <Tooltip
+ <TsTooltip
title={
t('core:autosave') +
(!Pro ? ' - ' + t('core:thisFunctionalityIsAvailableInPro') : '')
@@ -87,7 +88,7 @@ function EntryContainerButtons(props: EntryContainerButtonsProps) {
disabled={!Pro}
/>
</span>
- </Tooltip>
+ </TsTooltip>
);
const startSavingFile = () => {
@@ -142,7 +143,7 @@ function EntryContainerButtons(props: EntryContainerButtonsProps) {
</TsButton>
{fileChanged && (
- <Tooltip
+ <TsTooltip
title={
t('core:saveFile') +
' (' +
@@ -165,7 +166,7 @@ function EntryContainerButtons(props: EntryContainerButtonsProps) {
>
{t('core:save')}
</TsButton>
- </Tooltip>
+ </TsTooltip>
)}
</ButtonGroup>
);
diff --git a/src/renderer/components/EntryContainerTabs.tsx b/src/renderer/components/EntryContainerTabs.tsx
index d1e51ff3b..fb5ba8ec5 100644
--- a/src/renderer/components/EntryContainerTabs.tsx
+++ b/src/renderer/components/EntryContainerTabs.tsx
@@ -19,7 +19,7 @@
import AppConfig from '-/AppConfig';
import EntryContainerButtons from '-/components/EntryContainerButtons';
import LoadingLazy from '-/components/LoadingLazy';
-import TooltipTS from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsTabPanel from '-/components/TsTabPanel';
import { TabItem, TabNames } from '-/hooks/EntryPropsTabsContextProvider';
import { useChatContext } from '-/hooks/useChatContext';
@@ -193,7 +193,7 @@ function EntryContainerTabs(props: EntryContainerTabsProps) {
key={'key' + tab.name + index}
data-tid={tab.name + 'TID'}
icon={
- <TooltipTS arrow={false} title={tab.badgeTooltip}>
+ <TsTooltip arrow={false} title={tab.badgeTooltip}>
<Badge
color="primary"
variant="dot"
@@ -205,7 +205,7 @@ function EntryContainerTabs(props: EntryContainerTabsProps) {
>
{tab.icon}
</Badge>
- </TooltipTS>
+ </TsTooltip>
}
label={tab.title}
sx={{
diff --git a/src/renderer/components/EntryContainerTitle.tsx b/src/renderer/components/EntryContainerTitle.tsx
index d929a564a..886a765bc 100644
--- a/src/renderer/components/EntryContainerTitle.tsx
+++ b/src/renderer/components/EntryContainerTitle.tsx
@@ -26,7 +26,7 @@ import {
import EntryContainerMenu from '-/components/EntryContainerMenu';
import FileExtBadge from '-/components/FileExtBadge';
import TagsPreview from '-/components/TagsPreview';
-import TooltipTS from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsIconButton from '-/components/TsIconButton';
import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';
import { useOpenedEntryContext } from '-/hooks/useOpenedEntryContext';
@@ -154,7 +154,7 @@ function EntryContainerTitle(props: Props) {
{openedEntry.isFile ? (
<>
{fileChanged ? (
- <TooltipTS title={t('core:fileChanged')}>
+ <TsTooltip title={t('core:fileChanged')}>
<Box
sx={{
color: theme.palette.text.primary,
@@ -163,7 +163,7 @@ function EntryContainerTitle(props: Props) {
>
{String.fromCharCode(0x25cf)}
</Box>
- </TooltipTS>
+ </TsTooltip>
) : (
''
)}
@@ -230,14 +230,14 @@ function EntryContainerTitle(props: Props) {
}}
>
{openedEntry.isEncrypted && (
- <TooltipTS title={t('core:encryptedTooltip')}>
+ <TsTooltip title={t('core:encryptedTooltip')}>
<Box
component="span"
sx={{ display: 'inline-block', verticalAlign: 'middle' }}
>
<EncryptedIcon fontSize="small" />
</Box>
- </TooltipTS>
+ </TsTooltip>
)}
{fileTitle}
<TagsPreview
diff --git a/src/renderer/components/EntryProperties.tsx b/src/renderer/components/EntryProperties.tsx
index 030cb32bd..2e35a139c 100644
--- a/src/renderer/components/EntryProperties.tsx
+++ b/src/renderer/components/EntryProperties.tsx
@@ -38,7 +38,7 @@ import NoTileServer from '-/components/NoTileServer';
import PerspectiveSelector from '-/components/PerspectiveSelector';
import TagDropContainer from '-/components/TagDropContainer';
import TagsSelect from '-/components/TagsSelect';
-import Tooltip from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TransparentBackground from '-/components/TransparentBackground';
import TsButton from '-/components/TsButton';
import TsIconButton from '-/components/TsIconButton';
@@ -703,7 +703,7 @@ function EntryProperties({ tileServer }: Props) {
)}
<Grid size={12}>
- <Tooltip
+ <TsTooltip
title={
!location?.haveObjectStoreSupport() &&
dirProps.current &&
@@ -747,7 +747,7 @@ function EntryProperties({ tileServer }: Props) {
},
}}
/>
- </Tooltip>
+ </TsTooltip>
</Grid>
<Grid size={12}>
diff --git a/src/renderer/components/FolderContainer.tsx b/src/renderer/components/FolderContainer.tsx
index b76aae2b8..de39a3e14 100644
--- a/src/renderer/components/FolderContainer.tsx
+++ b/src/renderer/components/FolderContainer.tsx
@@ -21,7 +21,7 @@ import { BetaLabel } from '-/components/HelperComponents';
import PathBreadcrumbs from '-/components/PathBreadcrumbs';
import RenderPerspective from '-/components/RenderPerspective';
import SearchBox from '-/components/SearchBox';
-import Tooltip from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsButton from '-/components/TsButton';
import TsIconButton from '-/components/TsIconButton';
import TsMenuList from '-/components/TsMenuList';
@@ -193,14 +193,14 @@ function FolderContainer({ toggleDrawer, drawerOpened, hidden }: Props) {
border: `1px solid ${theme.palette.divider}`,
}}
>
- <Tooltip
+ <TsTooltip
title={
perspective.title +
(perspective.beta ? ' ' + t('core:betaStatus').toUpperCase() : '')
}
>
<Box sx={{ display: 'flex' }}>{perspective.icon}</Box>
- </Tooltip>
+ </TsTooltip>
</TsToggleButton>
)),
[
diff --git a/src/renderer/components/HelperComponents.tsx b/src/renderer/components/HelperComponents.tsx
index 26debedab..fecc6ed11 100644
--- a/src/renderer/components/HelperComponents.tsx
+++ b/src/renderer/components/HelperComponents.tsx
@@ -19,12 +19,12 @@
import { Pro } from '-/pro';
import Typography from '@mui/material/Typography';
import { useTranslation } from 'react-i18next';
-import TooltipTS from './Tooltip';
+import TsTooltip from './TsTooltip';
export function BetaLabel() {
const { t } = useTranslation();
return (
- <TooltipTS title={t('featureInBetaStatus')}>
+ <TsTooltip title={t('featureInBetaStatus')}>
<Typography sx={{ display: 'initial' }}>
<sup
style={{ marginLeft: 5, textTransform: 'uppercase', fontSize: 11 }}
@@ -32,7 +32,7 @@ export function BetaLabel() {
{t('betaStatus')}
</sup>
</Typography>
- </TooltipTS>
+ </TsTooltip>
);
}
@@ -40,11 +40,11 @@ export function ProLabel() {
const { t } = useTranslation();
return (
!Pro && (
- <TooltipTS title={t('thisFunctionalityIsAvailableInPro')}>
+ <TsTooltip title={t('thisFunctionalityIsAvailableInPro')}>
<Typography sx={{ display: 'initial' }}>
<sup style={{ marginLeft: 5, fontSize: 11 }}>PRO</sup>
</Typography>
- </TooltipTS>
+ </TsTooltip>
)
);
}
@@ -53,7 +53,7 @@ export function ProSign() {
const { t } = useTranslation();
return (
!Pro && (
- <TooltipTS title={t('thisFunctionalityIsAvailableInPro')}>
+ <TsTooltip title={t('thisFunctionalityIsAvailableInPro')}>
<Typography sx={{ display: 'initial' }}>
<sup
style={{
@@ -66,7 +66,7 @@ export function ProSign() {
PRO
</sup>
</Typography>
- </TooltipTS>
+ </TsTooltip>
)
);
}
@@ -80,12 +80,12 @@ export function ProTooltip(props) {
? tooltip + ' - ' + t('thisFunctionalityIsAvailableInPro')
: t('thisFunctionalityIsAvailableInPro');
return (
- <TooltipTS
+ <TsTooltip
arrow
placement={tooltipPlacement}
title={Pro ? proTooltip : noProTooltip}
>
<div style={{ display: 'flex' }} children={children}></div>
- </TooltipTS>
+ </TsTooltip>
);
}
diff --git a/src/renderer/components/HowToStart.tsx b/src/renderer/components/HowToStart.tsx
index c0e4cbe41..32e2a6018 100644
--- a/src/renderer/components/HowToStart.tsx
+++ b/src/renderer/components/HowToStart.tsx
@@ -17,7 +17,7 @@
*/
import { ProSign } from '-/components/HelperComponents';
-import Tooltip from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsButton from '-/components/TsButton';
import { AppDispatch } from '-/reducers/app';
import { actions as SettingsActions } from '-/reducers/settings';
@@ -351,7 +351,7 @@ function HowToStart() {
>
{t('core:htsGetStarted')}
</Typography>
- <Tooltip title={t('core:htsHideGuide')}>
+ <TsTooltip title={t('core:htsHideGuide')}>
<IconButton
size="small"
data-tid="hideHowToStartTID"
@@ -363,7 +363,7 @@ function HowToStart() {
>
<VisibilityOffIcon fontSize="small" />
</IconButton>
- </Tooltip>
+ </TsTooltip>
</Box>
<Stepper activeStep={activeStep} orientation="vertical">
{steps.map((step, index) => (
diff --git a/src/renderer/components/InfoIcon.tsx b/src/renderer/components/InfoIcon.tsx
index 13256c7f8..a97abb164 100644
--- a/src/renderer/components/InfoIcon.tsx
+++ b/src/renderer/components/InfoIcon.tsx
@@ -17,7 +17,7 @@
*/
import { ReactNode } from 'react';
-import Tooltip from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import HelpOutlined from '@mui/icons-material/NotListedLocationOutlined';
interface Props {
@@ -30,9 +30,9 @@ function InfoIcon(props: Props) {
return <></>;
}
return (
- <Tooltip title={tooltip}>
+ <TsTooltip title={tooltip}>
<HelpOutlined fontSize="small" sx={{ opacity: '0.7' }} />
- </Tooltip>
+ </TsTooltip>
);
}
diff --git a/src/renderer/components/LinksTab.tsx b/src/renderer/components/LinksTab.tsx
index 4841862ec..b8d03c492 100644
--- a/src/renderer/components/LinksTab.tsx
+++ b/src/renderer/components/LinksTab.tsx
@@ -40,7 +40,7 @@ import { useEffect, useReducer, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { useSelector } from 'react-redux';
import InfoIcon from './InfoIcon';
-import TooltipTS from './Tooltip';
+import TsTooltip from './TsTooltip';
interface Props {}
@@ -147,9 +147,9 @@ function LinksTab(props: Props) {
onClick={() => openLink(url, { fullWidth: false })}
variant="text"
startIcon={
- <TooltipTS title={link.type}>
+ <TsTooltip title={link.type}>
<LinkIcon />
- </TooltipTS>
+ </TsTooltip>
}
sx={{
marginRight: AppConfig.defaultSpaceBetweenButtons,
@@ -188,9 +188,9 @@ function LinksTab(props: Props) {
onClick={() => openLink(sharingLink, { fullWidth: false })}
variant="text"
startIcon={
- <TooltipTS title={fsEntry.path}>
+ <TsTooltip title={fsEntry.path}>
<LinkIcon />
- </TooltipTS>
+ </TsTooltip>
}
sx={{
marginRight: AppConfig.defaultSpaceBetweenButtons,
diff --git a/src/renderer/components/LocationView.tsx b/src/renderer/components/LocationView.tsx
index 19cf2bd3d..b45f6da34 100644
--- a/src/renderer/components/LocationView.tsx
+++ b/src/renderer/components/LocationView.tsx
@@ -29,7 +29,7 @@ import DirectoryTreeView, {
SubFolder,
} from '-/components/DirectoryTreeView';
import TargetFileBox from '-/components/TargetFileBox';
-import Tooltip from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsIconButton from '-/components/TsIconButton';
import { useFileUploadDialogContext } from '-/components/dialogs/hooks/useFileUploadDialogContext';
import { useMenuContext } from '-/components/dialogs/hooks/useMenuContext';
@@ -290,13 +290,13 @@ function LocationView(props: Props) {
data-tid="locationTitleElement"
noWrap
>
- <Tooltip title={locationNameTitle}>
+ <TsTooltip title={locationNameTitle}>
<>{location.name}</>
- </Tooltip>
+ </TsTooltip>
{workspace && (
- <Tooltip title={t('core:workspace') + ': ' + workspace.fullName}>
+ <TsTooltip title={t('core:workspace') + ': ' + workspace.fullName}>
<>{' - ' + workspace.shortName}</>
- </Tooltip>
+ </TsTooltip>
)}
</Typography>
</Box>
@@ -348,7 +348,7 @@ function LocationView(props: Props) {
}}
onClick={handleLocationIconClick}
>
- <Tooltip
+ <TsTooltip
title={
showOfflineIndicator
? t('core:remoteLocationOfflineTooltip')
@@ -373,7 +373,7 @@ function LocationView(props: Props) {
<LocalLocationIcon sx={{ cursor: 'pointer' }} />
)}
</Badge>
- </Tooltip>
+ </TsTooltip>
</ListItemIcon>
<ListItemText>
{isCloudLocation && !AppConfig.isElectron ? (
@@ -390,9 +390,9 @@ function LocationView(props: Props) {
)}
</ListItemText>
{subFolderLocation?.isDefault && (
- <Tooltip title={t('core:thisIsStartupLocation')}>
+ <TsTooltip title={t('core:thisIsStartupLocation')}>
<DefaultLocationIcon data-tid="startupIndication" />
- </Tooltip>
+ </TsTooltip>
)}
<TsIconButton
aria-label={t('core:options')}
diff --git a/src/renderer/components/PathBreadcrumbs.tsx b/src/renderer/components/PathBreadcrumbs.tsx
index d502275d3..2bafb71a2 100644
--- a/src/renderer/components/PathBreadcrumbs.tsx
+++ b/src/renderer/components/PathBreadcrumbs.tsx
@@ -22,7 +22,7 @@ import {
LocalLocationIcon,
MoreMenuIcon,
} from '-/components/CommonIcons';
-import Tooltip from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import { useMenuContext } from '-/components/dialogs/hooks/useMenuContext';
import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';
import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
@@ -166,7 +166,10 @@ function PathBreadcrumbs(props: Props) {
);
const icon = index === 0 ? locationTypeIcon : undefined;
return (
- <Tooltip key={pathPart} title={t('core:navigateTo') + ' ' + pathPart}>
+ <TsTooltip
+ key={pathPart}
+ title={t('core:navigateTo') + ' ' + pathPart}
+ >
<StyledBreadcrumb
component="a"
href="#"
@@ -174,13 +177,13 @@ function PathBreadcrumbs(props: Props) {
icon={icon}
onClick={() => openDirectory(pathPart)}
/>
- </Tooltip>
+ </TsTooltip>
);
});
}
if (currentLocation) {
const curDirBreadcrumb = (
- <Tooltip
+ <TsTooltip
key="lastBreadcrumb"
title={
t('core:openDirectoryMenu') + ' - ' + (currentDirectory?.path || '')
@@ -196,7 +199,7 @@ function PathBreadcrumbs(props: Props) {
onContextMenu={openDirMenu}
sx={{ marginRight: '2px' }}
/>
- </Tooltip>
+ </TsTooltip>
);
return [...breadcrumbs, curDirBreadcrumb];
}
diff --git a/src/renderer/components/RenderHistory.tsx b/src/renderer/components/RenderHistory.tsx
index de88e279f..d1ad4d11f 100644
--- a/src/renderer/components/RenderHistory.tsx
+++ b/src/renderer/components/RenderHistory.tsx
@@ -46,7 +46,7 @@ import {
} from '@tagspaces/tagspaces-common/paths';
import React, { useCallback, useContext, useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
-import TooltipTS from './Tooltip';
+import TsTooltip from './TsTooltip';
import TsMenuList from './TsMenuList';
interface Props {
@@ -187,7 +187,7 @@ function RenderHistory({
}}
onClick={() => openHistoryItem(item as TS.HistoryItem)}
>
- <TooltipTS
+ <TsTooltip
title={
<span>
<b>{t('core:filePath')}:</b> {item.path}
@@ -206,8 +206,8 @@ function RenderHistory({
) : (
<HistoryIcon />
)}
- </TooltipTS>
- <TooltipTS title={itemName}>
+ </TsTooltip>
+ <TsTooltip title={itemName}>
<Box
sx={{
whiteSpace: 'nowrap',
@@ -221,7 +221,7 @@ function RenderHistory({
>
{itemName}
</Box>
- </TooltipTS>
+ </TsTooltip>
</TsButton>
{showMenu && (
<TsIconButton
diff --git a/src/renderer/components/SearchAutocomplete.tsx b/src/renderer/components/SearchAutocomplete.tsx
index 9853dc037..f442d2db8 100644
--- a/src/renderer/components/SearchAutocomplete.tsx
+++ b/src/renderer/components/SearchAutocomplete.tsx
@@ -38,7 +38,7 @@ import {
scope,
} from '-/components/SearchOptions';
import { getSearchOptions } from '-/components/SearchOptionsMenu';
-import Tooltip from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsButton from '-/components/TsButton';
import TsIconButton from '-/components/TsIconButton';
import TsTextField from '-/components/TsTextField';
@@ -461,7 +461,7 @@ function SearchAutocomplete(props: Props) {
function HelpTooltip(hClasses) {
return (
- <Tooltip
+ <TsTooltip
title={
<Box sx={{ fontSize: '14px' }}>
The search query consists of a tag part and a search term. This term
@@ -497,7 +497,7 @@ function SearchAutocomplete(props: Props) {
<TsIconButton edge="end">
<HelpOutlineIcon sx={{ color: 'lightgray' }} />
</TsIconButton>
- </Tooltip>
+ </TsTooltip>
);
}
diff --git a/src/renderer/components/SearchPopover.tsx b/src/renderer/components/SearchPopover.tsx
index 73f79a4c5..25ef51fd2 100644
--- a/src/renderer/components/SearchPopover.tsx
+++ b/src/renderer/components/SearchPopover.tsx
@@ -19,7 +19,7 @@
import AppConfig from '-/AppConfig';
import { CloseIcon, CreateFileIcon, EditIcon } from '-/components/CommonIcons';
import EditSearchQuery from '-/components/EditSearchQuery';
-import TooltipTS from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsButton from '-/components/TsButton';
import TsIconButton from '-/components/TsIconButton';
import TsSelect from '-/components/TsSelect';
@@ -143,7 +143,7 @@ function SearchPopover(props: Props) {
}}
>
<Grid size={9}>
- <TooltipTS title={t('storedSearchQueriesTooltip')}>
+ <TsTooltip title={t('storedSearchQueriesTooltip')}>
<FormControl
variant="outlined"
sx={{ width: '100%', marginTop: '6px' }}
@@ -172,7 +172,7 @@ function SearchPopover(props: Props) {
))}
</TsSelect>
</FormControl>
- </TooltipTS>
+ </TsTooltip>
</Grid>
<Grid
size={3}
diff --git a/src/renderer/components/SidePanelTitle.tsx b/src/renderer/components/SidePanelTitle.tsx
index a3fc5f489..fe6029931 100644
--- a/src/renderer/components/SidePanelTitle.tsx
+++ b/src/renderer/components/SidePanelTitle.tsx
@@ -19,7 +19,7 @@
import { Typography } from '@mui/material';
import { ButtonProps } from '@mui/material/Button';
import React from 'react';
-import TooltipTS from './Tooltip';
+import TsTooltip from './TsTooltip';
export type TSButtonProps = ButtonProps & {
title: string;
@@ -36,7 +36,7 @@ function SidePanelTitle(props: TSButtonProps) {
paddingRight: 5, //AppConfig.defaultSpaceBetweenButtons,
}}
>
- <TooltipTS title={tooltip}>
+ <TsTooltip title={tooltip}>
<Typography
variant="subtitle1"
sx={{
@@ -49,7 +49,7 @@ function SidePanelTitle(props: TSButtonProps) {
>
{title}
</Typography>
- </TooltipTS>
+ </TsTooltip>
{menuButton && menuButton}
</div>
);
diff --git a/src/renderer/components/Tag.tsx b/src/renderer/components/Tag.tsx
index b8c7bb039..051ad6b59 100644
--- a/src/renderer/components/Tag.tsx
+++ b/src/renderer/components/Tag.tsx
@@ -16,7 +16,7 @@
*
*/
-import Tooltip from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import Button from '@mui/material/Button';
interface Props {
@@ -30,7 +30,7 @@ interface Props {
function Tag(props: Props) {
const { tagTitle, textColor, backgroundColor, isDragging, children } = props;
return (
- <Tooltip title={tagTitle}>
+ <TsTooltip title={tagTitle}>
<Button
size="small"
sx={{
@@ -55,7 +55,7 @@ function Tag(props: Props) {
>
{children}
</Button>
- </Tooltip>
+ </TsTooltip>
);
}
diff --git a/src/renderer/components/TagGroupTitleDnD.tsx b/src/renderer/components/TagGroupTitleDnD.tsx
index 4e99760be..75be57437 100644
--- a/src/renderer/components/TagGroupTitleDnD.tsx
+++ b/src/renderer/components/TagGroupTitleDnD.tsx
@@ -23,7 +23,7 @@ import {
SmallArrowRightIcon,
} from '-/components/CommonIcons';
import DragItemTypes from '-/components/DragItemTypes';
-import TooltipTS from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsIconButton from '-/components/TsIconButton';
import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';
import { Pro } from '-/pro';
@@ -149,9 +149,9 @@ function TagGroupTitleDnD(props: Props) {
tagGroup.workSpaceId,
);
const taggroupWorkspace = tagGroup.workSpaceId ? (
- <TooltipTS title={t('core:workspace') + ': ' + currentWorkspace?.fullName}>
+ <TsTooltip title={t('core:workspace') + ': ' + currentWorkspace?.fullName}>
<span> - {currentWorkspace?.shortName}</span>
- </TooltipTS>
+ </TsTooltip>
) : (
''
);
@@ -203,7 +203,7 @@ function TagGroupTitleDnD(props: Props) {
noWrap
onClick={(event: any) => handleTagGroupTitleClick(event, tagGroup)}
>
- <TooltipTS
+ <TsTooltip
title={
'Number of tags in this ' +
readOnly +
@@ -211,8 +211,10 @@ function TagGroupTitleDnD(props: Props) {
tagGroup.children.length
}
>
- {tagGroup.title + getLocationName(tagGroup.locationId)}
- </TooltipTS>
+ <span>
+ {tagGroup.title + getLocationName(tagGroup.locationId)}
+ </span>
+ </TsTooltip>
{taggroupWorkspace}
{!expanded && (
<Box
diff --git a/src/renderer/components/TagsPreview.tsx b/src/renderer/components/TagsPreview.tsx
index 06dae5a3f..caa8d0ead 100644
--- a/src/renderer/components/TagsPreview.tsx
+++ b/src/renderer/components/TagsPreview.tsx
@@ -16,7 +16,7 @@
*
*/
-import Tooltip from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import { TS } from '-/tagspaces.namespace';
import { useSelector } from 'react-redux';
@@ -80,7 +80,7 @@ function TagsPreview(props: Props) {
}
}
return (
- <Tooltip title={tagNames}>
+ <TsTooltip title={tagNames}>
<Box
sx={
{
@@ -112,7 +112,7 @@ function TagsPreview(props: Props) {
>
{showFirstTag ? tags[0].title : moreThanOne ? tags.length : '1'}
</Box>
- </Tooltip>
+ </TsTooltip>
);
}
export default TagsPreview;
diff --git a/src/renderer/components/TsButton.tsx b/src/renderer/components/TsButton.tsx
index acda4c2ff..e7863b9ae 100644
--- a/src/renderer/components/TsButton.tsx
+++ b/src/renderer/components/TsButton.tsx
@@ -17,7 +17,7 @@
*/
import AppConfig from '-/AppConfig';
-import TooltipTS from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import { isDesktopMode } from '-/reducers/settings';
import Button, {
ButtonProps,
@@ -61,7 +61,7 @@ const TsButton = React.forwardRef<HTMLButtonElement, TSButtonProps>(
{children}
</Button>
);
- return tooltip ? <TooltipTS title={tooltip}>{button}</TooltipTS> : button;
+ return tooltip ? <TsTooltip title={tooltip}>{button}</TsTooltip> : button;
},
);
diff --git a/src/renderer/components/TsIconButton.tsx b/src/renderer/components/TsIconButton.tsx
index 7ae17e85e..84518d6ca 100644
--- a/src/renderer/components/TsIconButton.tsx
+++ b/src/renderer/components/TsIconButton.tsx
@@ -17,7 +17,7 @@
*/
import AppConfig from '-/AppConfig';
-import TooltipTS from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import { isDesktopMode } from '-/reducers/settings';
import IconButton, { IconButtonProps } from '@mui/material/IconButton';
import React from 'react';
@@ -44,9 +44,9 @@ const TsIconButton = React.forwardRef<HTMLButtonElement, TSIconButtonProps>(
if (tooltip && !disabled) {
return (
- <TooltipTS keyBinding={keyBinding} title={tooltip}>
+ <TsTooltip keyBinding={keyBinding} title={tooltip}>
{iconButton}
- </TooltipTS>
+ </TsTooltip>
);
}
return iconButton;
diff --git a/src/renderer/components/TsSwitch.tsx b/src/renderer/components/TsSwitch.tsx
index 7901427a6..3629f4b79 100644
--- a/src/renderer/components/TsSwitch.tsx
+++ b/src/renderer/components/TsSwitch.tsx
@@ -16,7 +16,7 @@
*
*/
-import TooltipTS from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import Switch, { SwitchProps } from '@mui/material/Switch';
import { styled } from '@mui/material/styles';
@@ -87,7 +87,7 @@ const IOSSwitch = styled((props: SwitchProps) => (
function TsSwitch(props: TsSwitchProps) {
const { tooltip, ...rest } = props;
const sw = <IOSSwitch {...rest} />;
- return tooltip ? <TooltipTS title={tooltip}>{sw}</TooltipTS> : sw;
+ return tooltip ? <TsTooltip title={tooltip}>{sw}</TsTooltip> : sw;
}
export default TsSwitch;
diff --git a/src/renderer/components/TsToggleButton.tsx b/src/renderer/components/TsToggleButton.tsx
index 3ff78c938..0036e09fd 100644
--- a/src/renderer/components/TsToggleButton.tsx
+++ b/src/renderer/components/TsToggleButton.tsx
@@ -17,7 +17,7 @@
*/
import AppConfig from '-/AppConfig';
-import TooltipTS from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import { isDesktopMode } from '-/reducers/settings';
import { ToggleButton } from '@mui/material';
import { ButtonPropsVariantOverrides } from '@mui/material/Button';
@@ -66,7 +66,7 @@ function TsToggleButton(props: TSToggleButtonProps) {
</ToggleButton>
);
- return tooltip ? <TooltipTS title={tooltip}>{button}</TooltipTS> : button;
+ return tooltip ? <TsTooltip title={tooltip}>{button}</TsTooltip> : button;
}
export default TsToggleButton;
diff --git a/src/renderer/components/TsToolbarButton.tsx b/src/renderer/components/TsToolbarButton.tsx
index d65e9ee9c..bf07eff45 100644
--- a/src/renderer/components/TsToolbarButton.tsx
+++ b/src/renderer/components/TsToolbarButton.tsx
@@ -17,7 +17,7 @@
*/
import AppConfig from '-/AppConfig';
-import TooltipTS from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import { isDesktopMode } from '-/reducers/settings';
import { Typography } from '@mui/material';
import IconButton, { IconButtonProps } from '@mui/material/IconButton';
@@ -83,9 +83,9 @@ function TsToolbarButton(props: TSIconButtonProps) {
</IconButton>
);
return tooltip && !disabled ? (
- <TooltipTS keyBinding={keyBinding} title={tooltip}>
+ <TsTooltip keyBinding={keyBinding} title={tooltip}>
{iconButton}
- </TooltipTS>
+ </TsTooltip>
) : (
iconButton
);
diff --git a/src/renderer/components/Tooltip.tsx b/src/renderer/components/TsTooltip.tsx
similarity index 72%
rename from src/renderer/components/Tooltip.tsx
rename to src/renderer/components/TsTooltip.tsx
index 1ad6408ae..edc77f43a 100644
--- a/src/renderer/components/Tooltip.tsx
+++ b/src/renderer/components/TsTooltip.tsx
@@ -18,43 +18,26 @@
import AppConfig from '-/AppConfig';
import { adjustKeyBinding } from '-/components/dialogs/KeyboardDialog';
-import Tooltip from '@mui/material/Tooltip';
+import Tooltip, { TooltipProps } from '@mui/material/Tooltip';
-interface Props {
- title: any;
+export type TsTooltipProps = Omit<TooltipProps, 'title'> & {
+ title: React.ReactNode;
keyBinding?: string;
- children: any;
- classes?: any;
placeCloser?: boolean;
- arrow?: boolean;
- placement?:
- | 'bottom-end'
- | 'bottom-start'
- | 'bottom'
- | 'left-end'
- | 'left-start'
- | 'left'
- | 'right-end'
- | 'right-start'
- | 'right'
- | 'top-end'
- | 'top-start'
- | 'top';
-}
+};
-function TooltipTS(props: Props) {
+function TsTooltip(props: TsTooltipProps) {
const {
title,
placement = 'top',
keyBinding,
placeCloser = false,
arrow = true,
- ...restProps
+ ...rest
} = props;
- let tooltipText = title;
- if (keyBinding) {
- tooltipText = title + ' (' + adjustKeyBinding(keyBinding) + ')';
- }
+ const tooltipText = keyBinding
+ ? `${title} (${adjustKeyBinding(keyBinding)})`
+ : title;
return (
<Tooltip
arrow={arrow}
@@ -78,9 +61,9 @@ function TooltipTS(props: Props) {
],
},
}}
- {...restProps}
+ {...rest}
/>
);
}
-export default TooltipTS;
+export default TsTooltip;
diff --git a/src/renderer/components/dialogs/AboutDialog.tsx b/src/renderer/components/dialogs/AboutDialog.tsx
index 3ec72944f..edbc1763d 100644
--- a/src/renderer/components/dialogs/AboutDialog.tsx
+++ b/src/renderer/components/dialogs/AboutDialog.tsx
@@ -20,7 +20,7 @@ import AppConfig from '-/AppConfig';
import LogoIcon from '-/assets/icons/icon.png';
import TextLogoIcon from '-/assets/images/text-logo.svg';
import DraggablePaper from '-/components/DraggablePaper';
-import TooltipTS from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsButton from '-/components/TsButton';
import TranslucentDialog from '-/components/dialogs/components/TranslucentDialog';
import TsDialogActions from '-/components/dialogs/components/TsDialogActions';
@@ -150,7 +150,7 @@ function AboutDialog(props: Props) {
src={LogoIcon}
style={{ float: 'left', marginRight: 10, width: 120, height: 120 }}
/>
- <TooltipTS
+ <TsTooltip
placement="top"
title={
'Build on: ' +
@@ -165,7 +165,7 @@ function AboutDialog(props: Props) {
&nbsp;Build ID:&nbsp;
{buildID}
</Typography>
- </TooltipTS>
+ </TsTooltip>
<br />
<br />
<Typography id="aboutContent" variant="body1">
diff --git a/src/renderer/components/dialogs/FileUploadDialog.tsx b/src/renderer/components/dialogs/FileUploadDialog.tsx
index bcd0ee02c..ee57c12d5 100644
--- a/src/renderer/components/dialogs/FileUploadDialog.tsx
+++ b/src/renderer/components/dialogs/FileUploadDialog.tsx
@@ -32,7 +32,8 @@ import {
getProgress,
} from '-/reducers/app';
import { uploadAbort } from '-/services/utils-io';
-import { Grid, LinearProgress, Tooltip } from '@mui/material';
+import { Grid, LinearProgress } from '@mui/material';
+import TsTooltip from '-/components/TsTooltip';
import Box from '@mui/material/Box';
import Dialog from '@mui/material/Dialog';
import DialogContent from '@mui/material/DialogContent';
@@ -252,7 +253,7 @@ function FileUploadDialog(props: Props) {
currentLocation?.getDirSeparator(),
)}
{percentage === -1 && (
- <Tooltip
+ <TsTooltip
title={
abort && typeof abort === 'string'
? abort
@@ -260,7 +261,7 @@ function FileUploadDialog(props: Props) {
}
>
<WarningIcon color="warning" />
- </Tooltip>
+ </TsTooltip>
)}
</Grid>
<Grid size={{ xs: 2 }}>
diff --git a/src/renderer/components/dialogs/OnboardingDialog.tsx b/src/renderer/components/dialogs/OnboardingDialog.tsx
index ce4831984..9f26534b0 100644
--- a/src/renderer/components/dialogs/OnboardingDialog.tsx
+++ b/src/renderer/components/dialogs/OnboardingDialog.tsx
@@ -22,7 +22,7 @@ import WizardFinished from '-/assets/images/computer-desk.svg';
import NewLook from '-/assets/images/desktop.svg';
import LocationConcept from '-/assets/images/organize.svg';
import TagsDemoVideo from '-/assets/videos/tags-demo.mp4';
-import TooltipTS from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsButton from '-/components/TsButton';
import TsSelect from '-/components/TsSelect';
import TsDialogTitle from '-/components/dialogs/components/TsDialogTitle';
@@ -700,7 +700,7 @@ function OnboardingDialog(props: Props) {
justifyContent: 'center',
}}
>
- <TooltipTS
+ <TsTooltip
title={
checkForUpdatesExternallyConfigured
? t('core:settingExternallyConfigured')
@@ -734,7 +734,7 @@ function OnboardingDialog(props: Props) {
label={t('core:checkForNewVersionOnStartup')}
/>
</span>
- </TooltipTS>
+ </TsTooltip>
</Box>
</SwiperSlide>
diff --git a/src/renderer/components/dialogs/components/SettingsAI.tsx b/src/renderer/components/dialogs/components/SettingsAI.tsx
index 509276c83..6e6ccc9ac 100644
--- a/src/renderer/components/dialogs/components/SettingsAI.tsx
+++ b/src/renderer/components/dialogs/components/SettingsAI.tsx
@@ -24,7 +24,7 @@ import {
ReloadIcon,
RemoveIcon,
} from '-/components/CommonIcons';
-import { default as TooltipTS } from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsButton from '-/components/TsButton';
import TsIconButton from '-/components/TsIconButton';
import TsMenuList from '-/components/TsMenuList';
@@ -375,7 +375,7 @@ function SettingsAI(props: Props) {
>
<OllamaIcon />
<Typography sx={{ marginLeft: '5px' }}>{provider.name}</Typography>
- <TooltipTS
+ <TsTooltip
title={
t('core:serviceStatus') +
': ' +
@@ -397,7 +397,7 @@ function SettingsAI(props: Props) {
}}
/>
)}
- </TooltipTS>
+ </TsTooltip>
<TsIconButton
aria-label="removeAIProvider"
tooltip={t('core:remove')}
diff --git a/src/renderer/components/dialogs/components/SettingsAdvanced.tsx b/src/renderer/components/dialogs/components/SettingsAdvanced.tsx
index 8e64bb330..d356ee9cb 100644
--- a/src/renderer/components/dialogs/components/SettingsAdvanced.tsx
+++ b/src/renderer/components/dialogs/components/SettingsAdvanced.tsx
@@ -25,7 +25,7 @@ import {
} from '-/components/CommonIcons';
import { ProLabel } from '-/components/HelperComponents';
import InfoIcon from '-/components/InfoIcon';
-import TooltipTS from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsButton from '-/components/TsButton';
import TsIconButton from '-/components/TsIconButton';
import TsSelect from '-/components/TsSelect';
@@ -348,12 +348,12 @@ function SettingsAdvanced(props: Props) {
<EditIcon />
</TsIconButton>
{index === 0 && (
- <TooltipTS title={t('core:serverIsDefaultHelp')}>
+ <TsTooltip title={t('core:serverIsDefaultHelp')}>
<CheckIcon
data-tid="tileServerDefaultIndication"
sx={{ marginLeft: '10px' }}
/>
- </TooltipTS>
+ </TsTooltip>
)}
</ListItem>
))
diff --git a/src/renderer/components/dialogs/components/SettingsGeneral.tsx b/src/renderer/components/dialogs/components/SettingsGeneral.tsx
index c5dd2aaf6..a87c72838 100644
--- a/src/renderer/components/dialogs/components/SettingsGeneral.tsx
+++ b/src/renderer/components/dialogs/components/SettingsGeneral.tsx
@@ -21,7 +21,7 @@ import { CheckIcon, CloseIcon, ReloadIcon } from '-/components/CommonIcons';
import { BetaLabel, ProLabel } from '-/components/HelperComponents';
import InfoIcon from '-/components/InfoIcon';
import PerspectiveSelector from '-/components/PerspectiveSelector';
-import TooltipTS from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TransparentBackground from '-/components/TransparentBackground';
import TsButton from '-/components/TsButton';
import TsIconButton from '-/components/TsIconButton';
@@ -464,7 +464,7 @@ function SettingsGeneral() {
jsx: (
<ListItem>
<ListItemText primary={t('core:checkForNewVersionOnStartup')} />
- <TooltipTS
+ <TsTooltip
title={
AppConfig.ExtCheckForUpdatesOnStartup !== undefined
? t('core:settingExternallyConfigured')
@@ -494,7 +494,7 @@ function SettingsGeneral() {
}
/>
</span>
- </TooltipTS>
+ </TsTooltip>
</ListItem>
),
},
@@ -666,7 +666,7 @@ function SettingsGeneral() {
<ListItem>
<ListItemText primary={t('core:defaultFolderColor')} />
<TransparentBackground>
- <TooltipTS
+ <TsTooltip
title={
AppConfig.ExtDefaultFolderColor !== undefined
? t('core:settingExternallyConfigured')
@@ -688,7 +688,7 @@ function SettingsGeneral() {
&nbsp;
</TsButton>
</span>
- </TooltipTS>
+ </TsTooltip>
</TransparentBackground>
</ListItem>
),
@@ -768,7 +768,7 @@ function SettingsGeneral() {
<ListItem>
<ListItemText primary={t('enableWS')} />
{AppConfig.isElectron && (
- <TooltipTS
+ <TsTooltip
title={
t('core:serviceStatus') +
': ' +
@@ -788,7 +788,7 @@ function SettingsGeneral() {
}}
/>
)}
- </TooltipTS>
+ </TsTooltip>
)}
<TsSwitch
data-tid="settingsEnableWS"
@@ -936,7 +936,7 @@ function SettingsGeneral() {
input: {
endAdornment: (
<InputAdornment position="end">
- <TooltipTS title={t('loadDefaultAuthor')}>
+ <TsTooltip title={t('loadDefaultAuthor')}>
<TsIconButton
data-tid="loadDefaultAuthorTID"
disabled={AppConfig.ExtAuthor !== undefined}
@@ -946,7 +946,7 @@ function SettingsGeneral() {
>
<ReloadIcon />
</TsIconButton>
- </TooltipTS>
+ </TsTooltip>
</InputAdornment>
),
},
diff --git a/src/renderer/components/dialogs/components/SettingsPerspectives.tsx b/src/renderer/components/dialogs/components/SettingsPerspectives.tsx
index 011487959..19ac79327 100644
--- a/src/renderer/components/dialogs/components/SettingsPerspectives.tsx
+++ b/src/renderer/components/dialogs/components/SettingsPerspectives.tsx
@@ -17,7 +17,7 @@
*/
import { BetaLabel, ProLabel } from '-/components/HelperComponents';
-import Tooltip from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsButton from '-/components/TsButton';
import { usePerspectiveOnboardingContext } from '-/components/dialogs/hooks/usePerspectiveOnboardingContext';
import { useNotificationContext } from '-/hooks/useNotificationContext';
@@ -126,15 +126,15 @@ function SettingsPerspectives() {
let wrappedSwitch = switchControl;
if (configLocked) {
wrappedSwitch = (
- <Tooltip title={t('core:perspectivesConfiguredByExtConfig')}>
+ <TsTooltip title={t('core:perspectivesConfiguredByExtConfig')}>
<span>{switchControl}</span>
- </Tooltip>
+ </TsTooltip>
);
} else if (proLocked) {
wrappedSwitch = (
- <Tooltip title={t('core:thisFunctionalityIsAvailableInPro')}>
+ <TsTooltip title={t('core:thisFunctionalityIsAvailableInPro')}>
<span>{switchControl}</span>
- </Tooltip>
+ </TsTooltip>
);
}
const hasOnboarding = perspectiveHasOnboarding(perspective.id);
diff --git a/src/renderer/perspectives/grid/components/GridCell.tsx b/src/renderer/perspectives/grid/components/GridCell.tsx
index e60d7433d..670a470bd 100644
--- a/src/renderer/perspectives/grid/components/GridCell.tsx
+++ b/src/renderer/perspectives/grid/components/GridCell.tsx
@@ -29,7 +29,7 @@ import TagContainer from '-/components/TagContainer';
import TagContainerDnd from '-/components/TagContainerDnd';
import TagsOverflowChip from '-/components/TagsOverflowChip';
import TagsPreview from '-/components/TagsPreview';
-import Tooltip from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsIconButton from '-/components/TsIconButton';
import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';
import { useEditedEntryMetaContext } from '-/hooks/useEditedEntryMetaContext';
@@ -410,16 +410,16 @@ function GridCell(props: Props) {
fsEntry.isFile &&
fsEntry.lmdt && (
<>
- <Tooltip
+ <TsTooltip
title={
t('core:modifiedDate') + ': ' + formatDateTime(fsEntry.lmdt, true)
}
>
{formatDateTime(fsEntry.lmdt, false)}
- </Tooltip>
- <Tooltip title={fsEntry.size + ' ' + t('core:sizeInBytes')}>
+ </TsTooltip>
+ <TsTooltip title={fsEntry.size + ' ' + t('core:sizeInBytes')}>
<span>{' | ' + formatFileSize(fsEntry.size)}</span>
- </Tooltip>
+ </TsTooltip>
</>
)
);
@@ -427,7 +427,7 @@ function GridCell(props: Props) {
function generateExtension() {
return (
- <Tooltip title={i18n.t('clickToSelect') + ': ' + fsEntry.name}>
+ <TsTooltip title={i18n.t('clickToSelect') + ': ' + fsEntry.name}>
<FileExtBadge
sx={{
backgroundColor: fileSystemEntryColor,
@@ -455,7 +455,7 @@ function GridCell(props: Props) {
<FolderOutlineIcon />
)}
</FileExtBadge>
- </Tooltip>
+ </TsTooltip>
);
}
diff --git a/src/renderer/perspectives/grid/components/GridPagination.tsx b/src/renderer/perspectives/grid/components/GridPagination.tsx
index 6eaf58d2c..45ab6d85c 100644
--- a/src/renderer/perspectives/grid/components/GridPagination.tsx
+++ b/src/renderer/perspectives/grid/components/GridPagination.tsx
@@ -20,7 +20,7 @@ import AppConfig from '-/AppConfig';
import EntryIcon from '-/components/EntryIcon';
import TagContainer from '-/components/TagContainer';
import TagsPreview from '-/components/TagsPreview';
-import TooltipTS from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import { useMenuContext } from '-/components/dialogs/hooks/useMenuContext';
import { SelectionArea } from '-/components/drag/SelectionArea';
import SelectionDragLayer from '-/components/drag/SelectionDragLayer';
@@ -238,7 +238,7 @@ function GridPagination(props: Props) {
color: theme.palette.text.primary,
}}
>
- <TooltipTS title={t('core:renameDirectory')}>
+ <TsTooltip title={t('core:renameDirectory')}>
<ButtonBase
data-tid={`currentDir_${dataTidFormat(folderName)}`}
sx={{
@@ -252,7 +252,7 @@ function GridPagination(props: Props) {
>
{folderName}
</ButtonBase>
- </TooltipTS>
+ </TsTooltip>
{showTags ? (
<Box sx={{ paddingLeft: '5px' }}>
{directoryMeta?.tags?.map((tag) => (
@@ -297,7 +297,7 @@ function GridPagination(props: Props) {
</Typography>
)}
</Box>
- <TooltipTS title={t('core:changeThumbnail')} placement="bottom">
+ <TsTooltip title={t('core:changeThumbnail')} placement="bottom">
<Box
sx={{
':hover': { border: '1px dashed gray !important' },
@@ -324,7 +324,7 @@ function GridPagination(props: Props) {
}
}}
/>
- </TooltipTS>
+ </TsTooltip>
</Grid>
),
[
@@ -477,7 +477,7 @@ function GridPagination(props: Props) {
</GridCellsContainer>
</CellVisibilityProvider>
{showPagination && (
- <TooltipTS title={folderSummary}>
+ <TsTooltip title={folderSummary}>
<Pagination
sx={{
left: 15,
@@ -494,7 +494,7 @@ function GridPagination(props: Props) {
page={page}
onChange={handleChange}
/>
- </TooltipTS>
+ </TsTooltip>
)}
{!showDetails && !showPagination && pageFiles.length > 0 && (
<Box sx={{ padding: '15px', bottom: '10px' }}>
diff --git a/src/renderer/perspectives/list/components/RowCell.tsx b/src/renderer/perspectives/list/components/RowCell.tsx
index c7eb8bf7a..783c74211 100644
--- a/src/renderer/perspectives/list/components/RowCell.tsx
+++ b/src/renderer/perspectives/list/components/RowCell.tsx
@@ -28,7 +28,7 @@ import TagContainer from '-/components/TagContainer';
import TagContainerDnd from '-/components/TagContainerDnd';
import TagsOverflowChip from '-/components/TagsOverflowChip';
import TagsPreview from '-/components/TagsPreview';
-import Tooltip from '-/components/Tooltip';
+import TsTooltip from '-/components/TsTooltip';
import TsIconButton from '-/components/TsIconButton';
import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';
import { usePerspectiveSettingsContext } from '-/hooks/usePerspectiveSettingsContext';
@@ -355,7 +355,7 @@ function RowCell(props: Props) {
alignSelf: 'center',
}}
>
- <Tooltip title={i18n.t('clickToSelect') + ': ' + fsEntry.name}>
+ <TsTooltip title={i18n.t('clickToSelect') + ': ' + fsEntry.name}>
<FileExtBadge
sx={{
backgroundColor: fileSystemEntryColor,
@@ -376,7 +376,7 @@ function RowCell(props: Props) {
<FolderOutlineIcon />
)}
</FileExtBadge>
- </Tooltip>
+ </TsTooltip>
</Grid>
{isSmall ? (
<Grid
@@ -432,10 +432,10 @@ function RowCell(props: Props) {
sx={{ color: 'gray' }}
variant="body2"
>
- <Tooltip title={fsEntry.size + ' ' + t('core:sizeInBytes')}>
- {entrySizeFormatted}
- </Tooltip>
- <Tooltip
+ <TsTooltip title={fsEntry.size + ' ' + t('core:sizeInBytes')}>
+ <span>{entrySizeFormatted}</span>
+ </TsTooltip>
+ <TsTooltip
title={
t('core:modifiedDate') +
': ' +
@@ -443,7 +443,7 @@ function RowCell(props: Props) {
}
>
<span>{entryLMDTFormatted}</span>
- </Tooltip>
+ </TsTooltip>
<span>{description}</span>
</Typography>
{showTags && entryTags.length > 0 ? (