Skip to content

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

chore: UI improvements

Ilian Sapundshiev5c983bbdcddd
diff --git a/package.json b/package.json
index 30e2055c6..e0ac7ec1d 100644
--- a/package.json
+++ b/package.json
@@ -234,7 +234,7 @@
"uuid": "^9.0.0"
},
"optionalDependencies": {
- "@tagspacespro/tagspacespro": "5.0.83"
+ "@tagspacespro/tagspacespro": "5.0.85"
},
"devDependencies": {
"@electron/notarize": "^2.3.2",
diff --git a/src/renderer/AppConfig.ts b/src/renderer/AppConfig.ts
index 5f703f862..f70a30585 100644
--- a/src/renderer/AppConfig.ts
+++ b/src/renderer/AppConfig.ts
@@ -30,5 +30,7 @@ AppConfig.autoSaveInterval = 40000;
AppConfig.maxCollectedTag = 500;
AppConfig.maxLoops = 2;
AppConfig.defaultFolderColor = 'gray';
+AppConfig.defaultCSSRadius = 10;
+AppConfig.defaultSpaceBetweenButtons = 10;
export default AppConfig;
diff --git a/src/renderer/components/DirectoryListView.tsx b/src/renderer/components/DirectoryListView.tsx
index a80c61606..aa140e1e9 100644
--- a/src/renderer/components/DirectoryListView.tsx
+++ b/src/renderer/components/DirectoryListView.tsx
@@ -1,7 +1,7 @@
import React, { useRef, useState, useEffect } from 'react';
import { useSelector } from 'react-redux';
import TsButton from '-/components/TsButton';
-import Select from '@mui/material/Select';
+import TsSelect from '-/components/TsSelect';
import MenuItem from '@mui/material/MenuItem';
import FormControl from '@mui/material/FormControl';
import List from '@mui/material/List';
@@ -80,11 +80,11 @@ function DirectoryListView(props: Props) {
}}
>
<Typography style={{ display: 'inline' }} variant="subtitle2">
- {t('location')}:&nbsp;
+ {t('targetLocation')}:&nbsp;
</Typography>
- <Select
- fullWidth
- style={{ display: 'inline' }}
+ <TsSelect
+ fullWidth={true}
+ // style={{ display: 'inline' }}
onChange={handleLocationChange}
value={chosenLocationId.current}
>
@@ -95,7 +95,7 @@ function DirectoryListView(props: Props) {
<span style={{ width: '100%' }}>{location.name}</span>
</MenuItem>
))}
- </Select>
+ </TsSelect>
</FormControl>
);
}
@@ -158,9 +158,8 @@ function DirectoryListView(props: Props) {
<div style={{ marginTop: 10 }}>
{getDirLocations()}
<TsButton
- variant="text"
startIcon={<ParentFolderIcon />}
- style={{ margin: 5 }}
+ style={{ marginTop: 10, marginBottom: 10 }}
data-tid="navigateToParentTID"
onClick={() => {
if (chosenDirectory.current) {
@@ -177,9 +176,8 @@ function DirectoryListView(props: Props) {
{t('core:navigateToParentDirectory')}
</TsButton>
<TsButton
- variant="text"
startIcon={<NewFolderIcon />}
- style={{ margin: 5 }}
+ style={{ marginLeft: 5, marginTop: 10, marginBottom: 10 }}
data-tid="newSubdirectoryTID"
onClick={() => {
openCreateDirectoryDialog(chosenDirectory.current, (newDirPath) => {
@@ -194,7 +192,7 @@ function DirectoryListView(props: Props) {
<List
dense
style={{
- borderRadius: 5,
+ borderRadius: AppConfig.defaultCSSRadius,
border: '1px solid gray',
maxHeight: 300,
overflowY: 'auto',
diff --git a/src/renderer/components/EditDescription.tsx b/src/renderer/components/EditDescription.tsx
index 21d38e3eb..589579409 100644
--- a/src/renderer/components/EditDescription.tsx
+++ b/src/renderer/components/EditDescription.tsx
@@ -7,6 +7,7 @@ import { useFilePropertiesContext } from '-/hooks/useFilePropertiesContext';
import EditDescriptionButtons from '-/components/EditDescriptionButtons';
import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
import { Pro } from '-/pro';
+import AppConfig from '-/AppConfig';
const PREFIX = 'EditDescription';
@@ -15,9 +16,8 @@ const classes = {
};
const EditDescriptionRoot = styled('div')(({ theme }) => ({
- height: '90%',
+ height: 'calc(100% - 20px)',
[`& .${classes.mdHelpers}`]: {
- borderRadius: '0.25rem',
paddingLeft: '0.25rem',
paddingRight: '0.25rem',
backgroundColor: '#bcc0c561',
diff --git a/src/renderer/components/EditDescriptionButtons.tsx b/src/renderer/components/EditDescriptionButtons.tsx
index 70391e76a..f2f06dc17 100644
--- a/src/renderer/components/EditDescriptionButtons.tsx
+++ b/src/renderer/components/EditDescriptionButtons.tsx
@@ -4,6 +4,7 @@ import { ProTooltip } from '-/components/HelperComponents';
import { Pro } from '-/pro';
import { useTranslation } from 'react-i18next';
import { useFilePropertiesContext } from '-/hooks/useFilePropertiesContext';
+import AppConfig from '-/AppConfig';
/*export interface DescriptionChangedRef {
setDescriptionChanged: (changed: boolean) => void;
@@ -55,9 +56,15 @@ const EditDescriptionButtons: React.FC = () => {
// };
return (
- <span style={{ float: 'left' }}>
+ <div
+ style={{
+ float: 'left',
+ marginBottom: AppConfig.defaultSpaceBetweenButtons,
+ }}
+ >
{isEditDescriptionMode && (
<TsButton
+ style={{ marginRight: AppConfig.defaultSpaceBetweenButtons }}
onClick={() => {
setEditDescriptionMode(false);
}}
@@ -74,7 +81,6 @@ const EditDescriptionButtons: React.FC = () => {
<ProTooltip tooltip={t('editDescription')}>
<TsButton
data-tid="editDescriptionTID"
- color="primary"
disabled={!Pro || isEditMode}
onClick={() => {
if (isEditDescriptionMode) {
@@ -88,7 +94,7 @@ const EditDescriptionButtons: React.FC = () => {
: t('core:editDescription')}
</TsButton>
</ProTooltip>
- </span>
+ </div>
);
};
diff --git a/src/renderer/components/EntryContainer.tsx b/src/renderer/components/EntryContainer.tsx
index 11c14d091..d520d66b6 100644
--- a/src/renderer/components/EntryContainer.tsx
+++ b/src/renderer/components/EntryContainer.tsx
@@ -588,7 +588,6 @@ function EntryContainer() {
checked={openedEntry.meta && openedEntry.meta.autoSave}
onChange={toggleAutoSave}
name="autoSave"
- color="primary"
/>
</Tooltip>
);
@@ -636,13 +635,12 @@ function EntryContainer() {
data-tid="fileContainerSaveFile"
size="small"
variant="outlined"
- color="primary"
startIcon={desktopMode && <SaveIcon />}
loading={isSavingInProgress.current}
style={{
borderRadius: 'unset',
- borderTopRightRadius: 10,
- borderBottomRightRadius: 10,
+ borderTopRightRadius: AppConfig.defaultCSSRadius,
+ borderBottomRightRadius: AppConfig.defaultCSSRadius,
}}
>
{t('core:save')}
diff --git a/src/renderer/components/EntryProperties.tsx b/src/renderer/components/EntryProperties.tsx
index 1de33fd52..0407f2711 100644
--- a/src/renderer/components/EntryProperties.tsx
+++ b/src/renderer/components/EntryProperties.tsx
@@ -95,6 +95,7 @@ import { generateClipboardLink } from '-/utils/dom';
import { useFilePropertiesContext } from '-/hooks/useFilePropertiesContext';
import useFirstRender from '-/utils/useFirstRender';
import { useEditedEntryMetaContext } from '-/hooks/useEditedEntryMetaContext';
+import AppConfig from '-/AppConfig';
const PREFIX = 'EntryProperties';
@@ -705,7 +706,6 @@ function EntryProperties(props: Props) {
<br />
<p>
<TsButton
- color="primary"
onClick={() => {
openUrl(
'https://www.openstreetmap.org/?mlat=' +
@@ -725,8 +725,9 @@ function EntryProperties(props: Props) {
OpenStreetMap
</TsButton>
<TsButton
- color="primary"
- style={{ marginLeft: 5 }}
+ style={{
+ marginLeft: AppConfig.defaultSpaceBetweenButtons,
+ }}
onClick={() => {
openUrl(
'https://maps.google.com/?q=' +
diff --git a/src/renderer/components/HowToStart.tsx b/src/renderer/components/HowToStart.tsx
index f2b1c1f9f..cd9f226b7 100644
--- a/src/renderer/components/HowToStart.tsx
+++ b/src/renderer/components/HowToStart.tsx
@@ -279,8 +279,7 @@ function HowToStart() {
onClick={() => {
openURLExternally(link, true);
}}
- variant="text"
- color="primary"
+ //variant="text"
>
{title}
</TsButton>
diff --git a/src/renderer/components/MobileNavigation.tsx b/src/renderer/components/MobileNavigation.tsx
index b9865c344..91c267f3b 100644
--- a/src/renderer/components/MobileNavigation.tsx
+++ b/src/renderer/components/MobileNavigation.tsx
@@ -189,10 +189,8 @@ function MobileNavigation(props: Props) {
<CustomLogo />
<Box style={{ width: '100%', textAlign: 'center' }}>
<ButtonGroup
- // variant="contained"
ref={anchorRef}
aria-label="split button"
- color="primary"
style={{
textAlign: 'center',
}}
@@ -209,8 +207,8 @@ function MobileNavigation(props: Props) {
startIcon={<CreateFileIcon />}
style={{
borderRadius: 'unset',
- borderTopLeftRadius: 10,
- borderBottomLeftRadius: 10,
+ borderTopLeftRadius: AppConfig.defaultCSSRadius,
+ borderBottomLeftRadius: AppConfig.defaultCSSRadius,
}}
>
<Box
@@ -233,8 +231,8 @@ function MobileNavigation(props: Props) {
}}
style={{
borderRadius: 'unset',
- borderTopRightRadius: 10,
- borderBottomRightRadius: 10,
+ borderTopRightRadius: AppConfig.defaultCSSRadius,
+ borderBottomRightRadius: AppConfig.defaultCSSRadius,
}}
startIcon={<OpenLinkIcon />}
>
diff --git a/src/renderer/components/PathBreadcrumbs.tsx b/src/renderer/components/PathBreadcrumbs.tsx
index 591c8dc85..2fe2d0355 100644
--- a/src/renderer/components/PathBreadcrumbs.tsx
+++ b/src/renderer/components/PathBreadcrumbs.tsx
@@ -34,6 +34,7 @@ import { useTranslation } from 'react-i18next';
import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';
import { useSelectedEntriesContext } from '-/hooks/useSelectedEntriesContext';
+import AppConfig from '-/AppConfig';
const StyledBreadcrumb = styled(Chip)(({ theme }) => {
const backgroundColor =
@@ -42,6 +43,7 @@ const StyledBreadcrumb = styled(Chip)(({ theme }) => {
: theme.palette.grey[800];
return {
backgroundColor,
+ borderRadius: AppConfig.defaultCSSRadius,
height: theme.spacing(4),
color: theme.palette.text.primary,
fontWeight: theme.typography.fontWeightRegular,
diff --git a/src/renderer/components/ProTeaser.tsx b/src/renderer/components/ProTeaser.tsx
index 16cf6475c..bb451cb3b 100644
--- a/src/renderer/components/ProTeaser.tsx
+++ b/src/renderer/components/ProTeaser.tsx
@@ -31,6 +31,7 @@ import Links from 'assets/links';
import { openURLExternally } from '-/services/utils-io';
import { useTranslation } from 'react-i18next';
import { useProTeaserDialogContext } from '-/components/dialogs/hooks/useProTeaserDialogContext';
+import AppConfig from '-/AppConfig';
interface Props {
setShowTeaserBanner: (teaserVisibility: boolean) => void;
@@ -106,7 +107,7 @@ function ProTeaser(props: Props) {
{t('showMeMore')}
</TsButton>
<TsButton
- style={{ marginLeft: 5 }}
+ style={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}
onClick={(event: any) => {
event.preventDefault();
event.stopPropagation();
diff --git a/src/renderer/components/Revisions.tsx b/src/renderer/components/Revisions.tsx
index 0f0bf76ff..1768bbb7f 100644
--- a/src/renderer/components/Revisions.tsx
+++ b/src/renderer/components/Revisions.tsx
@@ -211,7 +211,7 @@ function Revisions() {
data-tid="deleteRevisionsTID"
size="large"
>
- <DeleteIcon color="primary" />
+ <DeleteIcon />
</IconButton>
</Tooltip>
</TableCell>
@@ -244,7 +244,7 @@ function Revisions() {
data-tid="viewRevisionTID"
size="large"
>
- <PreviewIcon color="primary" />
+ <PreviewIcon />
</IconButton>
</Tooltip>
<Tooltip title={t('core:restore')}>
@@ -254,7 +254,7 @@ function Revisions() {
data-tid="restoreRevisionTID"
size="large"
>
- <RestoreIcon color="primary" />
+ <RestoreIcon />
</IconButton>
</Tooltip>
<Tooltip title={t('core:delete')}>
@@ -264,7 +264,7 @@ function Revisions() {
data-tid="deleteRevisionTID"
size="large"
>
- <DeleteIcon color="primary" />
+ <DeleteIcon />
</IconButton>
</Tooltip>
</TableCell>
diff --git a/src/renderer/components/SearchAutocomplete.tsx b/src/renderer/components/SearchAutocomplete.tsx
index 89f252d23..47464a037 100644
--- a/src/renderer/components/SearchAutocomplete.tsx
+++ b/src/renderer/components/SearchAutocomplete.tsx
@@ -1482,7 +1482,6 @@ function SearchAutocomplete(props: Props) {
marginLeft: 10,
marginTop: 3,
}}
- color="primary"
onClick={clickSearchButton}
>
{t('searchTitle')}
diff --git a/src/renderer/components/SearchPopover.tsx b/src/renderer/components/SearchPopover.tsx
index f6e3fea98..da659c5a0 100644
--- a/src/renderer/components/SearchPopover.tsx
+++ b/src/renderer/components/SearchPopover.tsx
@@ -76,6 +76,7 @@ import { useTranslation } from 'react-i18next';
import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
import { useLocationIndexContext } from '-/hooks/useLocationIndexContext';
import { useSavedSearchesContext } from '-/hooks/useSavedSearchesContext';
+import AppConfig from '-/AppConfig';
const SaveSearchDialog = Pro && Pro.UI ? Pro.UI.SaveSearchDialog : false;
@@ -1087,7 +1088,7 @@ function SearchPopover(props: Props) {
{t('resetBtn')}
</TsButton>
<TsButton
- style={{ marginLeft: 5 }}
+ style={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}
variant="contained"
disabled={isIndexing !== undefined}
id="searchButtonAdvTID"
diff --git a/src/renderer/components/SplitButton.tsx b/src/renderer/components/SplitButton.tsx
index c1d8746b0..747532919 100644
--- a/src/renderer/components/SplitButton.tsx
+++ b/src/renderer/components/SplitButton.tsx
@@ -61,14 +61,11 @@ export default function SplitButton(props: Props) {
<Grid item xs={12}>
<ButtonGroup
variant="contained"
- color="primary"
ref={anchorRef}
aria-label="split button"
>
<Button onClick={handleToggle}>{options[selectedIndex].value}</Button>
<Button
- color="primary"
- size="small"
aria-controls={open ? 'split-button-menu' : undefined}
aria-expanded={open ? 'true' : undefined}
aria-label="select merge strategy"
diff --git a/src/renderer/components/TsButton.tsx b/src/renderer/components/TsButton.tsx
index 1736f0c0e..e58f91021 100644
--- a/src/renderer/components/TsButton.tsx
+++ b/src/renderer/components/TsButton.tsx
@@ -20,6 +20,7 @@ import React from 'react';
import { useSelector } from 'react-redux';
import Button, { ButtonProps } from '@mui/material/Button';
import { isDesktopMode } from '-/reducers/settings';
+import AppConfig from '-/AppConfig';
export type TSButtonProps = ButtonProps & {};
@@ -33,7 +34,7 @@ function TsButton(props: TSButtonProps) {
variant="outlined" // text outlined contained
{...props}
style={{
- borderRadius: 10,
+ borderRadius: AppConfig.defaultCSSRadius,
// fontSize: 14,
// textTransform: 'capitalize',
...style,
diff --git a/src/renderer/components/TsSelect.tsx b/src/renderer/components/TsSelect.tsx
index a15d2b8d8..47f6262cd 100644
--- a/src/renderer/components/TsSelect.tsx
+++ b/src/renderer/components/TsSelect.tsx
@@ -21,6 +21,7 @@ import { useSelector } from 'react-redux';
import TextField, { TextFieldProps } from '@mui/material/TextField';
import FormHelperText from '@mui/material/FormHelperText';
import { isDesktopMode } from '-/reducers/settings';
+import AppConfig from '-/AppConfig';
type TSSelectProps = TextFieldProps & {};
@@ -34,7 +35,10 @@ function TsSelect(props: TSSelectProps) {
{label}
</FormHelperText>
<TextField
- style={{ cursor: 'context-menu', marginTop: 0 }}
+ style={{
+ cursor: 'context-menu',
+ marginTop: 0,
+ }}
margin="dense"
size={desktopMode ? 'small' : 'medium'}
variant="outlined"
diff --git a/src/renderer/components/TsTextField.tsx b/src/renderer/components/TsTextField.tsx
index 7865058b3..a5e5fb311 100644
--- a/src/renderer/components/TsTextField.tsx
+++ b/src/renderer/components/TsTextField.tsx
@@ -103,7 +103,10 @@ function TsTextField(props: TSTextFieldProps) {
)}
<TextField
onContextMenu={handleContextMenu}
- style={{ cursor: 'context-menu', marginTop: 0 }}
+ style={{
+ cursor: 'context-menu',
+ marginTop: 0,
+ }}
margin="dense"
size={desktopMode ? 'small' : 'medium'}
variant="outlined"
diff --git a/src/renderer/components/dialogs/AddRemoveTagsDialog.tsx b/src/renderer/components/dialogs/AddRemoveTagsDialog.tsx
index 2ff7d2294..ed9026e32 100644
--- a/src/renderer/components/dialogs/AddRemoveTagsDialog.tsx
+++ b/src/renderer/components/dialogs/AddRemoveTagsDialog.tsx
@@ -207,7 +207,6 @@ function AddRemoveTagsDialog(props: Props) {
<TsButton
data-tid="cleanTagsMultipleEntries"
disabled={selected.length < 1}
- color="primary"
onClick={removeAllTagsAction}
>
{t('core:tagOperationCleanTags')}
@@ -215,7 +214,6 @@ function AddRemoveTagsDialog(props: Props) {
<TsButton
data-tid="removeTagsMultipleEntries"
disabled={disabledButtons}
- color="primary"
onClick={removeTagsAction}
>
{t('core:tagOperationRemoveTag')}
@@ -223,7 +221,6 @@ function AddRemoveTagsDialog(props: Props) {
<TsButton
data-tid="addTagsMultipleEntries"
disabled={disabledButtons}
- color="primary"
variant="contained"
onClick={addTagsAction}
>
diff --git a/src/renderer/components/dialogs/AddTagToTagGroupDialog.tsx b/src/renderer/components/dialogs/AddTagToTagGroupDialog.tsx
index 391633de9..e3035c00c 100644
--- a/src/renderer/components/dialogs/AddTagToTagGroupDialog.tsx
+++ b/src/renderer/components/dialogs/AddTagToTagGroupDialog.tsx
@@ -116,7 +116,6 @@ function AddTagToTagGroupDialog(props: Props) {
disabled={tagGroup === undefined}
onClick={onConfirm}
data-tid="createTagsConfirmButton"
- color="primary"
variant="contained"
>
{t('core:ok')}
diff --git a/src/renderer/components/dialogs/ColorPickerDialog.tsx b/src/renderer/components/dialogs/ColorPickerDialog.tsx
index 8b7bff345..a4a8b5d9f 100644
--- a/src/renderer/components/dialogs/ColorPickerDialog.tsx
+++ b/src/renderer/components/dialogs/ColorPickerDialog.tsx
@@ -117,10 +117,9 @@ function ColorPickerDialog(props: Props) {
{t('core:cancel')}
</TsButton>
<TsButton
- onClick={onConfirm}
variant="contained"
+ onClick={onConfirm}
data-tid="colorPickerConfirm"
- color="primary"
>
{t('core:ok')}
</TsButton>
diff --git a/src/renderer/components/dialogs/ConfirmDialog.tsx b/src/renderer/components/dialogs/ConfirmDialog.tsx
index 07e39e69c..4e9f0844e 100644
--- a/src/renderer/components/dialogs/ConfirmDialog.tsx
+++ b/src/renderer/components/dialogs/ConfirmDialog.tsx
@@ -90,7 +90,6 @@ function ConfirmDialog(props: Props) {
<DialogActions>
<TsButton
onClick={() => onConfirm(false)}
- color="primary"
data-tid={props.cancelDialogTID}
>
{t('core:no')}
@@ -98,7 +97,6 @@ function ConfirmDialog(props: Props) {
<TsButton
data-tid={props.confirmDialogTID}
onClick={() => onConfirm(true)}
- color="primary"
>
{t('core:yes')}
</TsButton>
diff --git a/src/renderer/components/dialogs/CreateDirectoryDialog.tsx b/src/renderer/components/dialogs/CreateDirectoryDialog.tsx
index 3367b0b9e..126a27ffc 100644
--- a/src/renderer/components/dialogs/CreateDirectoryDialog.tsx
+++ b/src/renderer/components/dialogs/CreateDirectoryDialog.tsx
@@ -260,10 +260,9 @@ function CreateDirectoryDialog(props: Props) {
<TsButton
disabled={disableConfirmButton}
onClick={onConfirm}
- variant="contained"
data-tid="confirmCreateNewDirectory"
id="confirmCreateNewDirectory"
- color="primary"
+ variant="contained"
>
{t('core:ok')}
</TsButton>
diff --git a/src/renderer/components/dialogs/CreateEditLocationDialog.tsx b/src/renderer/components/dialogs/CreateEditLocationDialog.tsx
index 42f48af2c..07182d939 100644
--- a/src/renderer/components/dialogs/CreateEditLocationDialog.tsx
+++ b/src/renderer/components/dialogs/CreateEditLocationDialog.tsx
@@ -1016,7 +1016,6 @@ function CreateEditLocationDialog(props: Props) {
control={
<ProTooltip tooltip={t('ignorePatternDialogTitle')}>
<TsButton
- color="primary"
disabled={!Pro}
onClick={() => {
setIgnorePatternDialogOpen(true);
@@ -1191,7 +1190,6 @@ function CreateEditLocationDialog(props: Props) {
disabled={disableConfirmButton()}
onClick={preConfirm}
data-tid="confirmLocationCreation"
- color="primary"
variant="contained"
>
{t('core:ok')}
diff --git a/src/renderer/components/dialogs/CreateTagGroupDialog.tsx b/src/renderer/components/dialogs/CreateTagGroupDialog.tsx
index 5385a325a..44707e412 100644
--- a/src/renderer/components/dialogs/CreateTagGroupDialog.tsx
+++ b/src/renderer/components/dialogs/CreateTagGroupDialog.tsx
@@ -295,7 +295,6 @@ function CreateTagGroupDialog(props: Props) {
onClick={onConfirm}
variant="contained"
data-tid="createTagGroupConfirmButton"
- color="primary"
>
{t('core:ok')}
</TsButton>
diff --git a/src/renderer/components/dialogs/CreateTagsDialog.tsx b/src/renderer/components/dialogs/CreateTagsDialog.tsx
index d122f85d8..c4303933f 100644
--- a/src/renderer/components/dialogs/CreateTagsDialog.tsx
+++ b/src/renderer/components/dialogs/CreateTagsDialog.tsx
@@ -125,7 +125,6 @@ function CreateTagsDialog(props: Props) {
disabled={inputError}
onClick={onConfirm}
data-tid="createTagsConfirmButton"
- color="primary"
variant="contained"
>
{t('core:ok')}
diff --git a/src/renderer/components/dialogs/EditEntryTagDialog.tsx b/src/renderer/components/dialogs/EditEntryTagDialog.tsx
index bd4b704d1..634583211 100644
--- a/src/renderer/components/dialogs/EditEntryTagDialog.tsx
+++ b/src/renderer/components/dialogs/EditEntryTagDialog.tsx
@@ -43,6 +43,7 @@ import useMediaQuery from '@mui/material/useMediaQuery';
import { useTranslation } from 'react-i18next';
import { useTaggingActionsContext } from '-/hooks/useTaggingActionsContext';
import { tagsValidation } from '-/services/utils-io';
+import AppConfig from '-/AppConfig';
interface Props {
open: boolean;
@@ -209,10 +210,9 @@ function EditEntryTagDialog(props: Props) {
</TsButton>
<TsButton
disabled={haveError()}
- style={{ marginLeft: 5 }}
+ style={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}
onClick={onConfirm}
data-tid="confirmEditTagEntryDialog"
- color="primary"
variant="contained"
>
{t('core:ok')}
diff --git a/src/renderer/components/dialogs/EditTagDialog.tsx b/src/renderer/components/dialogs/EditTagDialog.tsx
index 143d47355..74676ae36 100644
--- a/src/renderer/components/dialogs/EditTagDialog.tsx
+++ b/src/renderer/components/dialogs/EditTagDialog.tsx
@@ -260,7 +260,6 @@ function EditTagDialog(props: Props) {
disabled={inputError}
onClick={onConfirm}
data-tid="editTagConfirm"
- color="primary"
variant="contained"
>
{t('core:ok')}
diff --git a/src/renderer/components/dialogs/EditTagGroupDialog.tsx b/src/renderer/components/dialogs/EditTagGroupDialog.tsx
index 55c783125..1d7901b3f 100644
--- a/src/renderer/components/dialogs/EditTagGroupDialog.tsx
+++ b/src/renderer/components/dialogs/EditTagGroupDialog.tsx
@@ -266,7 +266,6 @@ function EditTagGroupDialog(props: Props) {
disabled={disableConfirmButton()}
onClick={onConfirm}
data-tid="editTagGroupConfirmButton"
- color="primary"
variant="contained"
>
{t('core:ok')}
diff --git a/src/renderer/components/dialogs/FileUploadDialog.tsx b/src/renderer/components/dialogs/FileUploadDialog.tsx
index 3863a2d36..a2863ecf8 100644
--- a/src/renderer/components/dialogs/FileUploadDialog.tsx
+++ b/src/renderer/components/dialogs/FileUploadDialog.tsx
@@ -264,24 +264,15 @@ function FileUploadDialog(props: Props) {
onClose();
dispatch(AppActions.resetProgress());
}}
- color="primary"
>
{t('core:closeAndClear')}
</TsButton>
)}
- <TsButton
- data-tid="uploadMinimizeDialogTID"
- onClick={onClose}
- color="primary"
- >
+ <TsButton data-tid="uploadMinimizeDialogTID" onClick={onClose}>
{t('core:minimize')}
</TsButton>
{haveProgress && (
- <TsButton
- data-tid="uploadStopAllTID"
- onClick={stopAll}
- color="primary"
- >
+ <TsButton data-tid="uploadStopAllTID" onClick={stopAll}>
{t('core:stopAll')}
</TsButton>
)}
diff --git a/src/renderer/components/dialogs/ImportExportTagGroupsDialog.tsx b/src/renderer/components/dialogs/ImportExportTagGroupsDialog.tsx
index 2dadf43ec..8631ced6c 100644
--- a/src/renderer/components/dialogs/ImportExportTagGroupsDialog.tsx
+++ b/src/renderer/components/dialogs/ImportExportTagGroupsDialog.tsx
@@ -141,7 +141,7 @@ function ImportExportTagGroupsDialog(props: Props) {
<DialogCloseButton testId="closeIETagGroupsTID" onClose={onClose} />
</DialogTitle>
<DialogContent>
- <TsButton color="primary" onClick={handleToggleSelectAll}>
+ <TsButton onClick={handleToggleSelectAll}>
{t('core:selectAllTagGroups')}
</TsButton>
<FormControl fullWidth={true}>
@@ -156,7 +156,6 @@ function ImportExportTagGroupsDialog(props: Props) {
disabled={!isSelected()}
onClick={onConfirm}
data-tid="confirmImportExport"
- color="primary"
variant="contained"
>
{props.dialogModeImport ? 'Import' : 'Export'}
diff --git a/src/renderer/components/dialogs/IsTruncatedConfirmDialog.tsx b/src/renderer/components/dialogs/IsTruncatedConfirmDialog.tsx
index 34ce087d1..e0647ce4f 100644
--- a/src/renderer/components/dialogs/IsTruncatedConfirmDialog.tsx
+++ b/src/renderer/components/dialogs/IsTruncatedConfirmDialog.tsx
@@ -109,9 +109,7 @@ function IsTruncatedConfirmDialog(props: Props) {
</DialogContentText>
</DialogContent>
<DialogActions>
- <TsButton onClick={() => onClose()} color="primary">
- {t('core:continue')}
- </TsButton>
+ <TsButton onClick={() => onClose()}>{t('core:continue')}</TsButton>
</DialogActions>
</Dialog>
);
diff --git a/src/renderer/components/dialogs/KeyboardDialog.tsx b/src/renderer/components/dialogs/KeyboardDialog.tsx
index e8b4711d0..649337d82 100644
--- a/src/renderer/components/dialogs/KeyboardDialog.tsx
+++ b/src/renderer/components/dialogs/KeyboardDialog.tsx
@@ -117,7 +117,6 @@ function KeyboardDialog(props: Props) {
<TsButton
data-tid="closeKeyboardDialog"
onClick={onClose}
- color="primary"
variant="contained"
>
{t('core:ok')}
diff --git a/src/renderer/components/dialogs/LicenseDialog.tsx b/src/renderer/components/dialogs/LicenseDialog.tsx
index 548ae1feb..a74b369e6 100644
--- a/src/renderer/components/dialogs/LicenseDialog.tsx
+++ b/src/renderer/components/dialogs/LicenseDialog.tsx
@@ -85,21 +85,15 @@ function LicenseDialog(props: Props) {
>
{/* <TsButton
onClick={printLicense}
- color="primary"
>
{t('core:print')}
</TsButton> */}
- <TsButton
- data-tid="confirmLicenseDialog"
- onClick={quitApp}
- color="primary"
- >
+ <TsButton data-tid="confirmLicenseDialog" onClick={quitApp}>
{t('core:quit')}
</TsButton>
<TsButton
data-tid="agreeLicenseDialog"
onClick={props.onClose}
- color="primary"
variant="contained"
>
{t('core:agreeLicense')}
diff --git a/src/renderer/components/dialogs/LinkGeneratorDialog.tsx b/src/renderer/components/dialogs/LinkGeneratorDialog.tsx
index 319c0a2f8..19e15cf11 100644
--- a/src/renderer/components/dialogs/LinkGeneratorDialog.tsx
+++ b/src/renderer/components/dialogs/LinkGeneratorDialog.tsx
@@ -132,7 +132,6 @@ function LinkGeneratorDialog(props: Props) {
showNotification(t('core:linkCopied'));
});
}}
- color="primary"
>
{t('core:copy')}
</TsButton>
@@ -172,7 +171,6 @@ function LinkGeneratorDialog(props: Props) {
}}
>
<TsButton
- variant="text"
data-tid="helpSearchButtonTID"
onClick={() => {
openUrl(Links.documentationLinks.sharing);
@@ -180,12 +178,7 @@ function LinkGeneratorDialog(props: Props) {
>
{t('help')}
</TsButton>
- <TsButton
- data-tid="closeLinkTID"
- onClick={onClose}
- variant="contained"
- color="primary"
- >
+ <TsButton data-tid="closeLinkTID" onClick={onClose} variant="contained">
{t('core:close')}
</TsButton>
</DialogActions>
diff --git a/src/renderer/components/dialogs/MoveCopyFilesDialog.tsx b/src/renderer/components/dialogs/MoveCopyFilesDialog.tsx
index 600eddf69..073f4d1da 100644
--- a/src/renderer/components/dialogs/MoveCopyFilesDialog.tsx
+++ b/src/renderer/components/dialogs/MoveCopyFilesDialog.tsx
@@ -258,7 +258,6 @@ function MoveCopyFilesDialog(props: Props) {
targetPath === currentDirectoryPath
}
onClick={() => copyMove(false)}
- color="primary"
variant="contained"
>
{t('core:moveEntriesButton')}
@@ -268,7 +267,6 @@ function MoveCopyFilesDialog(props: Props) {
onClick={() => copyMove(true)}
data-tid="confirmCopyFiles"
disabled={!targetPath || targetPath === currentDirectoryPath}
- color="primary"
variant="contained"
>
{t('core:copyEntriesButton')}
diff --git a/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsx b/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsx
index 80fb5c764..66ba4a85c 100644
--- a/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsx
+++ b/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsx
@@ -183,7 +183,6 @@ function MoveOrCopyFilesDialog(props: Props) {
onClose();
}}
data-tid="confirmMoveFilesTID"
- color="primary"
variant="contained"
>
{t('core:moveEntriesButton')}
@@ -206,7 +205,6 @@ function MoveOrCopyFilesDialog(props: Props) {
onClose();
}}
data-tid="confirmCopyFilesTID"
- color="primary"
variant="contained"
>
{t('core:copyEntriesButton')}
diff --git a/src/renderer/components/dialogs/NewFileDialog.tsx b/src/renderer/components/dialogs/NewFileDialog.tsx
index d66ce132e..5ba21ad8e 100644
--- a/src/renderer/components/dialogs/NewFileDialog.tsx
+++ b/src/renderer/components/dialogs/NewFileDialog.tsx
@@ -181,7 +181,6 @@ function NewFileDialog(props: Props) {
onClick={() => {
onClose();
}}
- color="primary"
>
{t('core:cancel')}
</TsButton>
@@ -191,7 +190,6 @@ function NewFileDialog(props: Props) {
onClick={() => {
createFile(fileType, targetDirectoryPath);
}}
- color="primary"
disabled={haveError.current}
>
{t('core:ok')}
diff --git a/src/renderer/components/dialogs/OpenLinkDialog.tsx b/src/renderer/components/dialogs/OpenLinkDialog.tsx
index 8a583ed43..feb30c846 100644
--- a/src/renderer/components/dialogs/OpenLinkDialog.tsx
+++ b/src/renderer/components/dialogs/OpenLinkDialog.tsx
@@ -138,7 +138,6 @@ function OpenLinkDialog(props: Props) {
disabled={disableConfirmButton}
onClick={onConfirm}
data-tid="confirmOpenLink"
- color="primary"
variant="contained"
>
{t('core:open')}
diff --git a/src/renderer/components/dialogs/ProTeaserDialog.tsx b/src/renderer/components/dialogs/ProTeaserDialog.tsx
index 65cdb948b..c34b836f6 100644
--- a/src/renderer/components/dialogs/ProTeaserDialog.tsx
+++ b/src/renderer/components/dialogs/ProTeaserDialog.tsx
@@ -32,6 +32,7 @@ import { useTranslation } from 'react-i18next';
import Slider from 'react-slick';
import NavigateNextIcon from '@mui/icons-material/NavigateNext';
import NavigateBeforeIcon from '@mui/icons-material/NavigateBefore';
+import AppConfig from '-/AppConfig';
interface Props {
open: boolean;
@@ -147,7 +148,7 @@ function Slide(props: SlideProps) {
onClick={() => {
openURLExternally(ctaURL, true);
}}
- style={{ marginLeft: 5 }}
+ style={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}
>
{ctaTitle}
</TsButton>
diff --git a/src/renderer/components/dialogs/RenameEntryDialog.tsx b/src/renderer/components/dialogs/RenameEntryDialog.tsx
index aa84ce07b..36c290656 100644
--- a/src/renderer/components/dialogs/RenameEntryDialog.tsx
+++ b/src/renderer/components/dialogs/RenameEntryDialog.tsx
@@ -209,7 +209,6 @@ function RenameEntryDialog(props: Props) {
disabled={disableConfirmButton.current}
onClick={onConfirm}
data-tid="confirmRenameEntry"
- color="primary"
variant="contained"
>
{t('core:ok')}
diff --git a/src/renderer/components/dialogs/ResolveConflictDialog.tsx b/src/renderer/components/dialogs/ResolveConflictDialog.tsx
index 99603fd4a..abdab19ec 100644
--- a/src/renderer/components/dialogs/ResolveConflictDialog.tsx
+++ b/src/renderer/components/dialogs/ResolveConflictDialog.tsx
@@ -104,7 +104,6 @@ function ResolveConflictDialog(props: Props) {
setSaveAs(false);
onClose();
}}
- color="primary"
>
{t('core:cancel')}
</TsButton>
@@ -122,7 +121,6 @@ function ResolveConflictDialog(props: Props) {
onClose();
});
}}
- color="primary"
>
{t('core:save')}
</TsButton>
@@ -135,7 +133,6 @@ function ResolveConflictDialog(props: Props) {
onClick={() => {
setSaveAs(true);
}}
- color="primary"
>
{t('core:saveAs')}
</TsButton>
@@ -147,7 +144,6 @@ function ResolveConflictDialog(props: Props) {
onClose();
});
}}
- color="primary"
variant="contained"
>
{t('core:override')}
diff --git a/src/renderer/components/dialogs/ThirdPartyLibsDialog.tsx b/src/renderer/components/dialogs/ThirdPartyLibsDialog.tsx
index bd882524b..ef454d093 100644
--- a/src/renderer/components/dialogs/ThirdPartyLibsDialog.tsx
+++ b/src/renderer/components/dialogs/ThirdPartyLibsDialog.tsx
@@ -61,7 +61,6 @@ function ThirdPartyLibsDialog(props: Props) {
<TsButton
data-tid="confirmThirdPartyLibsDialog"
onClick={onClose}
- color="primary"
variant="contained"
>
{t('core:ok')}
diff --git a/src/renderer/components/dialogs/settings/MapTileServerDialog.tsx b/src/renderer/components/dialogs/settings/MapTileServerDialog.tsx
index b75589056..888bde373 100644
--- a/src/renderer/components/dialogs/settings/MapTileServerDialog.tsx
+++ b/src/renderer/components/dialogs/settings/MapTileServerDialog.tsx
@@ -192,17 +192,12 @@ function MapTileServerDialog(props: Props) {
</TsButton>
)}
<div>
- <TsButton
- data-tid="closeTileServerDialogTID"
- onClick={props.onClose}
- color="primary"
- >
+ <TsButton data-tid="closeTileServerDialogTID" onClick={props.onClose}>
{t('core:closeButton')}
</TsButton>
<TsButton
data-tid="saveTileServerDialogTID"
onClick={saveTileServer}
- color="primary"
variant="contained"
>
{t('core:confirmSaveButton')}
diff --git a/src/renderer/components/dialogs/settings/SettingsAdvanced.tsx b/src/renderer/components/dialogs/settings/SettingsAdvanced.tsx
index c1892d619..86bc9e21f 100644
--- a/src/renderer/components/dialogs/settings/SettingsAdvanced.tsx
+++ b/src/renderer/components/dialogs/settings/SettingsAdvanced.tsx
@@ -119,7 +119,7 @@ function SettingsAdvanced(props: Props) {
</TsButton>
<TsButton
data-tid="reloadAppTID"
- style={{ marginLeft: 5 }}
+ style={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}
onClick={() => {
if (AppConfig.isElectron) {
window.electronIO.ipcRenderer.sendMessage('reloadWindow');
@@ -383,7 +383,6 @@ function SettingsAdvanced(props: Props) {
<ListItemText primary={t('core:tileServerTitle')} />
<ListItemSecondaryAction style={{ right: 0 }}>
<TsButton
- color="primary"
onClick={(event) => handleEditTileServerClick(event, {}, true)}
>
{t('tileServerDialogAdd')}
@@ -395,7 +394,7 @@ function SettingsAdvanced(props: Props) {
padding: 5,
paddingLeft: 10,
backgroundColor: '#d3d3d34a',
- borderRadius: 10,
+ borderRadius: AppConfig.defaultCSSRadius,
}}
dense
>
diff --git a/src/renderer/containers/PageNotification.tsx b/src/renderer/containers/PageNotification.tsx
index ccd6b0e36..869ed79ce 100644
--- a/src/renderer/containers/PageNotification.tsx
+++ b/src/renderer/containers/PageNotification.tsx
@@ -36,12 +36,13 @@ import { useTranslation } from 'react-i18next';
import { useNotificationContext } from '-/hooks/useNotificationContext';
import { useLocationIndexContext } from '-/hooks/useLocationIndexContext';
import i18n from '-/services/i18n';
+import AppConfig from '-/AppConfig';
const TSNotification = styled(Snackbar)(({ theme }) => {
return {
root: {
'& .MuiSnackbarContent-root': {
- borderRadius: 10,
+ borderRadius: AppConfig.defaultCSSRadius,
},
},
};
@@ -151,11 +152,7 @@ function PageNotification() {
>
{t('core:releaseNotes')}
</TsButton>,
- <TsButton
- key="latestVersionButton"
- color="primary"
- onClick={getLatestVersion}
- >
+ <TsButton key="latestVersionButton" onClick={getLatestVersion}>
{t('core:getItNow')}
</TsButton>,
]}
diff --git a/src/renderer/locales/en/core.json b/src/renderer/locales/en/core.json
index bf6a29d84..d48299592 100644
--- a/src/renderer/locales/en/core.json
+++ b/src/renderer/locales/en/core.json
@@ -869,5 +869,6 @@
"invalidSharingLink": "Invalid Sharing Link",
"confirmSearchById": "Do you want to search for the file or folder by its ID?",
"uploadDirsNotSupported": "Uploading folders not supported!",
+ "targetLocation": "Target location",
"-": "-"
}
diff --git a/src/renderer/perspectives/grid/components/GridSettingsDialog.tsx b/src/renderer/perspectives/grid/components/GridSettingsDialog.tsx
index 13f755b7e..608dcb72a 100644
--- a/src/renderer/perspectives/grid/components/GridSettingsDialog.tsx
+++ b/src/renderer/perspectives/grid/components/GridSettingsDialog.tsx
@@ -172,7 +172,6 @@ function GridSettingsDialog(props: Props) {
setSettings({ showDirectories: !showDirectories });
}}
name="checkedD"
- color="primary"
/>
}
label={t('core:showHideDirectories')}
@@ -187,7 +186,6 @@ function GridSettingsDialog(props: Props) {
setSettings({ showTags: !showTags });
}}
name="checkedT"
- color="primary"
/>
}
label={t('core:showTags')}
@@ -204,7 +202,6 @@ function GridSettingsDialog(props: Props) {
});
}}
name={t('core:showHideEntriesDescription')}
- color="primary"
/>
}
label={t('core:showHideEntriesDescription')}
@@ -219,7 +216,6 @@ function GridSettingsDialog(props: Props) {
setSettings({ showDetails: !showDetails });
}}
name={t('core:showHideDetails')}
- color="primary"
/>
}
label={t('core:showHideDetails')}
@@ -234,7 +230,6 @@ function GridSettingsDialog(props: Props) {
setSettings({ showDescription: !showDescription });
}}
name={t('core:showHideDescription')}
- color="primary"
/>
}
label={t('core:showHideDescription')}
@@ -363,7 +358,6 @@ function GridSettingsDialog(props: Props) {
saveSettings(true);
onClose();
}}
- color="primary"
>
{t('core:defaultSettings')}
</TsButton>
@@ -374,7 +368,6 @@ function GridSettingsDialog(props: Props) {
saveSettings(false);
onClose();
}}
- color="primary"
>
{t('core:directorySettings')}
</TsButton>