Skip to content

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

chore: migration to tsiconbutton

Ilian Sapundshiev8c9c0b7a5d63
diff --git a/src/renderer/components/ZoomComponent.tsx b/src/renderer/components/ZoomComponent.tsx
index 9dc03cc22..0556c5ba8 100644
--- a/src/renderer/components/ZoomComponent.tsx
+++ b/src/renderer/components/ZoomComponent.tsx
@@ -22,7 +22,7 @@ import Box from '@mui/material/Box';
import ZoomOutIcon from '@mui/icons-material/RemoveCircleOutline';
import ZoomInIcon from '@mui/icons-material/ControlPoint';
import Typography from '@mui/material/Typography';
-import IconButton from '@mui/material/IconButton';
+import TsIconButton from '-/components/TsIconButton';
import { usePerspectiveSettingsContext } from '-/hooks/usePerspectiveSettingsContext';
import { useReducer } from 'react';
@@ -90,18 +90,18 @@ export default function ZoomComponent(props: Props) {
return (
<Box sx={{ display: 'flex' }}>
- <IconButton onClick={zoomOut}>
+ <TsIconButton onClick={zoomOut}>
<ZoomOutIcon />
- </IconButton>
+ </TsIconButton>
<Typography
variant="overline"
style={{ color: theme.palette.text.primary, marginTop: 4 }}
>
{entrySizePercent}
</Typography>
- <IconButton onClick={zoomIn}>
+ <TsIconButton onClick={zoomIn}>
<ZoomInIcon />
- </IconButton>
+ </TsIconButton>
</Box>
);
}
diff --git a/src/renderer/components/dialogs/CreateDirectoryDialog.tsx b/src/renderer/components/dialogs/CreateDirectoryDialog.tsx
index 5c389570e..071f740ec 100644
--- a/src/renderer/components/dialogs/CreateDirectoryDialog.tsx
+++ b/src/renderer/components/dialogs/CreateDirectoryDialog.tsx
@@ -24,7 +24,6 @@ import {
DialogContent,
DialogTitle,
FormHelperText,
- IconButton,
InputAdornment,
inputBaseClasses,
} from '@mui/material';
@@ -33,6 +32,7 @@ import SetBackgroundIcon from '@mui/icons-material/OpacityOutlined';
import { joinPaths } from '@tagspaces/tagspaces-common/paths';
import DialogCloseButton from '-/components/dialogs/DialogCloseButton';
import TsTextField from '-/components/TsTextField';
+import TsIconButton from '-/components/TsIconButton';
import TsButton from '-/components/TsButton';
import { useTranslation } from 'react-i18next';
import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
@@ -226,7 +226,7 @@ function CreateDirectoryDialog(props: Props) {
<InputAdornment position="end">
{defaultBackgrounds.map((background, cnt) => (
<>
- <IconButton
+ <TsIconButton
key={cnt}
data-tid={'bgTID' + cnt}
aria-label="changeFolderBackground"
@@ -244,7 +244,7 @@ function CreateDirectoryDialog(props: Props) {
}}
>
<SetBackgroundIcon />
- </IconButton>
+ </TsIconButton>
</>
))}
</InputAdornment>
diff --git a/src/renderer/components/dialogs/CreateEditLocationDialog.tsx b/src/renderer/components/dialogs/CreateEditLocationDialog.tsx
index 17623f990..edb0cae2e 100644
--- a/src/renderer/components/dialogs/CreateEditLocationDialog.tsx
+++ b/src/renderer/components/dialogs/CreateEditLocationDialog.tsx
@@ -42,7 +42,7 @@ import ToggleButton from '@mui/material/ToggleButton';
import CheckIcon from '@mui/icons-material/Check';
import RemoveIcon from '@mui/icons-material/RemoveCircleOutline';
import InputAdornment from '@mui/material/InputAdornment';
-import IconButton from '@mui/material/IconButton';
+import TsIconButton from '-/components/TsIconButton';
import { useSelector, useDispatch } from 'react-redux';
import { locationType } from '@tagspaces/tagspaces-common/misc';
import AppConfig from '-/AppConfig';
@@ -1089,7 +1089,7 @@ function CreateEditLocationDialog(props: Props) {
endAdornment: (
<InputAdornment position="end" style={{ height: 32 }}>
<Tooltip title="Generates new unique identifier for this location">
- <IconButton
+ <TsIconButton
onClick={() => {
const result = confirm(
'Changing the identifier of a location, will invalidate all the internal sharing links (tslinks) leading to files and folders in this location. Do you want to continue?',
@@ -1100,7 +1100,7 @@ function CreateEditLocationDialog(props: Props) {
}}
>
<IDIcon />
- </IconButton>
+ </TsIconButton>
</Tooltip>
</InputAdornment>
),
@@ -1145,7 +1145,7 @@ function CreateEditLocationDialog(props: Props) {
endAdornment: (
<InputAdornment position="end">
<TooltipTS title={t('toggleKeyVisibility')}>
- <IconButton
+ <TsIconButton
aria-label="toggle key visibility"
onClick={() =>
setShowEncryptionKey(!showEncryptionKey)
@@ -1156,10 +1156,10 @@ function CreateEditLocationDialog(props: Props) {
) : (
<VisibilityOff />
)}
- </IconButton>
+ </TsIconButton>
</TooltipTS>
<TooltipTS title={t('generateEncryptionKey')}>
- <IconButton
+ <TsIconButton
aria-label="generate encryption key"
onClick={() =>
setEncryptionKey(
@@ -1170,7 +1170,7 @@ function CreateEditLocationDialog(props: Props) {
}
>
<PasswordIcon />
- </IconButton>
+ </TsIconButton>
</TooltipTS>
</InputAdornment>
),
diff --git a/src/renderer/components/dialogs/LocalForm.tsx b/src/renderer/components/dialogs/LocalForm.tsx
index 7f975ffd7..858788290 100644
--- a/src/renderer/components/dialogs/LocalForm.tsx
+++ b/src/renderer/components/dialogs/LocalForm.tsx
@@ -20,7 +20,7 @@ import React from 'react';
import FormControl from '@mui/material/FormControl';
import InputAdornment from '@mui/material/InputAdornment';
-import IconButton from '@mui/material/IconButton';
+import TsIconButton from '-/components/TsIconButton';
import FolderIcon from '@mui/icons-material/Folder';
import FormHelperText from '@mui/material/FormHelperText';
import Grid from '@mui/material/Grid';
@@ -94,9 +94,9 @@ function LocalForm(props: Props) {
InputProps={{
endAdornment: (
<InputAdornment position="end" style={{ height: 32 }}>
- <IconButton onClick={openDirectory}>
+ <TsIconButton onClick={openDirectory}>
<FolderIcon />
- </IconButton>
+ </TsIconButton>
</InputAdornment>
),
}}