Skip to content

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

chore: migration to mui6

Ilian Sapundshievb6b2ceb46e82
diff --git a/src/renderer/components/EntryProperties.tsx b/src/renderer/components/EntryProperties.tsx
index b5094c5a9..8e28c24db 100644
--- a/src/renderer/components/EntryProperties.tsx
+++ b/src/renderer/components/EntryProperties.tsx
@@ -16,6 +16,64 @@
*
*/
+import AppConfig from '-/AppConfig';
+import Marker2xIcon from '-/assets/icons/marker-icon-2x.png';
+import MarkerIcon from '-/assets/icons/marker-icon.png';
+import MarkerShadowIcon from '-/assets/icons/marker-shadow.png';
+import { ProTooltip } from '-/components/HelperComponents';
+import InfoIcon from '-/components/InfoIcon';
+import NoTileServer from '-/components/NoTileServer';
+import PerspectiveSelector from '-/components/PerspectiveSelector';
+import Tooltip from '-/components/Tooltip';
+import TsButton from '-/components/TsButton';
+import TsIconButton from '-/components/TsIconButton';
+import TsTextField from '-/components/TsTextField';
+import ConfirmDialog from '-/components/dialogs/ConfirmDialog';
+import LinkGeneratorDialog from '-/components/dialogs/LinkGeneratorDialog';
+import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';
+import { useEditedEntryMetaContext } from '-/hooks/useEditedEntryMetaContext';
+import { useFilePropertiesContext } from '-/hooks/useFilePropertiesContext';
+import { useIOActionsContext } from '-/hooks/useIOActionsContext';
+import { useNotificationContext } from '-/hooks/useNotificationContext';
+import { useOpenedEntryContext } from '-/hooks/useOpenedEntryContext';
+import { useTaggingActionsContext } from '-/hooks/useTaggingActionsContext';
+import { isDesktopMode } from '-/reducers/settings';
+import {
+ dirNameValidation,
+ fileNameValidation,
+ getAllTags,
+ openUrl,
+} from '-/services/utils-io';
+import { TS } from '-/tagspaces.namespace';
+import { generateClipboardLink } from '-/utils/dom';
+import { parseGeoLocation } from '-/utils/geo';
+import useFirstRender from '-/utils/useFirstRender';
+import ColorPaletteIcon from '@mui/icons-material/ColorLens';
+import ClearBackgroundIcon from '@mui/icons-material/FormatColorResetOutlined';
+import SetBackgroundIcon from '@mui/icons-material/OpacityOutlined';
+import QRCodeIcon from '@mui/icons-material/QrCode';
+import {
+ Box,
+ FormControl,
+ InputAdornment,
+ Popover,
+ TextField,
+ Typography,
+ inputBaseClasses,
+} from '@mui/material';
+import FormHelperText from '@mui/material/FormHelperText';
+import Grid from '@mui/material/Grid';
+import Stack from '@mui/material/Stack';
+import { styled, useTheme } from '@mui/material/styles';
+import { formatBytes } from '@tagspaces/tagspaces-common/misc';
+import {
+ extractContainingDirectoryPath,
+ extractDirectoryName,
+ extractFileName,
+ extractTitle,
+} from '@tagspaces/tagspaces-common/paths';
+import { getUuid } from '@tagspaces/tagspaces-common/utils-io';
+import L from 'leaflet';
import React, {
ChangeEvent,
useEffect,
@@ -23,79 +81,21 @@ import React, {
useRef,
useState,
} from 'react';
-import { useSelector } from 'react-redux';
-import { styled, useTheme } from '@mui/material/styles';
-import { extractTitle } from '@tagspaces/tagspaces-common/paths';
-import L from 'leaflet';
-import {
- FormControl,
- Typography,
- TextField,
- inputBaseClasses,
- InputAdornment,
- Popover,
- Box,
-} from '@mui/material';
-import Tooltip from '-/components/Tooltip';
-import Stack from '@mui/material/Stack';
-import Grid from '@mui/material/Grid';
-import InfoIcon from '-/components/InfoIcon';
-import QRCodeIcon from '@mui/icons-material/QrCode';
-import ColorPaletteIcon from '@mui/icons-material/ColorLens';
-import SetBackgroundIcon from '@mui/icons-material/OpacityOutlined';
-import ClearBackgroundIcon from '@mui/icons-material/FormatColorResetOutlined';
+import { useTranslation } from 'react-i18next';
import {
AttributionControl,
- MapContainer,
LayerGroup,
+ MapContainer,
Marker,
Popup,
TileLayer,
} from 'react-leaflet';
-import TsIconButton from '-/components/TsIconButton';
-import { formatBytes } from '@tagspaces/tagspaces-common/misc';
-import {
- extractContainingDirectoryPath,
- extractFileName,
- extractDirectoryName,
-} from '@tagspaces/tagspaces-common/paths';
-import TagDropContainer from './TagDropContainer';
-import MoveCopyFilesDialog from './dialogs/MoveCopyFilesDialog';
-import {
- fileNameValidation,
- dirNameValidation,
- getAllTags,
- openUrl,
-} from '-/services/utils-io';
-import { getUuid } from '@tagspaces/tagspaces-common/utils-io';
-import { isDesktopMode } from '-/reducers/settings';
-import { parseGeoLocation } from '-/utils/geo';
+import { useSelector } from 'react-redux';
import { Pro } from '../pro';
+import TagDropContainer from './TagDropContainer';
import TagsSelect from './TagsSelect';
import TransparentBackground from './TransparentBackground';
-import MarkerIcon from '-/assets/icons/marker-icon.png';
-import Marker2xIcon from '-/assets/icons/marker-icon-2x.png';
-import MarkerShadowIcon from '-/assets/icons/marker-shadow.png';
-import ConfirmDialog from '-/components/dialogs/ConfirmDialog';
-import { TS } from '-/tagspaces.namespace';
-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';
-import { useOpenedEntryContext } from '-/hooks/useOpenedEntryContext';
-import { useTaggingActionsContext } from '-/hooks/useTaggingActionsContext';
-import { useIOActionsContext } from '-/hooks/useIOActionsContext';
-import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';
-import { useNotificationContext } from '-/hooks/useNotificationContext';
-import { generateClipboardLink } from '-/utils/dom';
-import { useFilePropertiesContext } from '-/hooks/useFilePropertiesContext';
-import useFirstRender from '-/utils/useFirstRender';
-import { useEditedEntryMetaContext } from '-/hooks/useEditedEntryMetaContext';
-import AppConfig from '-/AppConfig';
+import MoveCopyFilesDialog from './dialogs/MoveCopyFilesDialog';
const PREFIX = 'EntryProperties';
@@ -576,46 +576,47 @@ function EntryProperties(props: Props) {
label={
openedEntry.isFile ? t('core:fileName') : t('core:folderName')
}
- InputProps={{
- readOnly: editName === undefined,
- endAdornment: (
- <InputAdornment position="end">
- {!readOnlyMode && !isEditMode && (
- <div style={{ textAlign: 'right' }}>
- {editName !== undefined ? (
- <div>
- <TsButton
- data-tid="cancelRenameEntryTID"
- onClick={deactivateEditNameField}
- variant="text"
- >
- {t('core:cancel')}
- </TsButton>
+ slotProps={{
+ input: {
+ readOnly: editName === undefined,
+ endAdornment: (
+ <InputAdornment position="end">
+ {!readOnlyMode && !isEditMode && (
+ <div style={{ textAlign: 'right' }}>
+ {editName !== undefined ? (
+ <div>
+ <TsButton
+ data-tid="cancelRenameEntryTID"
+ onClick={deactivateEditNameField}
+ variant="text"
+ >
+ {t('core:cancel')}
+ </TsButton>
+ <TsButton
+ data-tid="confirmRenameEntryTID"
+ onClick={renameEntry}
+ variant="text"
+ disabled={disableConfirmButton.current}
+ >
+ {t('core:confirmSaveButton')}
+ </TsButton>
+ </div>
+ ) : (
<TsButton
- data-tid="confirmRenameEntryTID"
- onClick={renameEntry}
+ data-tid="startRenameEntryTID"
variant="text"
- disabled={disableConfirmButton.current}
+ onClick={activateEditNameField}
>
- {t('core:confirmSaveButton')}
+ {t('core:rename')}
</TsButton>
- </div>
- ) : (
- <TsButton
- data-tid="startRenameEntryTID"
- variant="text"
- onClick={activateEditNameField}
- >
- {t('core:rename')}
- </TsButton>
- )}
- </div>
- )}
- </InputAdornment>
- ),
+ )}
+ </div>
+ )}
+ </InputAdornment>
+ ),
+ },
}}
name="name"
- size={desktopMode ? 'small' : 'medium'}
data-tid="fileNameProperties"
defaultValue={entryName} // openedEntry.current.name}
inputRef={fileNameRef}
@@ -758,12 +759,13 @@ function EntryProperties(props: Props) {
<Grid container item xs={12} spacing={1}>
<Grid item xs={12}>
<TsTextField
- size={desktopMode ? 'small' : 'medium'}
value={ldtm}
label={t('core:fileLDTM')}
retrieveValue={() => ldtm}
- InputProps={{
- readOnly: true,
+ slotProps={{
+ input: {
+ readOnly: true,
+ },
}}
/>
</Grid>
@@ -787,25 +789,26 @@ function EntryProperties(props: Props) {
<TsTextField
value={fileSize()}
retrieveValue={() => fileSize()}
- size={desktopMode ? 'small' : 'medium'}
label={t('core:fileSize')}
- InputProps={{
- readOnly: true,
- ...(!openedEntry.isFile && {
- endAdornment: (
- <TsButton
- variant="text"
- onClick={() =>
- getOpenedDirProps().then((props) => {
- dirProps.current = props;
- forceUpdate();
- })
- }
- >
- {t('core:calculate')}
- </TsButton>
- ),
- }),
+ slotProps={{
+ input: {
+ readOnly: true,
+ ...(!openedEntry.isFile && {
+ endAdornment: (
+ <TsButton
+ variant="text"
+ onClick={() =>
+ getOpenedDirProps().then((props) => {
+ dirProps.current = props;
+ forceUpdate();
+ })
+ }
+ >
+ {t('core:calculate')}
+ </TsButton>
+ ),
+ }),
+ },
}}
/>
</Tooltip>
@@ -818,38 +821,41 @@ function EntryProperties(props: Props) {
name="path"
title={openedEntry.url || openedEntry.path}
label={isCloudLocation ? t('cloudPath') : t('core:filePath')}
- size={desktopMode ? 'small' : 'medium'}
data-tid="filePathProperties"
value={openedEntry.path || ''}
retrieveValue={() => openedEntry.path}
- InputProps={{
- readOnly: true,
- // startAdornment: (
- // <InputAdornment position="start">
- // {isCloudLocation ? (
- // <CloudLocationIcon
- // style={{ color: theme.palette.text.secondary }}
- // />
- // ) : (
- // <LocalLocationIcon
- // style={{ color: theme.palette.text.secondary }}
- // />
- // )}
- // </InputAdornment>
- // ),
- endAdornment: (
- <InputAdornment position="end">
- {!readOnlyMode && !isEditMode && editName === undefined && (
- <TsButton
- data-tid="moveCopyEntryTID"
- onClick={toggleMoveCopyFilesDialog}
- variant="text"
- >
- {t('core:move')}
- </TsButton>
- )}
- </InputAdornment>
- ),
+ slotProps={{
+ input: {
+ readOnly: true,
+ // startAdornment: (
+ // <InputAdornment position="start">
+ // {isCloudLocation ? (
+ // <CloudLocationIcon
+ // style={{ color: theme.palette.text.secondary }}
+ // />
+ // ) : (
+ // <LocalLocationIcon
+ // style={{ color: theme.palette.text.secondary }}
+ // />
+ // )}
+ // </InputAdornment>
+ // ),
+ endAdornment: (
+ <InputAdornment position="end">
+ {!readOnlyMode &&
+ !isEditMode &&
+ editName === undefined && (
+ <TsButton
+ data-tid="moveCopyEntryTID"
+ onClick={toggleMoveCopyFilesDialog}
+ variant="text"
+ >
+ {t('core:move')}
+ </TsButton>
+ )}
+ </InputAdornment>
+ ),
+ },
}}
/>
</FormControl>
@@ -866,67 +872,69 @@ function EntryProperties(props: Props) {
<TsTextField
data-tid="sharingLinkTID"
name="sharinglink"
- size={desktopMode ? 'small' : 'medium'}
label={<>{t('core:sharingLink')}</>}
value={sharingLink}
inputRef={sharingLinkRef}
- InputProps={{
- readOnly: true,
- endAdornment: (
- <InputAdornment position="end">
- <TsButton
- tooltip={t('core:copyLinkToClipboard')}
- data-tid="copyLinkToClipboardTID"
- variant="text"
- onClick={() => {
- const entryTitle = extractTitle(
- openedEntry.name,
- !openedEntry.isFile,
- location?.getDirSeparator(),
- );
- const clibboardItem = generateClipboardLink(
- sharingLink,
- entryTitle,
- );
- const promise =
- navigator.clipboard.write(clibboardItem);
- showNotification(t('core:linkCopied'));
- }}
- >
- {t('core:copy')}
- </TsButton>
- <InfoIcon tooltip={t('core:sharingLinkTooltip')} />
- </InputAdornment>
- ),
- }}
- />
- </Grid>
- {showLinkForDownloading && (
- <Grid item xs={12}>
- <TsTextField
- name="downloadLink"
- size={desktopMode ? 'small' : 'medium'}
- label={<>{t('core:downloadLink')}</>}
- value={' '}
- InputProps={{
+ slotProps={{
+ input: {
readOnly: true,
endAdornment: (
<InputAdornment position="end">
<TsButton
- tooltip={t('core:generateDownloadLink')}
- onClick={() => setShowSharingLinkDialog(true)}
+ tooltip={t('core:copyLinkToClipboard')}
+ data-tid="copyLinkToClipboardTID"
variant="text"
- startIcon={
- <QRCodeIcon
- style={{ color: theme.palette.text.secondary }}
- />
- }
+ onClick={() => {
+ const entryTitle = extractTitle(
+ openedEntry.name,
+ !openedEntry.isFile,
+ location?.getDirSeparator(),
+ );
+ const clibboardItem = generateClipboardLink(
+ sharingLink,
+ entryTitle,
+ );
+ const promise =
+ navigator.clipboard.write(clibboardItem);
+ showNotification(t('core:linkCopied'));
+ }}
>
- {t('core:generateDownloadLink')}
+ {t('core:copy')}
</TsButton>
- <InfoIcon tooltip={t('core:downloadLinkTooltip')} />
+ <InfoIcon tooltip={t('core:sharingLinkTooltip')} />
</InputAdornment>
),
+ },
+ }}
+ />
+ </Grid>
+ {showLinkForDownloading && (
+ <Grid item xs={12}>
+ <TsTextField
+ name="downloadLink"
+ label={<>{t('core:downloadLink')}</>}
+ value={' '}
+ slotProps={{
+ input: {
+ readOnly: true,
+ endAdornment: (
+ <InputAdornment position="end">
+ <TsButton
+ tooltip={t('core:generateDownloadLink')}
+ onClick={() => setShowSharingLinkDialog(true)}
+ variant="text"
+ startIcon={
+ <QRCodeIcon
+ style={{ color: theme.palette.text.secondary }}
+ />
+ }
+ >
+ {t('core:generateDownloadLink')}
+ </TsButton>
+ <InfoIcon tooltip={t('core:downloadLinkTooltip')} />
+ </InputAdornment>
+ ),
+ },
}}
/>
</Grid>
@@ -949,102 +957,104 @@ function EntryProperties(props: Props) {
<TsTextField
name="path"
label={<>{t('core:backgroundColor')}</>}
- InputProps={{
- readOnly: true,
- startAdornment: (
- <InputAdornment position="start">
- <TransparentBackground>
- <TsButton
- tooltip={t('editBackgroundColor')}
- fullWidth
- style={{
- width: 160,
- height: 25,
- background: openedEntry.meta?.color,
- border: '1px solid lightgray',
- }}
- onClick={toggleBackgroundColorPicker}
- >
- &nbsp;
- </TsButton>
- </TransparentBackground>
- </InputAdornment>
- ),
- endAdornment: (
- <InputAdornment position="end">
- <Box>
- <ProTooltip tooltip={t('changeBackgroundColor')}>
- <TsIconButton
- data-tid="changeBackgroundColorTID"
- aria-describedby={popoverId}
- onClick={handlePopeverClick}
- disabled={!Pro}
+ slotProps={{
+ input: {
+ readOnly: true,
+ startAdornment: (
+ <InputAdornment position="start">
+ <TransparentBackground>
+ <TsButton
+ tooltip={t('editBackgroundColor')}
+ fullWidth
+ style={{
+ width: 160,
+ height: 25,
+ background: openedEntry.meta?.color,
+ border: '1px solid lightgray',
+ }}
+ onClick={toggleBackgroundColorPicker}
>
- <ColorPaletteIcon />
- </TsIconButton>
- </ProTooltip>
- <Popover
- open={popoverOpen}
- onClose={handlePopoverClose}
- anchorEl={popoverAnchorEl}
- id={popoverId}
- anchorOrigin={{
- vertical: 'top',
- horizontal: 'center',
- }}
- transformOrigin={{
- vertical: 'bottom',
- horizontal: 'center',
- }}
- >
- <Box style={{ padding: 10 }}>
- {defaultBackgrounds.map((background, cnt) => (
- <>
- <TsIconButton
- key={cnt}
- data-tid={'backgroundTID' + cnt}
- aria-label="changeFolderBackround"
- onClick={() => {
- handleChangeColor(background);
- handlePopoverClose();
- }}
- style={{
- backgroundColor: background,
- backgroundImage: background,
- margin: 5,
- }}
- >
- <SetBackgroundIcon />
- </TsIconButton>
- {cnt % 4 === 3 && <br />}
- </>
- ))}
- </Box>
- </Popover>
- </Box>
- {openedEntry.meta && openedEntry.meta.color && (
- <>
- <ProTooltip tooltip={t('clearFolderColor')}>
+ &nbsp;
+ </TsButton>
+ </TransparentBackground>
+ </InputAdornment>
+ ),
+ endAdornment: (
+ <InputAdornment position="end">
+ <Box>
+ <ProTooltip tooltip={t('changeBackgroundColor')}>
<TsIconButton
- data-tid={'backgroundClearTID'}
+ data-tid="changeBackgroundColorTID"
+ aria-describedby={popoverId}
+ onClick={handlePopeverClick}
disabled={!Pro}
- aria-label="clear"
- onClick={() =>
- setConfirmResetColorDialogOpened(true)
- }
>
- <ClearBackgroundIcon />
+ <ColorPaletteIcon />
</TsIconButton>
</ProTooltip>
- </>
- )}
- <InfoIcon
- tooltip={t(
- 'The background color will not be visible if you have set a background image',
+ <Popover
+ open={popoverOpen}
+ onClose={handlePopoverClose}
+ anchorEl={popoverAnchorEl}
+ id={popoverId}
+ anchorOrigin={{
+ vertical: 'top',
+ horizontal: 'center',
+ }}
+ transformOrigin={{
+ vertical: 'bottom',
+ horizontal: 'center',
+ }}
+ >
+ <Box style={{ padding: 10 }}>
+ {defaultBackgrounds.map((background, cnt) => (
+ <>
+ <TsIconButton
+ key={cnt}
+ data-tid={'backgroundTID' + cnt}
+ aria-label="changeFolderBackround"
+ onClick={() => {
+ handleChangeColor(background);
+ handlePopoverClose();
+ }}
+ style={{
+ backgroundColor: background,
+ backgroundImage: background,
+ margin: 5,
+ }}
+ >
+ <SetBackgroundIcon />
+ </TsIconButton>
+ {cnt % 4 === 3 && <br />}
+ </>
+ ))}
+ </Box>
+ </Popover>
+ </Box>
+ {openedEntry.meta && openedEntry.meta.color && (
+ <>
+ <ProTooltip tooltip={t('clearFolderColor')}>
+ <TsIconButton
+ data-tid={'backgroundClearTID'}
+ disabled={!Pro}
+ aria-label="clear"
+ onClick={() =>
+ setConfirmResetColorDialogOpened(true)
+ }
+ >
+ <ClearBackgroundIcon />
+ </TsIconButton>
+ </ProTooltip>
+ </>
)}
- />
- </InputAdornment>
- ),
+ <InfoIcon
+ tooltip={t(
+ 'The background color will not be visible if you have set a background image',
+ )}
+ />
+ </InputAdornment>
+ ),
+ },
}}
/>
</Grid>
@@ -1057,59 +1067,8 @@ function EntryProperties(props: Props) {
variant="outlined"
style={{ marginTop: 0 }}
fullWidth
- InputProps={{
- readOnly: true,
- startAdornment: (
- <InputAdornment position="end">
- <Stack
- direction="column"
- spacing={0}
- style={{ alignItems: 'center' }}
- >
- {!readOnlyMode &&
- !isEditMode &&
- editName === undefined && (
- <ProTooltip tooltip={t('changeThumbnail')}>
- <TsButton
- data-tid="changeThumbnailTID"
- fullWidth
- variant="text"
- onClick={toggleThumbFilesDialog}
- >
- {t('core:change')}
- </TsButton>
- </ProTooltip>
- )}
- <div
- role="button"
- tabIndex={0}
- style={{
- backgroundSize: 'cover',
- backgroundRepeat: 'no-repeat',
- backgroundImage: thumbImage.current,
- backgroundPosition: 'center',
- borderRadius: 8,
- minHeight: 150,
- minWidth: 150,
- marginBottom: 5,
- }}
- onClick={toggleThumbFilesDialog}
- />
- </Stack>
- </InputAdornment>
- ),
- }}
- />
- </Grid>
- {!openedEntry.isFile && (
- <Grid item xs={6}>
- <FormHelperText>{t('core:backgroundImage')}</FormHelperText>
- <ThumbnailTextField
- margin="dense"
- fullWidth
- style={{ marginTop: 0 }}
- variant="outlined"
- InputProps={{
+ slotProps={{
+ input: {
readOnly: true,
startAdornment: (
<InputAdornment position="end">
@@ -1121,36 +1080,91 @@ function EntryProperties(props: Props) {
{!readOnlyMode &&
!isEditMode &&
editName === undefined && (
- <ProTooltip tooltip={t('changeBackgroundImage')}>
+ <ProTooltip tooltip={t('changeThumbnail')}>
<TsButton
- data-tid="changeBackgroundImageTID"
+ data-tid="changeThumbnailTID"
fullWidth
variant="text"
- onClick={toggleBgndImgDialog}
+ onClick={toggleThumbFilesDialog}
>
{t('core:change')}
</TsButton>
</ProTooltip>
)}
<div
- data-tid="propsBgnImageTID"
role="button"
tabIndex={0}
style={{
backgroundSize: 'cover',
backgroundRepeat: 'no-repeat',
- backgroundImage: backgroundImage.current,
+ backgroundImage: thumbImage.current,
backgroundPosition: 'center',
borderRadius: 8,
minHeight: 150,
minWidth: 150,
marginBottom: 5,
}}
- onClick={toggleBgndImgDialog}
+ onClick={toggleThumbFilesDialog}
/>
</Stack>
</InputAdornment>
),
+ },
+ }}
+ />
+ </Grid>
+ {!openedEntry.isFile && (
+ <Grid item xs={6}>
+ <FormHelperText>{t('core:backgroundImage')}</FormHelperText>
+ <ThumbnailTextField
+ margin="dense"
+ fullWidth
+ style={{ marginTop: 0 }}
+ variant="outlined"
+ slotProps={{
+ input: {
+ readOnly: true,
+ startAdornment: (
+ <InputAdornment position="end">
+ <Stack
+ direction="column"
+ spacing={0}
+ style={{ alignItems: 'center' }}
+ >
+ {!readOnlyMode &&
+ !isEditMode &&
+ editName === undefined && (
+ <ProTooltip tooltip={t('changeBackgroundImage')}>
+ <TsButton
+ data-tid="changeBackgroundImageTID"
+ fullWidth
+ variant="text"
+ onClick={toggleBgndImgDialog}
+ >
+ {t('core:change')}
+ </TsButton>
+ </ProTooltip>
+ )}
+ <div
+ data-tid="propsBgnImageTID"
+ role="button"
+ tabIndex={0}
+ style={{
+ backgroundSize: 'cover',
+ backgroundRepeat: 'no-repeat',
+ backgroundImage: backgroundImage.current,
+ backgroundPosition: 'center',
+ borderRadius: 8,
+ minHeight: 150,
+ minWidth: 150,
+ marginBottom: 5,
+ }}
+ onClick={toggleBgndImgDialog}
+ />
+ </Stack>
+ </InputAdornment>
+ ),
+ },
}}
/>
</Grid>
@@ -1169,43 +1183,44 @@ function EntryProperties(props: Props) {
<TsTextField
data-tid="entryIDTID"
name="entryid"
- size={desktopMode ? 'small' : 'medium'}
label={t('core:entryId')}
value={openedEntry?.meta?.id}
retrieveValue={() => openedEntry?.meta?.id}
- InputProps={{
- readOnly: true,
- // startAdornment: (
- // <InputAdornment position="start">
- // <InfoIcon tooltip={t('core:entryIdTooltip')} />
- // {/* <IDIcon style={{ color: theme.palette.text.secondary }} /> */}
- // </InputAdornment>
- // ),
- endAdornment: (
- <InputAdornment position="end">
- <TsButton
- tooltip={t('core:copyIdToClipboard')}
- data-tid="copyIdToClipboardTID"
- variant="text"
- disabled={!openedEntry?.meta?.id}
- onClick={() => {
- const entryId = openedEntry?.meta?.id;
- if (entryId) {
- const clibboardItem = generateClipboardLink(
- entryId,
- entryId,
- );
- const promise =
- navigator.clipboard.write(clibboardItem);
- showNotification(t('core:entryIdCopied'));
- }
- }}
- >
- {t('core:copy')}
- </TsButton>
- <InfoIcon tooltip={t('core:entryIdTooltip')} />
- </InputAdornment>
- ),
+ slotProps={{
+ input: {
+ readOnly: true,
+ // startAdornment: (
+ // <InputAdornment position="start">
+ // <InfoIcon tooltip={t('core:entryIdTooltip')} />
+ // {/* <IDIcon style={{ color: theme.palette.text.secondary }} /> */}
+ // </InputAdornment>
+ // ),
+ endAdornment: (
+ <InputAdornment position="end">
+ <TsButton
+ tooltip={t('core:copyIdToClipboard')}
+ data-tid="copyIdToClipboardTID"
+ variant="text"
+ disabled={!openedEntry?.meta?.id}
+ onClick={() => {
+ const entryId = openedEntry?.meta?.id;
+ if (entryId) {
+ const clibboardItem = generateClipboardLink(
+ entryId,
+ entryId,
+ );
+ const promise =
+ navigator.clipboard.write(clibboardItem);
+ showNotification(t('core:entryIdCopied'));
+ }
+ }}
+ >
+ {t('core:copy')}
+ </TsButton>
+ <InfoIcon tooltip={t('core:entryIdTooltip')} />
+ </InputAdornment>
+ ),
+ },
}}
/>
</Grid>
diff --git a/src/renderer/components/dialogs/CreateEditLocationDialog.tsx b/src/renderer/components/dialogs/CreateEditLocationDialog.tsx
index e0a682e88..13f198e38 100644
--- a/src/renderer/components/dialogs/CreateEditLocationDialog.tsx
+++ b/src/renderer/components/dialogs/CreateEditLocationDialog.tsx
@@ -849,7 +849,9 @@ function CreateEditLocationDialog(props: Props) {
}}
type="number"
data-tid="maxIndexAgeTID"
- inputProps={{ min: 0 }}
+ slotProps={{
+ input: { inputMode: 'numeric', min: 0 },
+ }}
value={maxIndexAge / (1000 * 60)}
onChange={(event) => changeMaxIndexAge(event.target.value)}
/>
@@ -1118,7 +1120,6 @@ function CreateEditLocationDialog(props: Props) {
<TsTextField
name="encryptionKey"
type={showEncryptionKey ? 'text' : 'password'}
- inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
data-tid="encryptionKeyTID"
placeholder={t('encryptionKeyExplanation')}
onChange={(event) => setEncryptionKey(event.target.value)}
@@ -1130,6 +1131,8 @@ function CreateEditLocationDialog(props: Props) {
label={t('core:encryptionKey')}
slotProps={{
input: {
+ autoCorrect: 'off',
+ autoCapitalize: 'none',
endAdornment: (
<InputAdornment position="end">
<TsIconButton
diff --git a/src/renderer/components/dialogs/LinkGeneratorDialog.tsx b/src/renderer/components/dialogs/LinkGeneratorDialog.tsx
index f196bcd78..457343ddd 100644
--- a/src/renderer/components/dialogs/LinkGeneratorDialog.tsx
+++ b/src/renderer/components/dialogs/LinkGeneratorDialog.tsx
@@ -148,22 +148,24 @@ function LinkGeneratorDialog(props: Props) {
name="path"
label={t('core:qrCode')}
value={' '}
- InputProps={{
- readOnly: true,
- style: { height: 380 },
- startAdornment: (
- <InputAdornment title={t('core:qrCode')} position="start">
- <QRCode
- id="qr-code-link"
- value={signedLink.current}
- size={350}
- enableCORS={true}
- // logoWidth={64}
- // logoHeight={64}
- // logoImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAMqElEQVR42u1ba3AV5RmOgL8cO23tHx0VrYqWjlOtWJ22o21n2k4vo9OpQAiEBHLhYhKSkCsXa4QmgXAxAZSABEICISGEcEu4g1xEQAQCAkqQcDMQciE5J+e2Z/ft857zfZmc2V1OC5yujnln3tndJOfsPs/33r9NWJ/0SZ/834WIems/6IAQa79e9/vWgb9PnH+/Vl9V1f4ulyfM7fYM1jStnIhKoSugy6El0GVClwotFvqh0EVCF0IXQIug7wudJ3Q29APoG70Itx681+vtb7d3h3V22R7FdWPHrS46f+GSerHpCn198d5p44VLisPhJEgh31e4g+Xg+7W2toc1N7c8hOuTN1vbaVLqDPewiCRlZFSqEjE65Z7oqOjJypv/HOc80XCW2BosJUCCVxRvv6SkGWFfnW96ANcHOjttlJaZp4yITKbY8VNobHzWPVP+vuGjJimnTn9Jwi0kAVaBV+7jgLdh4w5+iPrubidNmT5XCR81yfewY+Iy76nGjMsmtqoGPQGWgZepqNLt8VDOvxd4ho9MkuCtIiD04D0eH/j+fI5ov0T1qjRrzhJlWESiIXiYLz/8/6T4jGY9AXrwnOLkTTntFRCkaGGpMnSEBK9/aARCGgpyhsE6/luNHJvGJFhJgB58R0dnzw0Vr3cqQZYsWwPwCYbgY/HA4aOSaUbuQlpZvp6WLa+ikhVrb6f4m7VUWrZOQSBtHy1IsJQACV7eTLhAAkHKVtd63/KBz9aDByFYSbhGMSFTEItGwcULd4JoVdV1HrgUk2gFAebgXW73KIJU12z1YuU1PJQh+OEjJ1HOzAXkcrkFMC/BZXxHEMgqfxagHkUhlqrqLWQRAebgUYFx+anW1e/V4POm4FEDcDokm72bWFRNIxYNR9ZeAtCB115V9RO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pWflK/zCNGS2BI+//06C12+kulw9JIhpjW3f/qO+V2cQ7XmW6EE1GbBrg8GG1eBD3z98iqlRevYsF8pZgiyQs0iHw1rwoe8fNJXdYTDOLyI2EI6LJHgLzN6a/gGZAfHB/XOcv7e+druvgLICvPX/JaY//17+n2CY1D7pkz7pE6vkP90Jgxz9IElIAAAAAElFTkSuQmCC"
- />
- </InputAdornment>
- ),
+ slotProps={{
+ input: {
+ readOnly: true,
+ style: { height: 380 },
+ startAdornment: (
+ <InputAdornment title={t('core:qrCode')} position="start">
+ <QRCode
+ id="qr-code-link"
+ value={signedLink.current}
+ size={350}
+ enableCORS={true}
+ // logoWidth={64}
+ // logoHeight={64}
+ // logoImage="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAMqElEQVR42u1ba3AV5RmOgL8cO23tHx0VrYqWjlOtWJ22o21n2k4vo9OpQAiEBHLhYhKSkCsXa4QmgXAxAZSABEICISGEcEu4g1xEQAQCAkqQcDMQciE5J+e2Z/ft857zfZmc2V1OC5yujnln3tndJOfsPs/33r9NWJ/0SZ/834WIems/6IAQa79e9/vWgb9PnH+/Vl9V1f4ulyfM7fYM1jStnIhKoSugy6El0GVClwotFvqh0EVCF0IXQIug7wudJ3Q29APoG70Itx681+vtb7d3h3V22R7FdWPHrS46f+GSerHpCn198d5p44VLisPhJEgh31e4g+Xg+7W2toc1N7c8hOuTN1vbaVLqDPewiCRlZFSqEjE65Z7oqOjJypv/HOc80XCW2BosJUCCVxRvv6SkGWFfnW96ANcHOjttlJaZp4yITKbY8VNobHzWPVP+vuGjJimnTn9Jwi0kAVaBV+7jgLdh4w5+iPrubidNmT5XCR81yfewY+Iy76nGjMsmtqoGPQGWgZepqNLt8VDOvxd4ho9MkuCtIiD04D0eH/j+fI5ov0T1qjRrzhJlWESiIXiYLz/8/6T4jGY9AXrwnOLkTTntFRCkaGGpMnSEBK9/aARCGgpyhsE6/luNHJvGJFhJgB58R0dnzw0Vr3cqQZ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6siIlvqgSPJsdq8Obv/olNEg6QlXhQftnBc9uXoEzA4zMaeg8FOZ4gGdLs0dvrwH8bSWDl62IGABM26x/MXpHRcmYWKeItkSkSfFfXHYO39HW4fA5eHywuV3QzRJNx2js57ysOdJ+QdyR4a83+7vuHTIKgdPWiihP9g3FgnPrOXIVdB/KeBI/2Vgf+O0cCrCJevCSl6x9kasyaWqAguhMktxf4+ywAH9L+Qanf9rE2TPQPcRMAPnISpWflK/zCNGS2BI+//06C12+kulw9JIhpjW3f/qO+V2cQ7XmW6EE1GbBrg8GG1eBD3z98iqlRevYsF8pZgiyQs0iHw1rwoe8fNJXdYTDOLyI2EI6LJHgLzN6a/gGZAfHB/XOcv7e+druvgLICvPX/JaY//17+n2CY1D7pkz7pE6vkP90Jgxz9IElIAAAAAElFTkSuQmCC"
+ />
+ </InputAdornment>
+ ),
+ },
}}
/>
</DialogContent>
diff --git a/src/renderer/components/dialogs/components/LocalForm.tsx b/src/renderer/components/dialogs/components/LocalForm.tsx
index f35cb635e..ae31d8413 100644
--- a/src/renderer/components/dialogs/components/LocalForm.tsx
+++ b/src/renderer/components/dialogs/components/LocalForm.tsx
@@ -70,7 +70,9 @@ function LocalForm(props: Props) {
required
autoFocus
name="name"
- inputProps={{ autoCorrect: 'off' }}
+ slotProps={{
+ input: { autoCorrect: 'off' },
+ }}
onChange={(event) => setName(event.target.value)}
value={name}
data-tid="locationName"
@@ -84,13 +86,14 @@ function LocalForm(props: Props) {
<TsTextField
required
name="path"
- inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
data-tid="locationPath"
onChange={(event) => setPath(event.target.value)}
value={path}
// placeholder="Enter a folder path or select it with the button on the right"
slotProps={{
input: {
+ autoCorrect: 'off',
+ autoCapitalize: 'none',
endAdornment: (
<InputAdornment position="end" style={{ height: 32 }}>
<TsIconButton onClick={openDirectory}>
diff --git a/src/renderer/components/dialogs/components/ObjectStoreForm.tsx b/src/renderer/components/dialogs/components/ObjectStoreForm.tsx
index b69423cda..a3c35828a 100644
--- a/src/renderer/components/dialogs/components/ObjectStoreForm.tsx
+++ b/src/renderer/components/dialogs/components/ObjectStoreForm.tsx
@@ -151,7 +151,9 @@ function ObjectStoreForm(props: Props) {
required
autoFocus
name="storeName"
- inputProps={{ autoCorrect: 'off' }}
+ slotProps={{
+ input: { autoCorrect: 'off' },
+ }}
data-tid="locationName"
onChange={(event) => setStoreName(event.target.value)}
value={storeName}
@@ -170,7 +172,9 @@ function ObjectStoreForm(props: Props) {
<FormControl fullWidth={true}>
<TsTextField
name="storePath"
- inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
+ slotProps={{
+ input: { autoCorrect: 'off', autoCapitalize: 'none' },
+ }}
data-tid="locationPath"
onChange={(event) => setStorePath(event.target.value)}
value={storePath}
@@ -191,7 +195,9 @@ function ObjectStoreForm(props: Props) {
required
name="accessKeyId"
data-tid="accessKeyId"
- inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
+ slotProps={{
+ input: { autoCorrect: 'off', autoCapitalize: 'none' },
+ }}
onChange={(event) => setAccessKeyId(event.target.value)}
value={accessKeyId}
label={t('core:accessKeyId') + ' *'}
@@ -213,12 +219,13 @@ function ObjectStoreForm(props: Props) {
name="secretAccessKey"
type={showSecretAccessKey ? 'text' : 'password'}
data-tid="secretAccessKey"
- inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
onChange={(event) => setSecretAccessKey(event.target.value)}
value={secretAccessKey}
label={t('core:secretAccessKey') + ' *'}
slotProps={{
input: {
+ autoCorrect: 'off',
+ autoCapitalize: 'none',
endAdornment: (
<InputAdornment position="end">
<TsIconButton
@@ -242,7 +249,9 @@ function ObjectStoreForm(props: Props) {
<TsTextField
name="sessionToken"
data-tid="sessionTokenTID"
- inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
+ slotProps={{
+ input: { autoCorrect: 'off', autoCapitalize: 'none' },
+ }}
onChange={(event) => setSessionToken(event.target.value)}
value={sessionToken}
label={t('core:sessionToken')}
@@ -254,7 +263,9 @@ function ObjectStoreForm(props: Props) {
<TsTextField
name="bucketName"
data-tid="bucketName"
- inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
+ slotProps={{
+ input: { autoCorrect: 'off', autoCapitalize: 'none' },
+ }}
onChange={(event) => setBucketName(event.target.value)}
value={bucketName}
label={t('core:bucketName')}
diff --git a/src/renderer/components/dialogs/components/SettingsAdvanced.tsx b/src/renderer/components/dialogs/components/SettingsAdvanced.tsx
index 403043670..e53f484c6 100644
--- a/src/renderer/components/dialogs/components/SettingsAdvanced.tsx
+++ b/src/renderer/components/dialogs/components/SettingsAdvanced.tsx
@@ -16,38 +16,38 @@
*
*/
-import React, { useContext, useState } from 'react';
-import { useSelector, useDispatch } from 'react-redux';
-import List from '@mui/material/List';
-import ListItem from '@mui/material/ListItem';
-import ListItemText from '@mui/material/ListItemText';
+import AppConfig from '-/AppConfig';
+import { DeleteIcon } from '-/components/CommonIcons';
+import { ProLabel } from '-/components/HelperComponents';
+import InfoIcon from '-/components/InfoIcon';
import Tooltip from '-/components/Tooltip';
import TsButton from '-/components/TsButton';
-import CheckIcon from '@mui/icons-material/Check';
-import EditIcon from '@mui/icons-material/Edit';
import TsIconButton from '-/components/TsIconButton';
-import Switch from '@mui/material/Switch';
-import MenuItem from '@mui/material/MenuItem';
-import AppConfig from '-/AppConfig';
+import TsSelect from '-/components/TsSelect';
+import TsTextField from '-/components/TsTextField';
+import ConfirmDialog from '-/components/dialogs/ConfirmDialog';
+import MapTileServerDialog from '-/components/dialogs/MapTileServerDialog';
+import { Pro } from '-/pro';
+import { AppDispatch } from '-/reducers/app';
import {
actions as SettingsActions,
- getSettings,
getMapTileServers,
- isDevMode,
getMaxCollectedTag,
+ getSettings,
+ isDevMode,
} from '-/reducers/settings';
import { TS } from '-/tagspaces.namespace';
-import MapTileServerDialog from '-/components/dialogs/MapTileServerDialog';
-import TsTextField from '-/components/TsTextField';
-import TsSelect from '-/components/TsSelect';
-import { Pro } from '-/pro';
-import { ProLabel } from '-/components/HelperComponents';
-import InfoIcon from '-/components/InfoIcon';
-import { DeleteIcon } from '-/components/CommonIcons';
+import CheckIcon from '@mui/icons-material/Check';
+import EditIcon from '@mui/icons-material/Edit';
import { ListItemIcon } from '@mui/material';
-import ConfirmDialog from '-/components/dialogs/ConfirmDialog';
-import { AppDispatch } from '-/reducers/app';
+import List from '@mui/material/List';
+import ListItem from '@mui/material/ListItem';
+import ListItemText from '@mui/material/ListItemText';
+import MenuItem from '@mui/material/MenuItem';
+import Switch from '@mui/material/Switch';
+import React, { useContext, useState } from 'react';
import { useTranslation } from 'react-i18next';
+import { useDispatch, useSelector } from 'react-redux';
interface Props {
showResetSettings: (showDialog: boolean) => void;
@@ -185,7 +185,9 @@ function SettingsAdvanced(props: Props) {
<ListItemText primary={t('core:maxCollectedTag')} />
<TsTextField
type="number"
- inputProps={{ inputMode: 'numeric', pattern: '[0-9]*' }}
+ slotProps={{
+ input: { inputMode: 'numeric', min: 0 },
+ }}
style={{ maxWidth: '92px' }}
data-tid="prefixTagContainerTID"
value={maxCollectedTag}
diff --git a/src/renderer/components/dialogs/components/SettingsGeneral.tsx b/src/renderer/components/dialogs/components/SettingsGeneral.tsx
index 1008236c7..74e44607f 100644
--- a/src/renderer/components/dialogs/components/SettingsGeneral.tsx
+++ b/src/renderer/components/dialogs/components/SettingsGeneral.tsx
@@ -16,39 +16,39 @@
*
*/
-import React, { useState } from 'react';
-import { useSelector, useDispatch } from 'react-redux';
-import List from '@mui/material/List';
-import ListItem from '@mui/material/ListItem';
-import ListItemText from '@mui/material/ListItemText';
-import Typography from '@mui/material/Typography';
-import MenuItem from '@mui/material/MenuItem';
-import Switch from '@mui/material/Switch';
+import AppConfig from '-/AppConfig';
+import { BetaLabel } from '-/components/HelperComponents';
+import InfoIcon from '-/components/InfoIcon';
+import PerspectiveSelector from '-/components/PerspectiveSelector';
import Tooltip from '-/components/Tooltip';
+import TransparentBackground from '-/components/TransparentBackground';
import TsButton from '-/components/TsButton';
-import InfoMuiIcon from '@mui/icons-material/InfoOutlined';
-import InfoIcon from '-/components/InfoIcon';
-import CheckIcon from '@mui/icons-material/Check';
-import ToggleButton from '@mui/material/ToggleButton';
-import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
-import AppConfig from '-/AppConfig';
+import TsSelect from '-/components/TsSelect';
+import TsTextField from '-/components/TsTextField';
+import ColorPickerDialog from '-/components/dialogs/ColorPickerDialog';
+import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
+import { PerspectiveIDs } from '-/perspectives';
+import { AppDispatch } from '-/reducers/app';
import {
actions as SettingsActions,
getFileNameTagPlace,
getPersistTagsInSidecarFile,
getSettings,
} from '-/reducers/settings';
-import ColorPickerDialog from '-/components/dialogs/ColorPickerDialog';
-import PerspectiveSelector from '-/components/PerspectiveSelector';
-import TransparentBackground from '-/components/TransparentBackground';
-import TsTextField from '-/components/TsTextField';
-import TsSelect from '-/components/TsSelect';
-import { BetaLabel } from '-/components/HelperComponents';
-import { PerspectiveIDs } from '-/perspectives';
-import { AppDispatch } from '-/reducers/app';
-import { useTranslation } from 'react-i18next';
-import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
import { setLanguage } from '-/services/utils-io';
+import CheckIcon from '@mui/icons-material/Check';
+import InfoMuiIcon from '@mui/icons-material/InfoOutlined';
+import List from '@mui/material/List';
+import ListItem from '@mui/material/ListItem';
+import ListItemText from '@mui/material/ListItemText';
+import MenuItem from '@mui/material/MenuItem';
+import Switch from '@mui/material/Switch';
+import ToggleButton from '@mui/material/ToggleButton';
+import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
+import Typography from '@mui/material/Typography';
+import { useState } from 'react';
+import { useTranslation } from 'react-i18next';
+import { useDispatch, useSelector } from 'react-redux';
function SettingsGeneral() {
const { i18n, t } = useTranslation();
@@ -434,10 +434,11 @@ function SettingsGeneral() {
data-tid="settingsTagDelimiterChoose"
value={this.settings.tagDelimiter}
onChange={this.handleTagDelimiterChange}
- inputProps={{
+ slotProps={{
+ input: {
name: 'tagDelimiter',
id: 'tag-delimiter',
- }}
+ }}}
>
<MenuItem value=" ">{t('core:tagDelimiterSpace')}</MenuItem>
<MenuItem value="_">{t('core:tagDelimiterUnderscore')}</MenuItem>
diff --git a/src/renderer/components/dialogs/components/WebdavForm.tsx b/src/renderer/components/dialogs/components/WebdavForm.tsx
index 8c793fd05..233c4d83b 100644
--- a/src/renderer/components/dialogs/components/WebdavForm.tsx
+++ b/src/renderer/components/dialogs/components/WebdavForm.tsx
@@ -81,7 +81,9 @@ function WebdavForm(props: Props) {
required
margin="dense"
name="name"
- inputProps={{ autoCorrect: 'off' }}
+ slotProps={{
+ input: { autoCorrect: 'off' },
+ }}
onChange={(event) => setName(event.target.value)}
value={name}
label={t('core:createLocationName')}
@@ -119,7 +121,9 @@ function WebdavForm(props: Props) {
name="userNameId"
fullWidth={true}
data-tid="userNameIdTID"
- inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
+ slotProps={{
+ input: { autoCorrect: 'off', autoCapitalize: 'none' },
+ }}
onChange={(event) => setUserName(event.target.value)}
label={t('core:userName')}
value={userName}
@@ -134,12 +138,13 @@ function WebdavForm(props: Props) {
type={showPassword ? 'text' : 'password'}
fullWidth={true}
data-tid="passwordTID"
- inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
onChange={(event) => setPassword(event.target.value)}
value={password}
label={t('core:password')}
slotProps={{
input: {
+ autoCorrect: 'off',
+ autoCapitalize: 'none',
endAdornment: (
<InputAdornment position="end">
<TsIconButton
@@ -166,12 +171,13 @@ function WebdavForm(props: Props) {
type={showPassword ? 'text' : 'password'}
fullWidth={true}
data-tid="webDavToken"
- inputProps={{ autoCorrect: 'off', autoCapitalize: 'none' }}
onChange={(event) => setSecretAccessKey(event.target.value)}
value={secretAccessKey}
label={t('core:webDavToken')}
slotProps={{
input: {
+ autoCorrect: 'off',
+ autoCapitalize: 'none',
endAdornment: (
<InputAdornment position="end">
<TsIconButton