Skip to content

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

chore: migration to the tsbutton component

Ilian Sapundshiev6a53eea3eecb
diff --git a/package.json b/package.json
index 1c09ce951..30e2055c6 100644
--- a/package.json
+++ b/package.json
@@ -234,7 +234,7 @@
"uuid": "^9.0.0"
},
"optionalDependencies": {
- "@tagspacespro/tagspacespro": "5.0.82"
+ "@tagspacespro/tagspacespro": "5.0.83"
},
"devDependencies": {
"@electron/notarize": "^2.3.2",
diff --git a/src/renderer/components/DirectoryListView.tsx b/src/renderer/components/DirectoryListView.tsx
index 7b56757a8..a80c61606 100644
--- a/src/renderer/components/DirectoryListView.tsx
+++ b/src/renderer/components/DirectoryListView.tsx
@@ -1,6 +1,6 @@
import React, { useRef, useState, useEffect } from 'react';
import { useSelector } from 'react-redux';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import Select from '@mui/material/Select';
import MenuItem from '@mui/material/MenuItem';
import FormControl from '@mui/material/FormControl';
@@ -157,7 +157,7 @@ function DirectoryListView(props: Props) {
return (
<div style={{ marginTop: 10 }}>
{getDirLocations()}
- <Button
+ <TsButton
variant="text"
startIcon={<ParentFolderIcon />}
style={{ margin: 5 }}
@@ -175,8 +175,8 @@ function DirectoryListView(props: Props) {
}}
>
{t('core:navigateToParentDirectory')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
variant="text"
startIcon={<NewFolderIcon />}
style={{ margin: 5 }}
@@ -190,7 +190,7 @@ function DirectoryListView(props: Props) {
}}
>
{t('core:newSubdirectory')}
- </Button>
+ </TsButton>
<List
dense
style={{
diff --git a/src/renderer/components/EditDescriptionButtons.tsx b/src/renderer/components/EditDescriptionButtons.tsx
index ae532c38e..70391e76a 100644
--- a/src/renderer/components/EditDescriptionButtons.tsx
+++ b/src/renderer/components/EditDescriptionButtons.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import { ProTooltip } from '-/components/HelperComponents';
import { Pro } from '-/pro';
import { useTranslation } from 'react-i18next';
@@ -57,22 +57,22 @@ const EditDescriptionButtons: React.FC = () => {
return (
<span style={{ float: 'left' }}>
{isEditDescriptionMode && (
- <Button
+ <TsButton
onClick={() => {
setEditDescriptionMode(false);
}}
>
{t('core:cancel')}
{/* {t(isDescriptionChanged ? 'core:cancel' : 'core:close')} */}
- </Button>
+ </TsButton>
)}
{/* {!editMode && (
- <Button className={classes.button} onClick={printHTML}>
+ <TsButton className={classes.button} onClick={printHTML}>
{t('core:print')}
- </Button>
+ </TsButton>
)} */}
<ProTooltip tooltip={t('editDescription')}>
- <Button
+ <TsButton
data-tid="editDescriptionTID"
color="primary"
disabled={!Pro || isEditMode}
@@ -86,7 +86,7 @@ const EditDescriptionButtons: React.FC = () => {
{isEditDescriptionMode
? t('core:confirmSaveButton')
: t('core:editDescription')}
- </Button>
+ </TsButton>
</ProTooltip>
</span>
);
diff --git a/src/renderer/components/EntryContainer.tsx b/src/renderer/components/EntryContainer.tsx
index d377255d3..11c14d091 100644
--- a/src/renderer/components/EntryContainer.tsx
+++ b/src/renderer/components/EntryContainer.tsx
@@ -27,10 +27,11 @@ import React, {
import { useSelector } from 'react-redux';
import { GlobalHotKeys } from 'react-hotkeys';
import fscreen from 'fscreen';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import LoadingButton from '@mui/lab/LoadingButton';
import Tooltip from '-/components/Tooltip';
import Box from '@mui/material/Box';
+import Button from '@mui/material/Button';
import ButtonGroup from '@mui/material/ButtonGroup';
import { CancelIcon, CloseEditIcon } from '-/components/CommonIcons';
import { getUuid } from '@tagspaces/tagspaces-common/utils-io';
@@ -603,19 +604,21 @@ function EntryContainer() {
editFile = (
<ButtonGroup>
<Tooltip title={t('core:cancelEditing')}>
- <Button
+ <TsButton
onClick={() => {
setEditMode(false);
setFileChanged(false);
}}
+ style={{
+ borderRadius: 'unset',
+ borderTopLeftRadius: 10,
+ borderBottomLeftRadius: 10,
+ }}
aria-label={t('core:cancelEditing')}
- size="small"
- variant="outlined"
- color="primary"
startIcon={closeCancelIcon}
>
{fileChanged ? t('core:cancel') : t('core:exitEditMode')}
- </Button>
+ </TsButton>
</Tooltip>
{fileChanged && (
<Tooltip
@@ -636,6 +639,11 @@ function EntryContainer() {
color="primary"
startIcon={desktopMode && <SaveIcon />}
loading={isSavingInProgress.current}
+ style={{
+ borderRadius: 'unset',
+ borderTopRightRadius: 10,
+ borderBottomRightRadius: 10,
+ }}
>
{t('core:save')}
</LoadingButton>
@@ -646,18 +654,15 @@ function EntryContainer() {
} else {
editFile = (
<Tooltip title={t('core:editFile')}>
- <Button
+ <TsButton
disabled={isEditDescriptionMode}
- size="small"
- variant="outlined"
- color="primary"
onClick={editOpenedFile}
aria-label={t('core:editFile')}
data-tid="fileContainerEditFile"
startIcon={<EditIcon />}
>
{t('core:edit')}
- </Button>
+ </TsButton>
</Tooltip>
);
}
diff --git a/src/renderer/components/EntryProperties.tsx b/src/renderer/components/EntryProperties.tsx
index 26c23bc28..a48e98652 100644
--- a/src/renderer/components/EntryProperties.tsx
+++ b/src/renderer/components/EntryProperties.tsx
@@ -33,7 +33,6 @@ import {
Typography,
TextField,
inputBaseClasses,
- Button,
InputAdornment,
Popover,
Box,
@@ -53,7 +52,7 @@ import {
Popup,
TileLayer,
} from 'react-leaflet';
-import { ButtonGroup, IconButton } from '@mui/material';
+import { ButtonGroup, IconButton, Button } from '@mui/material';
import { formatBytes } from '@tagspaces/tagspaces-common/misc';
import {
extractContainingDirectoryPath,
@@ -83,6 +82,7 @@ import NoTileServer from '-/components/NoTileServer';
import { ProTooltip } from '-/components/HelperComponents';
import PerspectiveSelector from '-/components/PerspectiveSelector';
import TsTextField from '-/components/TsTextField';
+import TsButton from '-/components/TsButton';
import FormHelperText from '@mui/material/FormHelperText';
import LinkGeneratorDialog from '-/components/dialogs/LinkGeneratorDialog';
import { useTranslation } from 'react-i18next';
@@ -583,32 +583,30 @@ function EntryProperties(props: Props) {
<div style={{ textAlign: 'right' }}>
{editName !== undefined ? (
<div>
- <Button
+ <TsButton
data-tid="cancelRenameEntryTID"
onClick={deactivateEditNameField}
- size="small"
+ variant="text"
>
{t('core:cancel')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
data-tid="confirmRenameEntryTID"
- color="primary"
onClick={renameEntry}
- size="small"
+ variant="text"
disabled={disableConfirmButton.current}
>
{t('core:confirmSaveButton')}
- </Button>
+ </TsButton>
</div>
) : (
- <Button
+ <TsButton
data-tid="startRenameEntryTID"
- color="primary"
- size="small"
+ variant="text"
onClick={activateEditNameField}
>
{t('core:rename')}
- </Button>
+ </TsButton>
)}
</div>
)}
@@ -705,11 +703,9 @@ function EntryProperties(props: Props) {
{t('core:lat') + ' : ' + geoLocation.lng}
</Typography>
<br />
- <ButtonGroup>
- <Button
- size="small"
+ <p>
+ <TsButton
color="primary"
- variant="outlined"
onClick={() => {
openUrl(
'https://www.openstreetmap.org/?mlat=' +
@@ -727,11 +723,10 @@ function EntryProperties(props: Props) {
Open in
<br />
OpenStreetMap
- </Button>
- <Button
- size="small"
+ </TsButton>
+ <TsButton
color="primary"
- variant="outlined"
+ style={{ marginLeft: 5 }}
onClick={() => {
openUrl(
'https://maps.google.com/?q=' +
@@ -749,8 +744,8 @@ function EntryProperties(props: Props) {
Open in
<br />
Google Maps
- </Button>
- </ButtonGroup>
+ </TsButton>
+ </p>
</Popup>
</Marker>
</LayerGroup>
@@ -797,8 +792,8 @@ function EntryProperties(props: Props) {
readOnly: true,
...(!openedEntry.isFile && {
endAdornment: (
- <Button
- size="small"
+ <TsButton
+ variant="text"
onClick={() =>
getOpenedDirProps().then((props) => {
dirProps.current = props;
@@ -807,7 +802,7 @@ function EntryProperties(props: Props) {
}
>
{t('core:calculate')}
- </Button>
+ </TsButton>
),
}),
}}
@@ -844,14 +839,13 @@ function EntryProperties(props: Props) {
endAdornment: (
<InputAdornment position="end">
{!readOnlyMode && !isEditMode && editName === undefined && (
- <Button
+ <TsButton
data-tid="moveCopyEntryTID"
- color="primary"
onClick={toggleMoveCopyFilesDialog}
- size="small"
+ variant="text"
>
{t('core:move')}
- </Button>
+ </TsButton>
)}
</InputAdornment>
),
@@ -885,10 +879,9 @@ function EntryProperties(props: Props) {
endAdornment: (
<InputAdornment position="end">
<Tooltip title={t('core:copyLinkToClipboard')}>
- <Button
+ <TsButton
data-tid="copyLinkToClipboardTID"
- size="small"
- color="primary"
+ variant="text"
onClick={() => {
const entryTitle = extractTitle(
openedEntry.name,
@@ -905,7 +898,7 @@ function EntryProperties(props: Props) {
}}
>
{t('core:copy')}
- </Button>
+ </TsButton>
</Tooltip>
<InfoIcon tooltip={t('core:sharingLinkTooltip')} />
</InputAdornment>
@@ -925,9 +918,8 @@ function EntryProperties(props: Props) {
endAdornment: (
<InputAdornment position="end">
<Tooltip title={t('core:generateDownloadLink')}>
- <Button
+ <TsButton
onClick={() => setShowSharingLinkDialog(true)}
- size="small"
startIcon={
<QRCodeIcon
style={{ color: theme.palette.text.secondary }}
@@ -935,7 +927,7 @@ function EntryProperties(props: Props) {
}
>
{t('core:generateDownloadLink')}
- </Button>
+ </TsButton>
</Tooltip>
<InfoIcon tooltip={t('core:downloadLinkTooltip')} />
</InputAdornment>
@@ -968,7 +960,7 @@ function EntryProperties(props: Props) {
<InputAdornment position="start">
<TransparentBackground>
<Tooltip title={t('editBackgroundColor')}>
- <Button
+ <TsButton
fullWidth
style={{
width: 160,
@@ -978,7 +970,7 @@ function EntryProperties(props: Props) {
onClick={toggleBackgroundColorPicker}
>
&nbsp;
- </Button>
+ </TsButton>
</Tooltip>
</TransparentBackground>
</InputAdornment>
@@ -1083,14 +1075,13 @@ function EntryProperties(props: Props) {
!isEditMode &&
editName === undefined && (
<ProTooltip tooltip={t('changeThumbnail')}>
- <Button
+ <TsButton
data-tid="changeThumbnailTID"
fullWidth
onClick={toggleThumbFilesDialog}
- size="small"
>
{t('core:change')}
- </Button>
+ </TsButton>
</ProTooltip>
)}
<div
@@ -1135,14 +1126,13 @@ function EntryProperties(props: Props) {
!isEditMode &&
editName === undefined && (
<ProTooltip tooltip={t('changeBackgroundImage')}>
- <Button
+ <TsButton
data-tid="changeBackgroundImageTID"
fullWidth
onClick={toggleBgndImgDialog}
- size="small"
>
{t('core:change')}
- </Button>
+ </TsButton>
</ProTooltip>
)}
<div
@@ -1197,10 +1187,9 @@ function EntryProperties(props: Props) {
endAdornment: (
<InputAdornment position="end">
<Tooltip title={t('core:copyIdToClipboard')}>
- <Button
+ <TsButton
data-tid="copyIdToClipboardTID"
- color="primary"
- size="small"
+ variant="text"
disabled={!openedEntry?.meta?.id}
onClick={() => {
const entryId = openedEntry?.meta?.id;
@@ -1216,7 +1205,7 @@ function EntryProperties(props: Props) {
}}
>
{t('core:copy')}
- </Button>
+ </TsButton>
</Tooltip>
<InfoIcon tooltip={t('core:entryIdTooltip')} />
</InputAdornment>
diff --git a/src/renderer/components/FolderContainer.tsx b/src/renderer/components/FolderContainer.tsx
index c8c092eb7..6a8e89366 100644
--- a/src/renderer/components/FolderContainer.tsx
+++ b/src/renderer/components/FolderContainer.tsx
@@ -21,12 +21,13 @@ import { useTheme } from '@mui/material/styles';
import { useDispatch, useSelector } from 'react-redux';
import useMediaQuery from '@mui/material/useMediaQuery';
import IconButton from '@mui/material/IconButton';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import Box from '@mui/material/Box';
import CircularProgress from '@mui/material/CircularProgress';
import Tooltip from '-/components/Tooltip';
import Typography from '@mui/material/Typography';
import ToggleButton from '@mui/material/ToggleButton';
+import Button from '@mui/material/Button';
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
import AppConfig from '-/AppConfig';
import { getDesktopMode, getKeyBindingObject } from '-/reducers/settings';
@@ -278,9 +279,7 @@ function FolderContainer(props: Props) {
</IconButton>
</Tooltip>
) : (
- <Button
- variant="outlined"
- size="small"
+ <TsButton
data-tid="toggleSearch"
onClick={openSearchMode}
startIcon={<SearchIcon />}
@@ -295,7 +294,7 @@ function FolderContainer(props: Props) {
{t('core:searchTitle')}
<span style={{ width: 10 }} />
{openSearchKeyBinding}
- </Button>
+ </TsButton>
)}
{progress?.length > 0 && (
diff --git a/src/renderer/components/HowToStart.tsx b/src/renderer/components/HowToStart.tsx
index 7a372ffd7..f2b1c1f9f 100644
--- a/src/renderer/components/HowToStart.tsx
+++ b/src/renderer/components/HowToStart.tsx
@@ -1,5 +1,5 @@
import * as React from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import Box from '@mui/material/Box';
import Stepper from '@mui/material/Stepper';
import Step from '@mui/material/Step';
@@ -275,7 +275,7 @@ function HowToStart() {
function SlideButton(props) {
const { title, link } = props;
return (
- <Button
+ <TsButton
onClick={() => {
openURLExternally(link, true);
}}
@@ -283,7 +283,7 @@ function HowToStart() {
color="primary"
>
{title}
- </Button>
+ </TsButton>
);
}
@@ -350,7 +350,7 @@ function HowToStart() {
</Typography>
<Box sx={{ mb: 2 }}>
<div>
- <Button
+ <TsButton
// variant="contained"
onClick={handleNext}
sx={{ mt: 1, mr: 1 }}
@@ -358,14 +358,14 @@ function HowToStart() {
{index === steps.length - 1
? t('core:finish')
: t('core:goforward')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
disabled={index === 0}
onClick={handleBack}
sx={{ mt: 1, mr: 1 }}
>
{t('core:goback')}
- </Button>
+ </TsButton>
</div>
</Box>
</StepContent>
@@ -380,9 +380,9 @@ function HowToStart() {
style={{ backgroundColor: 'transparent' }}
>
<Typography>All steps completed - you&apos;re finished.</Typography>
- <Button onClick={handleReset} sx={{ mt: 1, mr: 1 }}>
+ <TsButton onClick={handleReset} sx={{ mt: 1, mr: 1 }}>
{t('core:resetBtn')}
- </Button>
+ </TsButton>
</Paper>
)}
</Box>
diff --git a/src/renderer/components/MobileNavigation.tsx b/src/renderer/components/MobileNavigation.tsx
index f2bedf92e..b9865c344 100644
--- a/src/renderer/components/MobileNavigation.tsx
+++ b/src/renderer/components/MobileNavigation.tsx
@@ -24,7 +24,7 @@ import Box from '@mui/material/Box';
import Tooltip from '-/components/Tooltip';
import ToggleButton from '@mui/material/ToggleButton';
import FileDownloadIcon from '@mui/icons-material/FileDownload';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import ButtonGroup from '@mui/material/ButtonGroup';
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
import IconButton from '@mui/material/IconButton';
@@ -198,7 +198,7 @@ function MobileNavigation(props: Props) {
}}
>
<Tooltip title={t('core:createNew')}>
- <Button
+ <TsButton
aria-controls={
openedCreateMenu ? 'split-button-menu' : undefined
}
@@ -206,9 +206,12 @@ function MobileNavigation(props: Props) {
aria-haspopup="menu"
data-tid="createNewDropdownButtonTID"
onClick={handleToggle}
- size="small"
startIcon={<CreateFileIcon />}
- // endIcon={<ArrowDropDownIcon />}
+ style={{
+ borderRadius: 'unset',
+ borderTopLeftRadius: 10,
+ borderBottomLeftRadius: 10,
+ }}
>
<Box
style={{
@@ -220,15 +223,19 @@ function MobileNavigation(props: Props) {
>
{t('core:createNew')}
</Box>
- </Button>
+ </TsButton>
</Tooltip>
<Tooltip title={t('core:openSharingLink')}>
- <Button
- size="small"
+ <TsButton
data-tid="openLinkNavigationTID"
onClick={() => {
openLinkDialog();
}}
+ style={{
+ borderRadius: 'unset',
+ borderTopRightRadius: 10,
+ borderBottomRightRadius: 10,
+ }}
startIcon={<OpenLinkIcon />}
>
<Box
@@ -241,7 +248,7 @@ function MobileNavigation(props: Props) {
>
{t('core:openLink')}
</Box>
- </Button>
+ </TsButton>
</Tooltip>
</ButtonGroup>
</Box>
diff --git a/src/renderer/components/PerspectiveManager.tsx b/src/renderer/components/PerspectiveManager.tsx
index 9ca3d23e9..d042f3aa0 100644
--- a/src/renderer/components/PerspectiveManager.tsx
+++ b/src/renderer/components/PerspectiveManager.tsx
@@ -30,7 +30,7 @@ function PerspectiveManager(props: Props) {
<Typography className={classes.panelTitle}>Perspectives</Typography>
</SidePanel>
);
- // <Button onClick={() => history.push('/login')}>Login</Button>
+ // <TsButton onClick={() => history.push('/login')}>Login</TsButton>
}
export default PerspectiveManager;
diff --git a/src/renderer/components/ProTeaser.tsx b/src/renderer/components/ProTeaser.tsx
index f54be62b2..16cf6475c 100644
--- a/src/renderer/components/ProTeaser.tsx
+++ b/src/renderer/components/ProTeaser.tsx
@@ -18,7 +18,7 @@
import React from 'react';
import IconButton from '@mui/material/IconButton';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import CardActions from '@mui/material/CardActions';
import CardContent from '@mui/material/CardContent';
import Typography from '@mui/material/Typography';
@@ -96,8 +96,7 @@ function ProTeaser(props: Props) {
marginTop: -10,
}}
>
- <Button
- size="small"
+ <TsButton
onClick={(event: any) => {
event.preventDefault();
event.stopPropagation();
@@ -105,9 +104,9 @@ function ProTeaser(props: Props) {
}}
>
{t('showMeMore')}
- </Button>
- <Button
- size="small"
+ </TsButton>
+ <TsButton
+ style={{ marginLeft: 5 }}
onClick={(event: any) => {
event.preventDefault();
event.stopPropagation();
@@ -115,7 +114,7 @@ function ProTeaser(props: Props) {
}}
>
{t('upgrade')}
- </Button>
+ </TsButton>
</CardActions>
</>
);
diff --git a/src/renderer/components/RenderHistory.tsx b/src/renderer/components/RenderHistory.tsx
index efceb774c..02d59da58 100644
--- a/src/renderer/components/RenderHistory.tsx
+++ b/src/renderer/components/RenderHistory.tsx
@@ -19,7 +19,7 @@
import { TS } from '-/tagspaces.namespace';
import Grid from '@mui/material/Grid';
import React, { useContext } from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import ListItem from '@mui/material/ListItem';
import { Tooltip } from '@mui/material';
import { Pro } from '-/pro';
@@ -68,7 +68,7 @@ function RenderHistory(props: Props) {
key={item.creationTimeStamp}
>
<Grid item xs={10} style={{ minWidth: 245, maxWidth: 245 }}>
- <Button
+ <TsButton
data-tid={historyKey + 'TID' + dataTidFormat(itemName)}
style={{
textTransform: 'none',
@@ -109,7 +109,7 @@ function RenderHistory(props: Props) {
>
{itemName}
</span>
- </Button>
+ </TsButton>
</Grid>
{showDelete && (
<Grid item xs={2}>
diff --git a/src/renderer/components/SearchAutocomplete.tsx b/src/renderer/components/SearchAutocomplete.tsx
index 070ff265a..89f252d23 100644
--- a/src/renderer/components/SearchAutocomplete.tsx
+++ b/src/renderer/components/SearchAutocomplete.tsx
@@ -27,7 +27,7 @@ import Fuse from 'fuse.js';
import { useSelector, useDispatch } from 'react-redux';
import { format, formatDistanceToNow } from 'date-fns';
import HelpOutlineIcon from '@mui/icons-material/HelpOutline';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
import Tooltip from '-/components/Tooltip';
import IconButton from '@mui/material/IconButton';
@@ -1347,12 +1347,12 @@ function SearchAutocomplete(props: Props) {
</Box>
) : (
<Tooltip title={option}>
- <Button
+ <TsButton
onClick={() => {
changeOptions(action.action, false);
}}
data-tid={dataTidFormat('menu' + option)}
- size="small"
+ variant="text"
style={{
backgroundColor: 'transparent',
textTransform: 'lowercase',
@@ -1367,7 +1367,7 @@ function SearchAutocomplete(props: Props) {
}
>
{removePrefix(option, action.action)}
- </Button>
+ </TsButton>
</Tooltip>
)}
@@ -1386,7 +1386,6 @@ function SearchAutocomplete(props: Props) {
textTransform: 'lowercase',
}}
data-tid={dataTidFormat('close' + option)}
- size="small"
>
<CloseIcon fontSize="small" />
</IconButton>
@@ -1415,8 +1414,8 @@ function SearchAutocomplete(props: Props) {
renderOption={(props, option) => (
<Box component="li" {...props}>
{option.color ? (
- <Button
- size="small"
+ <TsButton
+ variant="text"
style={{
fontSize: 13,
textTransform: 'none',
@@ -1433,7 +1432,7 @@ function SearchAutocomplete(props: Props) {
}}
>
{option.label}
- </Button>
+ </TsButton>
) : (
<>
<b>{option.label}</b>
@@ -1470,16 +1469,13 @@ function SearchAutocomplete(props: Props) {
autoFocus
placeholder={t('core:searchTitle')}
size="small"
- // variant="outlined"
/>
);
}}
/>
<Tooltip title={isIndexing ? t('searchDisabledWhileIndexing') : ''}>
- <Button
+ <TsButton
id="searchButton"
- variant="outlined"
- size="small"
disabled={isIndexing !== undefined}
style={{
marginRight: 10,
@@ -1490,7 +1486,7 @@ function SearchAutocomplete(props: Props) {
onClick={clickSearchButton}
>
{t('searchTitle')}
- </Button>
+ </TsButton>
</Tooltip>
</div>
</>
diff --git a/src/renderer/components/SearchPopover.tsx b/src/renderer/components/SearchPopover.tsx
index f13b0442e..f6e3fea98 100644
--- a/src/renderer/components/SearchPopover.tsx
+++ b/src/renderer/components/SearchPopover.tsx
@@ -24,7 +24,7 @@ import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';
import MenuItem from '@mui/material/MenuItem';
import Tooltip from '-/components/Tooltip';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import Grid from '@mui/material/Grid';
import OutlinedInput from '@mui/material/OutlinedInput';
import TsTextField from '-/components/TsTextField';
@@ -1074,36 +1074,29 @@ function SearchPopover(props: Props) {
padding: 5,
}}
>
- <Button
- size="small"
- variant="text"
+ <TsButton
data-tid="helpSearchButtonTID"
onClick={() =>
openURLExternally(Links.documentationLinks.search, true)
}
>
{t('help')}
- </Button>
+ </TsButton>
<div>
- <Button
- variant="text"
- size="small"
- onClick={clearSearch}
- id="resetSearchButton"
- >
+ <TsButton onClick={clearSearch} id="resetSearchButton">
{t('resetBtn')}
- </Button>
- <Button
- disabled={isIndexing !== undefined}
+ </TsButton>
+ <TsButton
+ style={{ marginLeft: 5 }}
variant="contained"
+ disabled={isIndexing !== undefined}
id="searchButtonAdvTID"
onClick={executeSearch}
- size="small"
>
{isIndexing !== undefined
? 'Search disabled while indexing'
: t('searchTitle')}
- </Button>
+ </TsButton>
</div>
</div>
{SaveSearchDialog && saveSearchDialogOpened !== undefined && (
diff --git a/src/renderer/components/StoredSearches.tsx b/src/renderer/components/StoredSearches.tsx
index 5f3a3b0c0..402d42b97 100644
--- a/src/renderer/components/StoredSearches.tsx
+++ b/src/renderer/components/StoredSearches.tsx
@@ -21,7 +21,7 @@ import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import classNames from 'classnames';
import IconButton from '@mui/material/IconButton';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import Grid from '@mui/material/Grid';
import EditIcon from '@mui/icons-material/Edit';
import MenuIcon from '@mui/icons-material/MoreVert';
@@ -251,7 +251,7 @@ function StoredSearches(props: Props) {
searches.map((search) => (
<ListItem dense style={{ paddingLeft: 0 }} key={search.uuid}>
<Grid item xs={10} style={{ width: 250 }}>
- <Button
+ <TsButton
data-tid={
'StoredSearchTID' +
search.title.trim().replaceAll(/\s+/g, '-')
@@ -275,7 +275,7 @@ function StoredSearches(props: Props) {
>
{search.title}
</span>
- </Button>
+ </TsButton>
</Grid>
<Grid item xs={2}>
<IconButton
diff --git a/src/renderer/components/TagContainer.tsx b/src/renderer/components/TagContainer.tsx
index 42f9bbdd5..2224501cb 100644
--- a/src/renderer/components/TagContainer.tsx
+++ b/src/renderer/components/TagContainer.tsx
@@ -18,7 +18,7 @@
import React, { useMemo } from 'react';
import { useSelector } from 'react-redux';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import PlaceIcon from '@mui/icons-material/Place';
import DateIcon from '@mui/icons-material/DateRange';
import Tooltip from '-/components/Tooltip';
diff --git a/src/renderer/components/TsButton.tsx b/src/renderer/components/TsButton.tsx
index f8aae7619..1736f0c0e 100644
--- a/src/renderer/components/TsButton.tsx
+++ b/src/renderer/components/TsButton.tsx
@@ -32,7 +32,12 @@ function TsButton(props: TSButtonProps) {
size={desktopMode ? 'small' : 'medium'}
variant="outlined" // text outlined contained
{...props}
- style={{ borderRadius: 10, textTransform: 'initial', ...style }}
+ style={{
+ borderRadius: 10,
+ // fontSize: 14,
+ // textTransform: 'capitalize',
+ ...style,
+ }}
>
{children}
</Button>
diff --git a/src/renderer/components/TsTextField.tsx b/src/renderer/components/TsTextField.tsx
index e2282a48e..7865058b3 100644
--- a/src/renderer/components/TsTextField.tsx
+++ b/src/renderer/components/TsTextField.tsx
@@ -17,7 +17,7 @@
*/
import React, { useState, useRef, useEffect } from 'react';
-// import { useSelector } from 'react-redux';
+import { useSelector } from 'react-redux';
import TextField, { TextFieldProps } from '@mui/material/TextField';
import Menu from '@mui/material/Menu';
import MenuItem from '@mui/material/MenuItem';
@@ -26,7 +26,7 @@ import MenuList from '@mui/material/MenuList';
import ListItemText from '@mui/material/ListItemText';
import MenuKeyBinding from '-/components/menus/MenuKeyBinding';
import { useTranslation } from 'react-i18next';
-// import { isDesktopMode } from '-/reducers/settings';
+import { isDesktopMode } from '-/reducers/settings';
type TSTextFieldProps = TextFieldProps & {
updateValue?: (string) => void;
@@ -36,7 +36,7 @@ type TSTextFieldProps = TextFieldProps & {
function TsTextField(props: TSTextFieldProps) {
const { updateValue, retrieveValue, children, label } = props;
const { t } = useTranslation();
- // const desktopMode = useSelector(isDesktopMode);
+ const desktopMode = useSelector(isDesktopMode);
const textFieldRef = useRef(null);
const [contextMenu, setContextMenu] = React.useState<{
@@ -96,14 +96,16 @@ function TsTextField(props: TSTextFieldProps) {
return (
<div>
- <FormHelperText style={{ marginLeft: 0, marginTop: 0 }}>
- {label}
- </FormHelperText>
+ {label && (
+ <FormHelperText style={{ marginLeft: 0, marginTop: 0 }}>
+ {label}
+ </FormHelperText>
+ )}
<TextField
onContextMenu={handleContextMenu}
style={{ cursor: 'context-menu', marginTop: 0 }}
margin="dense"
- size="small" //{desktopMode ? 'small' : 'medium'}
+ size={desktopMode ? 'small' : 'medium'}
variant="outlined"
fullWidth={true}
ref={textFieldRef}
diff --git a/src/renderer/components/UserDetailsPopover.tsx b/src/renderer/components/UserDetailsPopover.tsx
index 538ca7df4..952bbaccc 100644
--- a/src/renderer/components/UserDetailsPopover.tsx
+++ b/src/renderer/components/UserDetailsPopover.tsx
@@ -24,7 +24,7 @@ import ListItem from '@mui/material/ListItem';
import ListItemIcon from '@mui/material/ListItemIcon';
import Avatar from '@mui/material/Avatar';
import Tooltip from '-/components/Tooltip';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import Auth from '@aws-amplify/auth';
import ExitToAppIcon from '@mui/icons-material/ExitToApp';
import { useSelector } from 'react-redux';
@@ -151,26 +151,23 @@ function UserDetailsPopover(props: Props) {
)}
{'SOFTWARE_TOKEN_MFA'.indexOf(currentUser.preferredMFA) === -1 ? (
<Tooltip title={t('core:setupTOTPHelp')}>
- <Button
+ <TsButton
data-tid="setupTOTP"
className={classes.mainActionButton}
onClick={() => {
setSetupTOTPOpened(true);
}}
- size="small"
- variant="outlined"
- color="primary"
style={{ width: '95%' }}
>
{t('core:setupTOTP')}
- </Button>
+ </TsButton>
</Tooltip>
) : (
<>
<Typography style={{ color: theme.palette.text.primary }}>
{t('core:TOTPEnabled')}
</Typography>
- <Button
+ <TsButton
className={classes.mainActionButton}
onClick={async () => {
try {
@@ -180,13 +177,10 @@ function UserDetailsPopover(props: Props) {
console.log(error);
}
}}
- size="small"
- variant="outlined"
- color="primary"
style={{ width: '95%' }}
>
{t('core:disableTOTP')}
- </Button>
+ </TsButton>
</>
)}
</Box>
@@ -198,19 +192,16 @@ function UserDetailsPopover(props: Props) {
marginBottom: 10,
}}
>
- <Button
+ <TsButton
data-tid="signOutTID"
title={t('core:signOut')}
className={classes.mainActionButton}
onClick={signOut}
- size="small"
- variant="outlined"
- color="primary"
style={{ width: '95%' }}
>
<ExitToAppIcon className={classNames(classes.leftIcon)} />
{t('core:signOut')}
- </Button>
+ </TsButton>
</Box>
</Box>
</Root>
diff --git a/src/renderer/components/dialogs/AboutDialog.tsx b/src/renderer/components/dialogs/AboutDialog.tsx
index af3ab6969..2b9fb37be 100644
--- a/src/renderer/components/dialogs/AboutDialog.tsx
+++ b/src/renderer/components/dialogs/AboutDialog.tsx
@@ -183,6 +183,7 @@ function AboutDialog(props: Props) {
{imprintURL && (
<TsButton
style={{ marginRight: 5 }}
+ variant="text"
onClick={() => {
openURLExternally(imprintURL, true);
}}
@@ -193,6 +194,7 @@ function AboutDialog(props: Props) {
{privacyURL && (
<TsButton
style={{ marginRight: 5 }}
+ variant="text"
onClick={() => {
openURLExternally(privacyURL, true);
}}
@@ -202,6 +204,7 @@ function AboutDialog(props: Props) {
)}
<TsButton
style={{ marginRight: 5 }}
+ variant="text"
onClick={() => {
openURLExternally(Links.links.changelogURL, true);
}}
@@ -210,6 +213,7 @@ function AboutDialog(props: Props) {
</TsButton>
<TsButton
style={{ marginRight: 5 }}
+ variant="text"
data-tid="openLicenseDialog"
onClick={() => openLicenseDialog()}
>
@@ -218,7 +222,9 @@ function AboutDialog(props: Props) {
</div>
</Typography>
</DialogContent>
- <DialogActions>
+ <DialogActions
+ style={fullScreen ? { padding: '10px 30px 30px 30px' } : {}}
+ >
{!Pro && (
<TsButton
data-tid="checkForUpdates"
diff --git a/src/renderer/components/dialogs/AddRemoveTagsDialog.tsx b/src/renderer/components/dialogs/AddRemoveTagsDialog.tsx
index e7d872615..2ff7d2294 100644
--- a/src/renderer/components/dialogs/AddRemoveTagsDialog.tsx
+++ b/src/renderer/components/dialogs/AddRemoveTagsDialog.tsx
@@ -17,7 +17,7 @@
*/
import React, { useReducer, useRef, useState } from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import Paper from '@mui/material/Paper';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
@@ -198,29 +198,29 @@ function AddRemoveTagsDialog(props: Props) {
<DialogActions
style={fullScreen ? { padding: '10px 30px 30px 30px' } : {}}
>
- <Button
+ <TsButton
data-tid="cancelTagsMultipleEntries"
onClick={() => onCloseDialog()}
>
{t('core:cancel')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
data-tid="cleanTagsMultipleEntries"
disabled={selected.length < 1}
color="primary"
onClick={removeAllTagsAction}
>
{t('core:tagOperationCleanTags')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
data-tid="removeTagsMultipleEntries"
disabled={disabledButtons}
color="primary"
onClick={removeTagsAction}
>
{t('core:tagOperationRemoveTag')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
data-tid="addTagsMultipleEntries"
disabled={disabledButtons}
color="primary"
@@ -228,7 +228,7 @@ function AddRemoveTagsDialog(props: Props) {
onClick={addTagsAction}
>
{t('core:tagOperationAddTag')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/AddTagToTagGroupDialog.tsx b/src/renderer/components/dialogs/AddTagToTagGroupDialog.tsx
index db3931d67..391633de9 100644
--- a/src/renderer/components/dialogs/AddTagToTagGroupDialog.tsx
+++ b/src/renderer/components/dialogs/AddTagToTagGroupDialog.tsx
@@ -18,7 +18,7 @@
import React, { useState } from 'react';
import { useSelector, useDispatch } from 'react-redux';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -111,8 +111,8 @@ function AddTagToTagGroupDialog(props: Props) {
</FormControl>
</DialogContent>
<DialogActions>
- <Button onClick={onClose}>{t('core:cancel')}</Button>
- <Button
+ <TsButton onClick={onClose}>{t('core:cancel')}</TsButton>
+ <TsButton
disabled={tagGroup === undefined}
onClick={onConfirm}
data-tid="createTagsConfirmButton"
@@ -120,7 +120,7 @@ function AddTagToTagGroupDialog(props: Props) {
variant="contained"
>
{t('core:ok')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/ColorPickerDialog.tsx b/src/renderer/components/dialogs/ColorPickerDialog.tsx
index 57ccce62e..8b7bff345 100644
--- a/src/renderer/components/dialogs/ColorPickerDialog.tsx
+++ b/src/renderer/components/dialogs/ColorPickerDialog.tsx
@@ -17,7 +17,7 @@
*/
import React, { useState } from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -113,17 +113,17 @@ function ColorPickerDialog(props: Props) {
/>
</DialogContent>
<DialogActions>
- <Button data-tid="colorPickerCloseDialog" onClick={props.onClose}>
+ <TsButton data-tid="colorPickerCloseDialog" onClick={props.onClose}>
{t('core:cancel')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
onClick={onConfirm}
variant="contained"
data-tid="colorPickerConfirm"
color="primary"
>
{t('core:ok')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/ConfirmDialog.tsx b/src/renderer/components/dialogs/ConfirmDialog.tsx
index 2e75ab124..07e39e69c 100644
--- a/src/renderer/components/dialogs/ConfirmDialog.tsx
+++ b/src/renderer/components/dialogs/ConfirmDialog.tsx
@@ -17,7 +17,7 @@
*/
import React from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -88,20 +88,20 @@ function ConfirmDialog(props: Props) {
</DialogContentText>
</DialogContent>
<DialogActions>
- <Button
+ <TsButton
onClick={() => onConfirm(false)}
color="primary"
data-tid={props.cancelDialogTID}
>
{t('core:no')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
data-tid={props.confirmDialogTID}
onClick={() => onConfirm(true)}
color="primary"
>
{t('core:yes')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/CreateDirectoryDialog.tsx b/src/renderer/components/dialogs/CreateDirectoryDialog.tsx
index 63ee70391..3367b0b9e 100644
--- a/src/renderer/components/dialogs/CreateDirectoryDialog.tsx
+++ b/src/renderer/components/dialogs/CreateDirectoryDialog.tsx
@@ -24,11 +24,8 @@ import {
FormControl,
DialogContent,
DialogTitle,
- Button,
FormHelperText,
IconButton,
- FormLabel,
- Box,
InputAdornment,
inputBaseClasses,
} from '@mui/material';
@@ -36,6 +33,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 TsButton from '-/components/TsButton';
import { useTranslation } from 'react-i18next';
import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
import { useIOActionsContext } from '-/hooks/useIOActionsContext';
@@ -221,7 +219,7 @@ function CreateDirectoryDialog(props: Props) {
label={t('backgroundColor')}
retrieveValue={() => backgroundColor.current}
value={' '}
- style={{ height: 100 }}
+ style={{ height: 100, marginTop: 0 }}
InputProps={{
readOnly: true,
endAdornment: (
@@ -256,10 +254,10 @@ function CreateDirectoryDialog(props: Props) {
</FormControl>
</DialogContent>
<DialogActions>
- <Button data-tid="closeCreateNewDirectory" onClick={onCancel}>
+ <TsButton data-tid="closeCreateNewDirectory" onClick={onCancel}>
{t('core:cancel')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
disabled={disableConfirmButton}
onClick={onConfirm}
variant="contained"
@@ -268,7 +266,7 @@ function CreateDirectoryDialog(props: Props) {
color="primary"
>
{t('core:ok')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/CreateEditLocationDialog.tsx b/src/renderer/components/dialogs/CreateEditLocationDialog.tsx
index 0d786cd1f..c9b08c532 100644
--- a/src/renderer/components/dialogs/CreateEditLocationDialog.tsx
+++ b/src/renderer/components/dialogs/CreateEditLocationDialog.tsx
@@ -20,7 +20,8 @@ import React, { ChangeEvent, useEffect, useState } from 'react';
import { styled } from '@mui/material/styles';
import CryptoJS from 'crypto-js';
import Paper from '@mui/material/Paper';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
+import TsSelect from '-/components/TsSelect';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -648,18 +649,13 @@ function CreateEditLocationDialog(props: Props) {
<FormGroup>
{!selectedLocation && (
<FormControl disabled={disableLocationTypeSwitch} fullWidth>
- {/* <InputLabel id="locationLabelID">
- {t('core:locationType')}
- </InputLabel> */}
- <Select
- labelId="locationLabelID"
+ <TsSelect
data-tid="locationTypeTID"
value={type}
- // label={t('core:locationType')}
+ label={t('core:locationType')}
onChange={(event: ChangeEvent<HTMLInputElement>) =>
setType(event.target.value)
}
- variant="outlined"
>
{!AppConfig.isWeb && (
<MenuItem
@@ -686,7 +682,7 @@ function CreateEditLocationDialog(props: Props) {
{t('core:webdavLocation') + ' (experimental)'}
</MenuItem>
)}
- </Select>
+ </TsSelect>
</FormControl>
)}
{content}
@@ -900,11 +896,11 @@ function CreateEditLocationDialog(props: Props) {
labelPlacement="start"
style={{ justifyContent: 'space-between' }}
control={
- <Button size="small" variant="outlined" disabled>
+ <TsButton disabled>
{currentTagsSetting
? t('core:useSidecarFile')
: t('core:renameFile')}
- </Button>
+ </TsButton>
}
label={
<Typography variant="caption" display="block" gutterBottom>
@@ -1019,7 +1015,7 @@ function CreateEditLocationDialog(props: Props) {
style={{ justifyContent: 'space-between' }}
control={
<ProTooltip tooltip={t('ignorePatternDialogTitle')}>
- <Button
+ <TsButton
color="primary"
disabled={!Pro}
onClick={() => {
@@ -1027,7 +1023,7 @@ function CreateEditLocationDialog(props: Props) {
}}
>
{t('addEntryTags')}
- </Button>
+ </TsButton>
</ProTooltip>
}
label={
@@ -1190,8 +1186,8 @@ function CreateEditLocationDialog(props: Props) {
<DialogActions
style={fullScreen ? { padding: '10px 30px 30px 30px' } : {}}
>
- <Button onClick={() => onClose()}>{t('core:cancel')}</Button>
- <Button
+ <TsButton onClick={() => onClose()}>{t('core:cancel')}</TsButton>
+ <TsButton
disabled={disableConfirmButton()}
onClick={preConfirm}
data-tid="confirmLocationCreation"
@@ -1199,7 +1195,7 @@ function CreateEditLocationDialog(props: Props) {
variant="contained"
>
{t('core:ok')}
- </Button>
+ </TsButton>
</DialogActions>
</StyledDialog>
);
diff --git a/src/renderer/components/dialogs/CreateTagGroupDialog.tsx b/src/renderer/components/dialogs/CreateTagGroupDialog.tsx
index 54f650598..5385a325a 100644
--- a/src/renderer/components/dialogs/CreateTagGroupDialog.tsx
+++ b/src/renderer/components/dialogs/CreateTagGroupDialog.tsx
@@ -18,7 +18,7 @@
import React, { ChangeEvent, useReducer, useRef, useState } from 'react';
import { useSelector } from 'react-redux';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -244,14 +244,14 @@ function CreateTagGroupDialog(props: Props) {
{t('core:tagBackgroundColor')}
</FormHelperText>
<TransparentBackground>
- <Button
+ <TsButton
onClick={toggleDefaultTagBackgroundColorPicker}
data-tid="createTagGroupBackgroundColor"
style={styles.color}
role="presentation"
>
&nbsp;
- </Button>
+ </TsButton>
</TransparentBackground>
{displayColorPicker && (
<ColorPickerDialog
@@ -267,14 +267,14 @@ function CreateTagGroupDialog(props: Props) {
{t('core:tagForegroundColor')}
</FormHelperText>
<TransparentBackground>
- <Button
+ <TsButton
onClick={toggleDefaultTagTextColorPicker}
data-tid="createTagGroupForegroundColor"
style={styles.textcolor}
role="presentation"
>
&nbsp;
- </Button>
+ </TsButton>
</TransparentBackground>
{displayTextColorPicker && (
<ColorPickerDialog
@@ -287,10 +287,10 @@ function CreateTagGroupDialog(props: Props) {
</FormControl>
</DialogContent>
<DialogActions>
- <Button data-tid="createTagGroupCancelButton" onClick={onClose}>
+ <TsButton data-tid="createTagGroupCancelButton" onClick={onClose}>
{t('core:cancel')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
disabled={disableConfirmButton.current}
onClick={onConfirm}
variant="contained"
@@ -298,7 +298,7 @@ function CreateTagGroupDialog(props: Props) {
color="primary"
>
{t('core:ok')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/CreateTagsDialog.tsx b/src/renderer/components/dialogs/CreateTagsDialog.tsx
index ea102ae26..d122f85d8 100644
--- a/src/renderer/components/dialogs/CreateTagsDialog.tsx
+++ b/src/renderer/components/dialogs/CreateTagsDialog.tsx
@@ -17,7 +17,7 @@
*/
import React, { useEffect, useState } from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -120,8 +120,8 @@ function CreateTagsDialog(props: Props) {
</FormControl>
</DialogContent>
<DialogActions>
- <Button onClick={onClose}>{t('core:cancel')}</Button>
- <Button
+ <TsButton onClick={onClose}>{t('core:cancel')}</TsButton>
+ <TsButton
disabled={inputError}
onClick={onConfirm}
data-tid="createTagsConfirmButton"
@@ -129,7 +129,7 @@ function CreateTagsDialog(props: Props) {
variant="contained"
>
{t('core:ok')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/DownloadUrlDialog.tsx b/src/renderer/components/dialogs/DownloadUrlDialog.tsx
index 90f0ddc19..f3c881ba9 100644
--- a/src/renderer/components/dialogs/DownloadUrlDialog.tsx
+++ b/src/renderer/components/dialogs/DownloadUrlDialog.tsx
@@ -29,7 +29,7 @@ import useMediaQuery from '@mui/material/useMediaQuery';
import TargetPath from '-/components/dialogs/components/TargetPath';
import { TargetPathContextProvider } from '-/components/dialogs/hooks/TargetPathContextProvider';
import { useTranslation } from 'react-i18next';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import AppConfig from '-/AppConfig';
import { actions as AppActions, AppDispatch } from '-/reducers/app';
@@ -201,15 +201,15 @@ function DownloadUrlDialog(props: Props) {
<TargetPath />
</DialogContent>
<DialogActions>
- <Button onClick={onClose}>{t('core:cancel')}</Button>
- <Button
+ <TsButton onClick={onClose}>{t('core:cancel')}</TsButton>
+ <TsButton
variant="contained"
data-tid={'downloadFileUrlTID'}
className={classes.createButton}
onClick={() => downloadURL()}
>
{t('core:ok')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
</TargetPathContextProvider>
diff --git a/src/renderer/components/dialogs/EditEntryTagDialog.tsx b/src/renderer/components/dialogs/EditEntryTagDialog.tsx
index 2becd8599..bd4b704d1 100644
--- a/src/renderer/components/dialogs/EditEntryTagDialog.tsx
+++ b/src/renderer/components/dialogs/EditEntryTagDialog.tsx
@@ -23,7 +23,7 @@ import React, {
ChangeEvent,
useRef,
} from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -192,30 +192,31 @@ function EditEntryTagDialog(props: Props) {
}}
>
{GeoTagEditor && isGeoTag(title) ? (
- <Button
+ <TsButton
data-tid="switchAdvancedModeTID"
onClick={() => setShowAdvancedMode(!showAdvancedMode)}
>
{showAdvancedMode
? t('core:switchSimpleMode')
: t('core:switchAdvancedMode')}
- </Button>
+ </TsButton>
) : (
<div />
)}
<div>
- <Button data-tid="closeEditTagEntryDialog" onClick={props.onClose}>
+ <TsButton data-tid="closeEditTagEntryDialog" onClick={props.onClose}>
{t('core:cancel')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
disabled={haveError()}
+ style={{ marginLeft: 5 }}
onClick={onConfirm}
data-tid="confirmEditTagEntryDialog"
color="primary"
variant="contained"
>
{t('core:ok')}
- </Button>
+ </TsButton>
</div>
</DialogActions>
);
diff --git a/src/renderer/components/dialogs/EditTagDialog.tsx b/src/renderer/components/dialogs/EditTagDialog.tsx
index 03af78cd1..143d47355 100644
--- a/src/renderer/components/dialogs/EditTagDialog.tsx
+++ b/src/renderer/components/dialogs/EditTagDialog.tsx
@@ -17,7 +17,7 @@
*/
import React, { useEffect, useState } from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import format from 'date-fns/format';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
@@ -196,7 +196,7 @@ function EditTagDialog(props: Props) {
<ListItem style={{ paddingLeft: 0, paddingRight: 0 }}>
<ListItemText primary={t('core:tagBackgroundColor')} />
<TransparentBackground>
- <Button
+ <TsButton
onClick={() => setDisplayColorPicker(!displayColorPicker)}
data-tid="tagBackgroundColorEditTagDialog"
style={{
@@ -211,7 +211,7 @@ function EditTagDialog(props: Props) {
role="presentation"
>
&nbsp;
- </Button>
+ </TsButton>
</TransparentBackground>
{displayColorPicker && (
<ColorPickerDialog
@@ -225,7 +225,7 @@ function EditTagDialog(props: Props) {
<ListItem style={{ paddingLeft: 0, paddingRight: 0 }}>
<ListItemText primary={t('core:tagForegroundColor')} />
<TransparentBackground>
- <Button
+ <TsButton
onClick={() => setDisplayTextColorPicker(!displayTextColorPicker)}
data-tid="tagForegroundColorEditTagDialog"
style={{
@@ -240,7 +240,7 @@ function EditTagDialog(props: Props) {
role="presentation"
>
&nbsp;
- </Button>
+ </TsButton>
</TransparentBackground>
{displayTextColorPicker && (
<ColorPickerDialog
@@ -253,10 +253,10 @@ function EditTagDialog(props: Props) {
</ListItem>
</DialogContent>
<DialogActions>
- <Button onClick={props.onClose} data-tid="closeEditTagDialog">
+ <TsButton onClick={props.onClose} data-tid="closeEditTagDialog">
{t('core:cancel')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
disabled={inputError}
onClick={onConfirm}
data-tid="editTagConfirm"
@@ -264,7 +264,7 @@ function EditTagDialog(props: Props) {
variant="contained"
>
{t('core:ok')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/EditTagGroupDialog.tsx b/src/renderer/components/dialogs/EditTagGroupDialog.tsx
index 58a235b41..55c783125 100644
--- a/src/renderer/components/dialogs/EditTagGroupDialog.tsx
+++ b/src/renderer/components/dialogs/EditTagGroupDialog.tsx
@@ -17,7 +17,7 @@
*/
import React, { ChangeEvent, useEffect, useState } from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -193,7 +193,7 @@ function EditTagGroupDialog(props: Props) {
<ListItem style={{ paddingLeft: 0, paddingRight: 0 }}>
<ListItemText primary={t('tagBackgroundColor')} />
<TransparentBackground>
- <Button
+ <TsButton
onClick={() => setDisplayColorPicker(!displayColorPicker)}
data-tid="editTagGroupBackgroundColor"
style={{
@@ -207,7 +207,7 @@ function EditTagGroupDialog(props: Props) {
}}
>
&nbsp;
- </Button>
+ </TsButton>
</TransparentBackground>
{displayColorPicker && (
<ColorPickerDialog
@@ -221,7 +221,7 @@ function EditTagGroupDialog(props: Props) {
<ListItem style={{ paddingLeft: 0, paddingRight: 0 }}>
<ListItemText primary={t('core:tagForegroundColor')} />
<TransparentBackground>
- <Button
+ <TsButton
onClick={() => setDisplayTextColorPicker(!displayTextColorPicker)}
data-tid="editTagGroupForegroundColor"
style={{
@@ -236,7 +236,7 @@ function EditTagGroupDialog(props: Props) {
role="presentation"
>
&nbsp;
- </Button>
+ </TsButton>
</TransparentBackground>
{displayTextColorPicker && (
<ColorPickerDialog
@@ -261,8 +261,8 @@ function EditTagGroupDialog(props: Props) {
const renderActions = () => (
<DialogActions>
- <Button onClick={onClose}>{t('core:cancel')}</Button>
- <Button
+ <TsButton onClick={onClose}>{t('core:cancel')}</TsButton>
+ <TsButton
disabled={disableConfirmButton()}
onClick={onConfirm}
data-tid="editTagGroupConfirmButton"
@@ -270,7 +270,7 @@ function EditTagGroupDialog(props: Props) {
variant="contained"
>
{t('core:ok')}
- </Button>
+ </TsButton>
</DialogActions>
);
diff --git a/src/renderer/components/dialogs/FileUploadDialog.tsx b/src/renderer/components/dialogs/FileUploadDialog.tsx
index 9abc17778..3863a2d36 100644
--- a/src/renderer/components/dialogs/FileUploadDialog.tsx
+++ b/src/renderer/components/dialogs/FileUploadDialog.tsx
@@ -17,7 +17,7 @@
*/
import React, { useEffect } from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -242,9 +242,9 @@ function FileUploadDialog(props: Props) {
</Grid>
<Grid item xs={2}>
{abort && typeof abort === 'function' && (
- <Button onClick={() => abort()}>
+ <TsButton onClick={() => abort()}>
<CloseIcon />
- </Button>
+ </TsButton>
)}
</Grid>
<Grid item xs={12}>
@@ -258,7 +258,7 @@ function FileUploadDialog(props: Props) {
</DialogContent>
<DialogActions style={{ padding: '10px 30px 30px 30px' }}>
{!haveProgress && (
- <Button
+ <TsButton
data-tid="uploadCloseAndClearTID"
onClick={() => {
onClose();
@@ -267,19 +267,23 @@ function FileUploadDialog(props: Props) {
color="primary"
>
{t('core:closeAndClear')}
- </Button>
+ </TsButton>
)}
- <Button
+ <TsButton
data-tid="uploadMinimizeDialogTID"
onClick={onClose}
color="primary"
>
{t('core:minimize')}
- </Button>
+ </TsButton>
{haveProgress && (
- <Button data-tid="uploadStopAllTID" onClick={stopAll} color="primary">
+ <TsButton
+ data-tid="uploadStopAllTID"
+ onClick={stopAll}
+ color="primary"
+ >
{t('core:stopAll')}
- </Button>
+ </TsButton>
)}
</DialogActions>
</Dialog>
diff --git a/src/renderer/components/dialogs/ImportExportTagGroupsDialog.tsx b/src/renderer/components/dialogs/ImportExportTagGroupsDialog.tsx
index a0b0e51b0..2dadf43ec 100644
--- a/src/renderer/components/dialogs/ImportExportTagGroupsDialog.tsx
+++ b/src/renderer/components/dialogs/ImportExportTagGroupsDialog.tsx
@@ -17,7 +17,7 @@
*/
import React, { useRef, useState } from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -141,9 +141,9 @@ function ImportExportTagGroupsDialog(props: Props) {
<DialogCloseButton testId="closeIETagGroupsTID" onClose={onClose} />
</DialogTitle>
<DialogContent>
- <Button color="primary" onClick={handleToggleSelectAll}>
+ <TsButton color="primary" onClick={handleToggleSelectAll}>
{t('core:selectAllTagGroups')}
- </Button>
+ </TsButton>
<FormControl fullWidth={true}>
{tagGroupList.map(renderTagGroups)}
</FormControl>
@@ -151,8 +151,8 @@ function ImportExportTagGroupsDialog(props: Props) {
<DialogActions
style={fullScreen ? { padding: '10px 30px 30px 30px' } : {}}
>
- <Button onClick={props.onClose}>{t('core:cancel')}</Button>
- <Button
+ <TsButton onClick={props.onClose}>{t('core:cancel')}</TsButton>
+ <TsButton
disabled={!isSelected()}
onClick={onConfirm}
data-tid="confirmImportExport"
@@ -160,7 +160,7 @@ function ImportExportTagGroupsDialog(props: Props) {
variant="contained"
>
{props.dialogModeImport ? 'Import' : 'Export'}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/IsTruncatedConfirmDialog.tsx b/src/renderer/components/dialogs/IsTruncatedConfirmDialog.tsx
index 8c96886ba..34ce087d1 100644
--- a/src/renderer/components/dialogs/IsTruncatedConfirmDialog.tsx
+++ b/src/renderer/components/dialogs/IsTruncatedConfirmDialog.tsx
@@ -17,7 +17,7 @@
*/
import React from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -109,9 +109,9 @@ function IsTruncatedConfirmDialog(props: Props) {
</DialogContentText>
</DialogContent>
<DialogActions>
- <Button onClick={() => onClose()} color="primary">
+ <TsButton onClick={() => onClose()} color="primary">
{t('core:continue')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/KeyboardDialog.tsx b/src/renderer/components/dialogs/KeyboardDialog.tsx
index c52f03f97..e8b4711d0 100644
--- a/src/renderer/components/dialogs/KeyboardDialog.tsx
+++ b/src/renderer/components/dialogs/KeyboardDialog.tsx
@@ -18,7 +18,7 @@
import React from 'react';
import { useSelector } from 'react-redux';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -114,14 +114,14 @@ function KeyboardDialog(props: Props) {
<DialogActions
style={fullScreen ? { padding: '10px 30px 30px 30px' } : {}}
>
- <Button
+ <TsButton
data-tid="closeKeyboardDialog"
onClick={onClose}
color="primary"
variant="contained"
>
{t('core:ok')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/LicenseDialog.tsx b/src/renderer/components/dialogs/LicenseDialog.tsx
index 5574da424..548ae1feb 100644
--- a/src/renderer/components/dialogs/LicenseDialog.tsx
+++ b/src/renderer/components/dialogs/LicenseDialog.tsx
@@ -17,7 +17,7 @@
*/
import React from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -83,27 +83,27 @@ function LicenseDialog(props: Props) {
<DialogActions
style={fullScreen ? { padding: '10px 30px 30px 30px' } : {}}
>
- {/* <Button
+ {/* <TsButton
onClick={printLicense}
color="primary"
>
{t('core:print')}
- </Button> */}
- <Button
+ </TsButton> */}
+ <TsButton
data-tid="confirmLicenseDialog"
onClick={quitApp}
color="primary"
>
{t('core:quit')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
data-tid="agreeLicenseDialog"
onClick={props.onClose}
color="primary"
variant="contained"
>
{t('core:agreeLicense')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/LinkGeneratorDialog.tsx b/src/renderer/components/dialogs/LinkGeneratorDialog.tsx
index 0aa35bc7d..319c0a2f8 100644
--- a/src/renderer/components/dialogs/LinkGeneratorDialog.tsx
+++ b/src/renderer/components/dialogs/LinkGeneratorDialog.tsx
@@ -17,7 +17,7 @@
*/
import React, { ChangeEvent, useRef, useReducer, useEffect } from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -116,7 +116,7 @@ function LinkGeneratorDialog(props: Props) {
readOnly: true,
endAdornment: (
<InputAdornment position="start">
- <Button
+ <TsButton
data-tid="copySharingLinkTID"
onClick={() => {
const entryTitle = extractTitle(
@@ -135,7 +135,7 @@ function LinkGeneratorDialog(props: Props) {
color="primary"
>
{t('core:copy')}
- </Button>
+ </TsButton>
</InputAdornment>
),
}}
@@ -171,7 +171,7 @@ function LinkGeneratorDialog(props: Props) {
padding: fullScreen ? '10px 30px 30px 30px' : undefined,
}}
>
- <Button
+ <TsButton
variant="text"
data-tid="helpSearchButtonTID"
onClick={() => {
@@ -179,15 +179,15 @@ function LinkGeneratorDialog(props: Props) {
}}
>
{t('help')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
data-tid="closeLinkTID"
onClick={onClose}
variant="contained"
color="primary"
>
{t('core:close')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/MoveCopyFilesDialog.tsx b/src/renderer/components/dialogs/MoveCopyFilesDialog.tsx
index e77d47d7d..600eddf69 100644
--- a/src/renderer/components/dialogs/MoveCopyFilesDialog.tsx
+++ b/src/renderer/components/dialogs/MoveCopyFilesDialog.tsx
@@ -2,7 +2,7 @@ import React, { useState, useRef, useReducer, useEffect } from 'react';
import { useDispatch } from 'react-redux';
import { formatBytes } from '@tagspaces/tagspaces-common/misc';
import Paper from '@mui/material/Paper';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import Box from '@mui/material/Box';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
@@ -246,11 +246,11 @@ function MoveCopyFilesDialog(props: Props) {
<DialogActions
style={fullScreen ? { padding: '10px 30px 30px 30px' } : {}}
>
- <Button data-tid="closeMoveCopyDialog" onClick={() => onClose()}>
+ <TsButton data-tid="closeMoveCopyDialog" onClick={() => onClose()}>
{t('core:cancel')}
- </Button>
+ </TsButton>
{(!AppConfig.isAndroid || selectedDirs.length === 0) && (
- <Button
+ <TsButton
data-tid="confirmMoveFiles"
disabled={
!targetPath ||
@@ -262,9 +262,9 @@ function MoveCopyFilesDialog(props: Props) {
variant="contained"
>
{t('core:moveEntriesButton')}
- </Button>
+ </TsButton>
)}
- <Button
+ <TsButton
onClick={() => copyMove(true)}
data-tid="confirmCopyFiles"
disabled={!targetPath || targetPath === currentDirectoryPath}
@@ -272,7 +272,7 @@ function MoveCopyFilesDialog(props: Props) {
variant="contained"
>
{t('core:copyEntriesButton')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsx b/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsx
index 87434893e..80fb5c764 100644
--- a/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsx
+++ b/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsx
@@ -23,7 +23,7 @@
import React from 'react';
import { joinPaths, extractFileName } from '@tagspaces/tagspaces-common/paths';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import Paper from '@mui/material/Paper';
import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
@@ -162,10 +162,10 @@ function MoveOrCopyFilesDialog(props: Props) {
<DialogActions
style={fullScreen ? { padding: '10px 30px 30px 30px' } : {}}
>
- <Button data-tid="closeMoveOrCopyDialog" onClick={() => onClose()}>
+ <TsButton data-tid="closeMoveOrCopyDialog" onClick={() => onClose()}>
{t('core:cancel')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
onClick={() => {
if (selectedFiles) {
handleEntryExist(selectedFiles, targetDir, targetLocationId).then(
@@ -187,8 +187,8 @@ function MoveOrCopyFilesDialog(props: Props) {
variant="contained"
>
{t('core:moveEntriesButton')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
onClick={() => {
if (selectedFiles) {
handleEntryExist(selectedFiles, targetDir, targetLocationId).then(
@@ -210,7 +210,7 @@ function MoveOrCopyFilesDialog(props: Props) {
variant="contained"
>
{t('core:copyEntriesButton')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/NewFileDialog.tsx b/src/renderer/components/dialogs/NewFileDialog.tsx
index f99f1f908..d66ce132e 100644
--- a/src/renderer/components/dialogs/NewFileDialog.tsx
+++ b/src/renderer/components/dialogs/NewFileDialog.tsx
@@ -36,7 +36,7 @@ import { useOpenedEntryContext } from '-/hooks/useOpenedEntryContext';
import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';
import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
import { useTargetPathContext } from '-/components/dialogs/hooks/useTargetPathContext';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import AppConfig from '-/AppConfig';
import versionMeta from '-/version.json';
@@ -176,7 +176,7 @@ function NewFileDialog(props: Props) {
<DialogActions
style={fullScreen ? { padding: '10px 30px 30px 30px' } : {}}
>
- <Button
+ <TsButton
data-tid="backTID"
onClick={() => {
onClose();
@@ -184,8 +184,8 @@ function NewFileDialog(props: Props) {
color="primary"
>
{t('core:cancel')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
data-tid="createTID"
variant="contained"
onClick={() => {
@@ -195,7 +195,7 @@ function NewFileDialog(props: Props) {
disabled={haveError.current}
>
{t('core:ok')}
- </Button>
+ </TsButton>
</DialogActions>
)}
</Dialog>
diff --git a/src/renderer/components/dialogs/OnboardingDialog.tsx b/src/renderer/components/dialogs/OnboardingDialog.tsx
index 54d5bbd47..4573f0c53 100644
--- a/src/renderer/components/dialogs/OnboardingDialog.tsx
+++ b/src/renderer/components/dialogs/OnboardingDialog.tsx
@@ -19,7 +19,7 @@
import React, { useRef } from 'react';
import { useSelector, useDispatch } from 'react-redux';
import Slider from 'react-slick';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
import Typography from '@mui/material/Typography';
@@ -296,7 +296,7 @@ function OnboardingDialog(props: Props) {
Firefox. It is available for free in the official browser
stores.
</Typography>
- <Button
+ <TsButton
style={{
marginTop: 20,
marginLeft: 'auto',
@@ -307,12 +307,9 @@ function OnboardingDialog(props: Props) {
onClick={() => {
openURLExternally(Links.links.webClipper, true);
}}
- variant="outlined"
- size="small"
- color="primary"
>
Get the web clipper
- </Button>
+ </TsButton>
</div>
</div>
<div>
@@ -344,7 +341,7 @@ function OnboardingDialog(props: Props) {
offer various views for your folders which call{' '}
<b>perspectives</b>.
</Typography>
- <Button
+ <TsButton
style={{
marginTop: 20,
marginLeft: 'auto',
@@ -355,12 +352,9 @@ function OnboardingDialog(props: Props) {
onClick={() => {
openURLExternally(Links.links.productPro, true);
}}
- variant="outlined"
- size="small"
- color="primary"
>
More about TagSpaces Pro
- </Button>
+ </TsButton>
</div>
</div>
<div>
@@ -383,7 +377,7 @@ function OnboardingDialog(props: Props) {
If you want to learn more about how to use the application,
please start the introduction from the following screen.
</Typography>
- <Button
+ <TsButton
style={{
marginTop: 20,
marginLeft: 'auto',
@@ -392,12 +386,9 @@ function OnboardingDialog(props: Props) {
display: 'block',
}}
onClick={onClose}
- variant="outlined"
- size="small"
- color="primary"
>
Start using TagSpaces
- </Button>
+ </TsButton>
</div>
</div>
</Slider>
diff --git a/src/renderer/components/dialogs/OpenLinkDialog.tsx b/src/renderer/components/dialogs/OpenLinkDialog.tsx
index 866e1b045..262833be1 100644
--- a/src/renderer/components/dialogs/OpenLinkDialog.tsx
+++ b/src/renderer/components/dialogs/OpenLinkDialog.tsx
@@ -19,7 +19,7 @@
import React, { useState, useEffect } from 'react';
import useMediaQuery from '@mui/material/useMediaQuery';
import { useTheme } from '@mui/material/styles';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -131,10 +131,10 @@ function OpenLinkDialog(props: Props) {
</FormControl>
</DialogContent>
<DialogActions>
- <Button data-tid="closeOpenLinkDialog" onClick={onCancel}>
+ <TsButton data-tid="closeOpenLinkDialog" onClick={onCancel}>
{t('core:cancel')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
disabled={disableConfirmButton}
onClick={onConfirm}
data-tid="confirmOpenLink"
@@ -142,7 +142,7 @@ function OpenLinkDialog(props: Props) {
variant="contained"
>
{t('core:open')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/ProTeaserDialog.tsx b/src/renderer/components/dialogs/ProTeaserDialog.tsx
index d43cf6c63..65cdb948b 100644
--- a/src/renderer/components/dialogs/ProTeaserDialog.tsx
+++ b/src/renderer/components/dialogs/ProTeaserDialog.tsx
@@ -17,7 +17,7 @@
*/
import React from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
import Typography from '@mui/material/Typography';
@@ -135,28 +135,22 @@ function Slide(props: SlideProps) {
)}
<br />
{/* </div> */}
- <Button
+ <TsButton
onClick={() => {
openURLExternally(Links.links.productsOverview, true);
}}
- variant="outlined"
- color="primary"
- size="small"
>
Compare & Upgrade
- </Button>
+ </TsButton>
{ctaTitle && (
- <Button
+ <TsButton
onClick={() => {
openURLExternally(ctaURL, true);
}}
- style={{ marginLeft: 10 }}
- // variant="outlined"
- color="primary"
- size="small"
+ style={{ marginLeft: 5 }}
>
{ctaTitle}
- </Button>
+ </TsButton>
)}
</div>
</div>
diff --git a/src/renderer/components/dialogs/RenameEntryDialog.tsx b/src/renderer/components/dialogs/RenameEntryDialog.tsx
index ca4ee97e6..aa84ce07b 100644
--- a/src/renderer/components/dialogs/RenameEntryDialog.tsx
+++ b/src/renderer/components/dialogs/RenameEntryDialog.tsx
@@ -18,7 +18,7 @@
import React, { useReducer, useRef, useState } from 'react';
import { useDispatch, useSelector } from 'react-redux';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import TextField from '@mui/material/TextField';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
@@ -202,10 +202,10 @@ function RenameEntryDialog(props: Props) {
</FormControl>
</DialogContent>
<DialogActions>
- <Button data-tid="closeRenameEntryDialog" onClick={onClose}>
+ <TsButton data-tid="closeRenameEntryDialog" onClick={onClose}>
{t('core:cancel')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
disabled={disableConfirmButton.current}
onClick={onConfirm}
data-tid="confirmRenameEntry"
@@ -213,7 +213,7 @@ function RenameEntryDialog(props: Props) {
variant="contained"
>
{t('core:ok')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/ResolveConflictDialog.tsx b/src/renderer/components/dialogs/ResolveConflictDialog.tsx
index fb7b08223..99603fd4a 100644
--- a/src/renderer/components/dialogs/ResolveConflictDialog.tsx
+++ b/src/renderer/components/dialogs/ResolveConflictDialog.tsx
@@ -17,7 +17,7 @@
*/
import React from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -97,7 +97,7 @@ function ResolveConflictDialog(props: Props) {
>
{isSaveAs ? (
<>
- <Button
+ <TsButton
data-tid="backTID"
title={t('core:cancel')}
onClick={() => {
@@ -107,8 +107,8 @@ function ResolveConflictDialog(props: Props) {
color="primary"
>
{t('core:cancel')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
data-tid="saveTID"
title={t('core:save')}
onClick={() => {
@@ -125,11 +125,11 @@ function ResolveConflictDialog(props: Props) {
color="primary"
>
{t('core:save')}
- </Button>
+ </TsButton>
</>
) : (
<>
- <Button
+ <TsButton
data-tid="saveas"
title={t('core:saveAs')}
onClick={() => {
@@ -138,8 +138,8 @@ function ResolveConflictDialog(props: Props) {
color="primary"
>
{t('core:saveAs')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
data-tid="overrideTID"
title={t('core:override')}
onClick={() => {
@@ -151,7 +151,7 @@ function ResolveConflictDialog(props: Props) {
variant="contained"
>
{t('core:override')}
- </Button>
+ </TsButton>
</>
)}
</DialogActions>
diff --git a/src/renderer/components/dialogs/ThirdPartyLibsDialog.tsx b/src/renderer/components/dialogs/ThirdPartyLibsDialog.tsx
index b9e925e06..bd882524b 100644
--- a/src/renderer/components/dialogs/ThirdPartyLibsDialog.tsx
+++ b/src/renderer/components/dialogs/ThirdPartyLibsDialog.tsx
@@ -17,7 +17,7 @@
*/
import React from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
import DialogTitle from '@mui/material/DialogTitle';
@@ -58,14 +58,14 @@ function ThirdPartyLibsDialog(props: Props) {
<DialogActions
style={fullScreen ? { padding: '10px 30px 30px 30px' } : {}}
>
- <Button
+ <TsButton
data-tid="confirmThirdPartyLibsDialog"
onClick={onClose}
color="primary"
variant="contained"
>
{t('core:ok')}
- </Button>
+ </TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/components/CreateFile.tsx b/src/renderer/components/dialogs/components/CreateFile.tsx
index 4ca9d31aa..828e87788 100644
--- a/src/renderer/components/dialogs/components/CreateFile.tsx
+++ b/src/renderer/components/dialogs/components/CreateFile.tsx
@@ -18,6 +18,7 @@
import React, { useEffect, useReducer, useState } from 'react';
import { styled } from '@mui/material/styles';
+import TsButton from '-/components/TsButton';
import Button from '@mui/material/Button';
import ButtonGroup from '@mui/material/ButtonGroup';
import Typography from '@mui/material/Typography';
diff --git a/src/renderer/components/dialogs/settings/MapTileServerDialog.tsx b/src/renderer/components/dialogs/settings/MapTileServerDialog.tsx
index 65a73f9e3..b75589056 100644
--- a/src/renderer/components/dialogs/settings/MapTileServerDialog.tsx
+++ b/src/renderer/components/dialogs/settings/MapTileServerDialog.tsx
@@ -17,7 +17,7 @@
*/
import React, { useRef } from 'react';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import Dialog from '@mui/material/Dialog';
import DialogActions from '@mui/material/DialogActions';
import DialogContent from '@mui/material/DialogContent';
@@ -178,7 +178,7 @@ function MapTileServerDialog(props: Props) {
}}
>
{props.tileServer.uuid && (
- <Button
+ <TsButton
style={{
marginLeft: 10,
}}
@@ -189,24 +189,24 @@ function MapTileServerDialog(props: Props) {
}}
>
{t('core:delete')}
- </Button>
+ </TsButton>
)}
<div>
- <Button
+ <TsButton
data-tid="closeTileServerDialogTID"
onClick={props.onClose}
color="primary"
>
{t('core:closeButton')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
data-tid="saveTileServerDialogTID"
onClick={saveTileServer}
color="primary"
variant="contained"
>
{t('core:confirmSaveButton')}
- </Button>
+ </TsButton>
</div>
</DialogActions>
);
diff --git a/src/renderer/components/dialogs/settings/SettingsAdvanced.tsx b/src/renderer/components/dialogs/settings/SettingsAdvanced.tsx
index 9c7291ce9..c1892d619 100644
--- a/src/renderer/components/dialogs/settings/SettingsAdvanced.tsx
+++ b/src/renderer/components/dialogs/settings/SettingsAdvanced.tsx
@@ -22,7 +22,7 @@ import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
import ListItemText from '@mui/material/ListItemText';
import Tooltip from '-/components/Tooltip';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import CheckIcon from '@mui/icons-material/Check';
import EditIcon from '@mui/icons-material/Edit';
import IconButton from '@mui/material/IconButton';
@@ -109,16 +109,17 @@ function SettingsAdvanced(props: Props) {
return (
<List style={{ overflowX: 'hidden', overflowY: 'auto', height: '100%' }}>
<ListItem>
- <Button
+ <TsButton
data-tid="resetSettingsTID"
onClick={() => showResetSettings(true)}
color="secondary"
style={{ marginLeft: -7 }}
>
{t('core:resetSettings')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
data-tid="reloadAppTID"
+ style={{ marginLeft: 5 }}
onClick={() => {
if (AppConfig.isElectron) {
window.electronIO.ipcRenderer.sendMessage('reloadWindow');
@@ -129,7 +130,7 @@ function SettingsAdvanced(props: Props) {
color="secondary"
>
{t('core:reloadApplication')}
- </Button>
+ </TsButton>
</ListItem>
<ListItem>
<ListItemText primary={t('enableMobileMode')} />
@@ -381,12 +382,12 @@ function SettingsAdvanced(props: Props) {
<ListItem>
<ListItemText primary={t('core:tileServerTitle')} />
<ListItemSecondaryAction style={{ right: 0 }}>
- <Button
+ <TsButton
color="primary"
onClick={(event) => handleEditTileServerClick(event, {}, true)}
>
{t('tileServerDialogAdd')}
- </Button>
+ </TsButton>
</ListItemSecondaryAction>
</ListItem>
<List
diff --git a/src/renderer/components/dialogs/settings/SettingsDialog.tsx b/src/renderer/components/dialogs/settings/SettingsDialog.tsx
index 15ce0b838..e732dfdc3 100644
--- a/src/renderer/components/dialogs/settings/SettingsDialog.tsx
+++ b/src/renderer/components/dialogs/settings/SettingsDialog.tsx
@@ -19,7 +19,7 @@
import React, { useState, useEffect } from 'react';
import { styled } from '@mui/material/styles';
import { useSelector } from 'react-redux';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import useMediaQuery from '@mui/material/useMediaQuery';
import { useTheme } from '@mui/material/styles';
import Tabs from '@mui/material/Tabs';
@@ -192,7 +192,7 @@ function SettingsDialog(props: Props) {
padding: fullScreen ? '10px 30px 30px 30px' : undefined,
}}
>
- <Button
+ <TsButton
onClick={() =>
openURLExternally(Links.documentationLinks.settings, true)
}
@@ -200,15 +200,10 @@ function SettingsDialog(props: Props) {
style={{ float: 'left' }}
>
{t('core:help')}
- </Button>
- <Button
- data-tid="closeSettingsDialog"
- onClick={props.onClose}
- color="primary"
- variant="contained"
- >
+ </TsButton>
+ <TsButton data-tid="closeSettingsDialog" onClick={props.onClose}>
{t('core:closeButton')}
- </Button>
+ </TsButton>
</DialogActions>
);
diff --git a/src/renderer/components/dialogs/settings/SettingsExtensions.tsx b/src/renderer/components/dialogs/settings/SettingsExtensions.tsx
index 51cce4df8..7715d9651 100644
--- a/src/renderer/components/dialogs/settings/SettingsExtensions.tsx
+++ b/src/renderer/components/dialogs/settings/SettingsExtensions.tsx
@@ -27,7 +27,7 @@ import List from '@mui/material/List';
import ListItem from '@mui/material/ListItem';
import IconButton from '@mui/material/IconButton';
import Switch from '@mui/material/Switch';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import DeleteIcon from '@mui/icons-material/Delete';
import { actions as SettingsActions, isDevMode } from '-/reducers/settings';
import { actions as AppActions, AppDispatch } from '-/reducers/app';
@@ -211,13 +211,13 @@ function SettingsExtensions() {
)}
{devMode && AppConfig.isElectron && (
<Box style={{ textAlign: 'center' }}>
- <Button
+ <TsButton
data-tid="installExtensionTID"
onClick={() => fileInputRef.current.click()}
color="secondary"
>
{t('core:installExtension')}
- </Button>
+ </TsButton>
<input
style={{ display: 'none' }}
ref={fileInputRef}
diff --git a/src/renderer/components/dialogs/settings/SettingsFileTypes.tsx b/src/renderer/components/dialogs/settings/SettingsFileTypes.tsx
index 496c7e89f..f591ea36d 100644
--- a/src/renderer/components/dialogs/settings/SettingsFileTypes.tsx
+++ b/src/renderer/components/dialogs/settings/SettingsFileTypes.tsx
@@ -25,7 +25,7 @@ import Input from '@mui/material/Input';
import FormControl from '@mui/material/FormControl';
import IconButton from '@mui/material/IconButton';
import RemoveIcon from '@mui/icons-material/RemoveCircle';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import Select from '@mui/material/Select';
import Table from '@mui/material/Table';
import TableBody from '@mui/material/TableBody';
@@ -438,7 +438,7 @@ function SettingsFileTypes() {
<TableCell sx={{ padding: '0 5px 20px 5px' }}>
<TransparentBackground>
<Tooltip title={t('core:colorPickerDialogTitle')}>
- <Button
+ <TsButton
data-tid="settingsFileTypes_openColorPicker_"
className={classes.colorChooserButton}
style={{
@@ -453,7 +453,7 @@ function SettingsFileTypes() {
>
&nbsp;
<div />
- </Button>
+ </TsButton>
</Tooltip>
</TransparentBackground>
<Tooltip title={t('removeFileType', { itemType: item.type })}>
@@ -482,16 +482,16 @@ function SettingsFileTypes() {
background: 'transparent',
}}
>
- <Button
+ <TsButton
data-tid="addNewFileTypeTID"
onClick={onAddFileType}
color="secondary"
style={{ width: '50%' }}
>
{t('core:addNewFileType')}
- </Button>
+ </TsButton>
{devMode && (
- <Button
+ <TsButton
data-tid="resetFileTypesTID"
onClick={() => {
selectedItem.current = undefined;
@@ -504,7 +504,7 @@ function SettingsFileTypes() {
style={{ width: '50%' }}
>
{t('core:resetFileType')}
- </Button>
+ </TsButton>
)}
{isConfirmDialogOpened && (
<ConfirmDialog
diff --git a/src/renderer/components/dialogs/settings/SettingsGeneral.tsx b/src/renderer/components/dialogs/settings/SettingsGeneral.tsx
index f090652d4..1008236c7 100644
--- a/src/renderer/components/dialogs/settings/SettingsGeneral.tsx
+++ b/src/renderer/components/dialogs/settings/SettingsGeneral.tsx
@@ -25,7 +25,7 @@ import Typography from '@mui/material/Typography';
import MenuItem from '@mui/material/MenuItem';
import Switch from '@mui/material/Switch';
import Tooltip from '-/components/Tooltip';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import InfoMuiIcon from '@mui/icons-material/InfoOutlined';
import InfoIcon from '-/components/InfoIcon';
import CheckIcon from '@mui/icons-material/Check';
@@ -177,11 +177,11 @@ function SettingsGeneral() {
>
<ListItemText primary={t('core:fileTaggingSetting')} />
{AppConfig.useSidecarsForFileTaggingDisableSetting ? (
- <Button size="small" variant="outlined" disabled>
+ <TsButton disabled>
{persistTagsInSidecarFile
? t('core:useSidecarFile')
: t('core:renameFile')}
- </Button>
+ </TsButton>
) : (
<ToggleButtonGroup
value={persistTagsInSidecarFile}
@@ -350,9 +350,8 @@ function SettingsGeneral() {
<ListItem>
<ListItemText primary={t('core:tagBackgroundColor')} />
<TransparentBackground>
- <Button
+ <TsButton
data-tid="settingsToggleDefaultTagBackgroundColor"
- size="small"
style={{
backgroundColor: settings.tagBackgroundColor,
border: '1px solid lightgray',
@@ -360,7 +359,7 @@ function SettingsGeneral() {
onClick={toggleDefaultTagBackgroundColorPicker}
>
&nbsp;
- </Button>
+ </TsButton>
</TransparentBackground>
{displayColorPicker && (
<ColorPickerDialog
@@ -376,9 +375,8 @@ function SettingsGeneral() {
<ListItem>
<ListItemText primary={t('core:tagForegroundColor')} />
<TransparentBackground>
- <Button
+ <TsButton
data-tid="settingsToggleDefaultTagForegroundColor"
- size="small"
style={{
border: '1px solid lightgray',
backgroundColor: settings.tagTextColor,
@@ -386,7 +384,7 @@ function SettingsGeneral() {
onClick={toggleDefaultTagTextColorPicker}
>
&nbsp;
- </Button>
+ </TsButton>
</TransparentBackground>
{displayTextColorPicker && (
<ColorPickerDialog
diff --git a/src/renderer/containers/PageNotification.tsx b/src/renderer/containers/PageNotification.tsx
index c43db9fb1..ccd6b0e36 100644
--- a/src/renderer/containers/PageNotification.tsx
+++ b/src/renderer/containers/PageNotification.tsx
@@ -20,7 +20,7 @@ import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { styled } from '@mui/material/styles';
import Snackbar from '@mui/material/Snackbar';
-import Button from '@mui/material/Button';
+import TsButton from '-/components/TsButton';
import IconButton from '@mui/material/IconButton';
import CloseIcon from '@mui/icons-material/Close';
import { getLastPublishedVersion } from '-/reducers/settings';
@@ -125,15 +125,14 @@ function PageNotification() {
autoHideDuration={undefined}
message={i18n.t('indexing') + ': ' + isIndexing}
action={[
- <Button
+ <TsButton
key="cancelIndexButton"
color="secondary"
- size="small"
onClick={() => cancelDirectoryIndexing()}
data-tid="cancelDirectoryIndexing"
>
{t('core:cancelIndexing')}
- </Button>,
+ </TsButton>,
]}
/>
<TSNotification
@@ -142,30 +141,23 @@ function PageNotification() {
autoHideDuration={undefined}
message={'Version ' + lastPublishedVersion + ' available.'}
action={[
- <Button
- key="laterButton"
- color="secondary"
- size="small"
- onClick={skipRelease}
- >
+ <TsButton key="laterButton" color="secondary" onClick={skipRelease}>
{t('core:later')}
- </Button>,
- <Button
+ </TsButton>,
+ <TsButton
key="changelogButton"
color="secondary"
- size="small"
onClick={openChangelogPage}
>
{t('core:releaseNotes')}
- </Button>,
- <Button
+ </TsButton>,
+ <TsButton
key="latestVersionButton"
color="primary"
- size="small"
onClick={getLatestVersion}
>
{t('core:getItNow')}
- </Button>,
+ </TsButton>,
]}
/>
</>
diff --git a/src/renderer/perspectives/grid/components/GridSettingsDialog.tsx b/src/renderer/perspectives/grid/components/GridSettingsDialog.tsx
index 9a8cbcda4..13f755b7e 100644
--- a/src/renderer/perspectives/grid/components/GridSettingsDialog.tsx
+++ b/src/renderer/perspectives/grid/components/GridSettingsDialog.tsx
@@ -28,7 +28,6 @@ import {
Switch,
Divider,
MenuItem,
- Button,
FormHelperText,
Typography,
Paper,
@@ -43,8 +42,8 @@ import RadioCheckedIcon from '@mui/icons-material/RadioButtonChecked';
import RadioUncheckedIcon from '@mui/icons-material/RadioButtonUnchecked';
import DraggablePaper from '-/components/DraggablePaper';
import DialogCloseButton from '-/components/dialogs/DialogCloseButton';
-import TsTextField from '-/components/TsTextField';
import TsSelect from '-/components/TsSelect';
+import TsButton from '-/components/TsButton';
import { Pro } from '-/pro';
import { useTheme } from '@mui/material/styles';
import { useTranslation } from 'react-i18next';
@@ -138,7 +137,7 @@ function GridSettingsDialog(props: Props) {
{t('core:folderWithCustomPerspectiveSetting')}
</Typography>
<br />
- <Button
+ <TsButton
data-tid="resetLocalSettingsTID"
title={t('core:resetLocalSettings')}
onClick={() => {
@@ -148,7 +147,7 @@ function GridSettingsDialog(props: Props) {
}}
>
{t('core:resetLocalSettings')}
- </Button>
+ </TsButton>
</>
)}
<Divider />
@@ -355,10 +354,10 @@ function GridSettingsDialog(props: Props) {
</FormControl>
</DialogContent>
<DialogActions style={{ justifyContent: 'space-between' }}>
- <Button data-tid="gridPerspectiveHelp" onClick={openHelpWebPage}>
+ <TsButton data-tid="gridPerspectiveHelp" onClick={openHelpWebPage}>
{t('core:help')}
- </Button>
- <Button
+ </TsButton>
+ <TsButton
data-tid="defaultSettings"
onClick={() => {
saveSettings(true);
@@ -367,9 +366,9 @@ function GridSettingsDialog(props: Props) {
color="primary"
>
{t('core:defaultSettings')}
- </Button>
+ </TsButton>
{Pro && (
- <Button
+ <TsButton
data-tid="directorySettings"
onClick={() => {
saveSettings(false);
@@ -378,7 +377,7 @@ function GridSettingsDialog(props: Props) {
color="primary"
>
{t('core:directorySettings')}
- </Button>
+ </TsButton>
)}
</DialogActions>
</Dialog>