TagSpaces is an offline, open source, document manager with tagging support
chore: migration from style to sx
Ilian Sapundshievc76881eac8f8
diff --git a/src/renderer/components/AiPropertiesTab.tsx b/src/renderer/components/AiPropertiesTab.tsxindex 2197c9f71..a888353dc 100644--- a/src/renderer/components/AiPropertiesTab.tsx+++ b/src/renderer/components/AiPropertiesTab.tsx@@ -41,7 +41,7 @@ function AiPropertiesTab(props: Props) {{openedEntry.meta?.description && (<AiGenTagsButtonfromDescription={true}- style={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}+ sx={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}/>)}</Box>diff --git a/src/renderer/components/EditDescriptionButtons.tsx b/src/renderer/components/EditDescriptionButtons.tsxindex b1cd14ff6..684ae4000 100644--- a/src/renderer/components/EditDescriptionButtons.tsx+++ b/src/renderer/components/EditDescriptionButtons.tsx@@ -144,7 +144,7 @@ const EditDescriptionButtons: React.FC<ButtonsProps> = ({<ButtonGroup>{isEditDescriptionMode && (<TsButton- style={{ borderTopRightRadius: 0, borderBottomRightRadius: 0 }}+ sx={{ borderTopRightRadius: 0, borderBottomRightRadius: 0 }}onClick={() => {resetMdContent(openedEntry.meta?.description);setEditMode(false);@@ -167,7 +167,7 @@ const EditDescriptionButtons: React.FC<ButtonsProps> = ({//isEditMode ||findLocation(openedEntry.locationID)?.isReadOnly}- style={{+ sx={{borderTopLeftRadius: isEditDescriptionMode? 0: AppConfig.defaultCSSRadius,@@ -204,7 +204,7 @@ const EditDescriptionButtons: React.FC<ButtonsProps> = ({tooltip={'Add AI generated description based on the file content'}><AiGenDescButton- style={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}+ sx={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}variant="outlined"/></ProTooltip>@@ -214,7 +214,7 @@ const EditDescriptionButtons: React.FC<ButtonsProps> = ({tooltip={'Add AI generated tags based on the description'}><AiGenTagsButton- style={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}+ sx={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}fromDescription={true}variant="outlined"/>@@ -224,7 +224,7 @@ const EditDescriptionButtons: React.FC<ButtonsProps> = ({<TsIconButtontooltip={t('core:moreActions')}onClick={handleMoreClick}- style={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}+ sx={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}data-tid="moreActionsTID"aria-label={t('core:moreActions')}aria-controls={Boolean(anchorEl) ? 'account-menu' : undefined}diff --git a/src/renderer/components/EditSearchQuery.tsx b/src/renderer/components/EditSearchQuery.tsxindex 4ab63859b..b662a1eff 100644--- a/src/renderer/components/EditSearchQuery.tsx+++ b/src/renderer/components/EditSearchQuery.tsx@@ -261,7 +261,7 @@ function EditSearchQuery(props: Props) {value={tempSearchQuery.searchBoxing}><TsToggleButton- style={{+ sx={{borderTopRightRadius: 0,borderBottomRightRadius: 0,}}@@ -271,7 +271,7 @@ function EditSearchQuery(props: Props) {{t('location')}</TsToggleButton><TsToggleButton- style={{+ sx={{borderRadius: 0,}}tooltip={t('searchCurrentFolderWithSubFolders')}@@ -280,7 +280,7 @@ function EditSearchQuery(props: Props) {{t('folder')}</TsToggleButton><TsToggleButton- style={{+ sx={{borderTopLeftRadius: 0,borderBottomLeftRadius: 0,}}@@ -306,7 +306,7 @@ function EditSearchQuery(props: Props) {value={tempSearchQuery.searchType}><TsToggleButton- style={{+ sx={{borderTopRightRadius: 0,borderBottomRightRadius: 0,}}@@ -317,7 +317,7 @@ function EditSearchQuery(props: Props) {{t('searchTypeFuzzy')}</TsToggleButton><TsToggleButton- style={{+ sx={{borderRadius: 0,}}tooltip={t('searchTypeSemiStrictTooltip')}@@ -327,7 +327,7 @@ function EditSearchQuery(props: Props) {{t('searchTypeSemiStrict')}</TsToggleButton><TsToggleButton- style={{+ sx={{borderTopLeftRadius: 0,borderBottomLeftRadius: 0,}}@@ -353,7 +353,7 @@ function EditSearchQuery(props: Props) {><TsToggleButtontooltip={t('useCurrentIndexTooltip')}- style={{+ sx={{borderTopRightRadius: 0,borderBottomRightRadius: 0,}}@@ -363,7 +363,7 @@ function EditSearchQuery(props: Props) {</TsToggleButton><TsToggleButtontooltip={t('forceReindexTooltip')}- style={{+ sx={{borderTopLeftRadius: 0,borderBottomLeftRadius: 0,}}@@ -408,7 +408,7 @@ function EditSearchQuery(props: Props) {/></FormControl><FormControl disabled={isIndexing !== undefined}>- <FormHelperText style={{ marginLeft: 0 }}></FormHelperText>+ <FormHelperText sx={{ marginLeft: 0 }}></FormHelperText><TsSelectvalue={findPropertiesByValues(tempSearchQuery.fileTypes)}onChange={handleFileTypeChange}@@ -633,7 +633,7 @@ function EditSearchQuery(props: Props) {<LocalizationProvider dateAdapter={AdapterDateFns}><Box position="relative" display="inline-flex"><div style={{ maxWidth: 180 }}>- <FormHelperText style={{ marginLeft: 0, marginTop: 0 }}>+ <FormHelperText sx={{ marginLeft: 0, marginTop: 0 }}>{t('core:enterTagTimePeriodFrom')}</FormHelperText><TsDatePicker@@ -653,7 +653,7 @@ function EditSearchQuery(props: Props) {/></div><div style={{ marginLeft: 5, maxWidth: 180 }}>- <FormHelperText style={{ marginLeft: 0, marginTop: 0 }}>+ <FormHelperText sx={{ marginLeft: 0, marginTop: 0 }}>{t('core:enterTagTimePeriodTo')}</FormHelperText><TsDatePickerdiff --git a/src/renderer/components/EntryContainer.tsx b/src/renderer/components/EntryContainer.tsxindex 8e6a71a3e..77c588dee 100644--- a/src/renderer/components/EntryContainer.tsx+++ b/src/renderer/components/EntryContainer.tsx@@ -138,11 +138,8 @@ function EntryContainer() {useEffect(() => {try {if (- fileViewer &&- fileViewer.current &&- fileViewer.current.contentWindow &&// @ts-ignore- fileViewer.current.contentWindow.setTheme+ fileViewer?.current?.contentWindow?.setTheme) {// @ts-ignore call setContent from iframefileViewer.current.contentWindow.setTheme(theme.palette.mode);@@ -150,7 +147,7 @@ function EntryContainer() {} catch (e) {console.log('Error setTheme', e);}- }, [theme.palette.mode]); //settings.currentTheme+ }, [theme.palette.mode]);const editingSupported: boolean =cLocation &&@@ -565,29 +562,29 @@ function EntryContainer() {toggleFullScreen: keyBindings.toggleFullScreen,}}>- <div- style={{+ <Box+ sx={{height: '100%',...(isPanelOpened && openedPanelStyle),}}>- <div- style={{+ <Box+ sx={{width: '100%',flexDirection: 'column',flex: '1 1 ' + entryPropertiesHeight + '%',display: 'flex',backgroundColor: theme.palette.background.default,overflow: 'hidden',- marginBottom: 1,+ marginBottom: '1px',}}><Box- style={{+ sx={{paddingLeft: 0,- paddingRight: 55,+ paddingRight: '55px',paddingTop: 0,- minHeight: 48,+ minHeight: '48px',display: 'flex',flexDirection: 'row',justifyContent: 'flex-start',@@ -610,29 +607,28 @@ function EntryContainer() {{tabsElement}{openedEntry.isFile && isPanelOpened && (<Tooltip title={t('core:togglePreviewSize')}>- <div- style={{+ <Box+ sx={{textAlign: 'center',- // maxHeight: 9,- minHeight: 8,- paddingTop: 2,- backgroundColor: theme.palette.background.default,+ minHeight: '8px',+ paddingTop: '2px',+ backgroundColor: 'background.default',borderBottom: '1px solid ' + theme.palette.divider,cursor: 's-resize',}}onClick={toggleEntryPropertiesHeight}>- <div- style={{+ <Box+ sx={{width: '10%',border: '1px dashed ' + theme.palette.text.secondary,margin: '2px auto',}}- ></div>- </div>+ ></Box>+ </Box></Tooltip>)}- </div>+ </Box>{openedEntry.isFile && (<FileViewkey="FileViewID"@@ -644,7 +640,7 @@ function EntryContainer() {handleMessage={handleMessage}/>)}- </div>+ </Box></GlobalHotKeys>);}diff --git a/src/renderer/components/EntryContainerTitle.tsx b/src/renderer/components/EntryContainerTitle.tsxindex 1504064ba..097ad63b0 100644--- a/src/renderer/components/EntryContainerTitle.tsx+++ b/src/renderer/components/EntryContainerTitle.tsx@@ -160,7 +160,7 @@ function EntryContainerTitle(props: Props) {title={t('closeButtonDialog')}aria-label="close"tabIndex={-1}- style={+ sx={{WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }@@ -196,10 +196,10 @@ function EntryContainerTitle(props: Props) {onClick={(event: React.MouseEvent<HTMLElement>) => {setAnchorEl(event.currentTarget);}}- style={+ sx={{backgroundColor: fileSystemEntryColor,- paddingLeft: 10,+ paddingLeft: '10px',WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }}@@ -224,10 +224,10 @@ function EntryContainerTitle(props: Props) {onClick={(event: React.MouseEvent<HTMLElement>) => {setAnchorEl(event.currentTarget);}}- style={+ sx={{backgroundColor: AppConfig.defaultFolderColor,- paddingLeft: 10,+ paddingLeft: '10px',WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }}@@ -266,14 +266,14 @@ function EntryContainerTitle(props: Props) {{bookmarksContext &&bookmarksContext.haveBookmark(openedEntry.path) ? (<EntryBookmarkIcon- style={{- color: theme.palette.primary.main,+ sx={{+ color: 'primary.main',}}/>) : (<EntryBookmarkAddIcon- style={{- color: theme.palette.text.secondary,+ sx={{+ color: 'text.secondary',}}/>)}@@ -283,8 +283,8 @@ function EntryContainerTitle(props: Props) {{openedEntry.isEncrypted && (<Tooltip title={t('core:encryptedTooltip')}><EncryptedIcon- style={{- color: theme.palette.primary.main,+ sx={{+ color: 'primary.main',}}/></Tooltip>diff --git a/src/renderer/components/FileView.tsx b/src/renderer/components/FileView.tsxindex 90a090c84..5c02725f2 100644--- a/src/renderer/components/FileView.tsx+++ b/src/renderer/components/FileView.tsx@@ -46,18 +46,12 @@ function FileView(props: Props) {const { i18n } = useTranslation();const theme = useTheme();const { openedEntry } = useOpenedEntryContext();- //const { saveFileOpen } = useResolveConflictContext();const { isEditMode } = useFilePropertiesContext();const { setFullscreen, isFullscreen, toggleFullScreen } =useFullScreenContext();const { searchQuery, isSearchMode } = useDirectoryContentContext();-const { fileViewer, fileViewerContainer, height, handleMessage } = props;-const eventID = useRef<string>(getUuid());- // const [thumb, setThumb] = useState<string | null>(null);- // const [loadingThumb, setLoadingThumb] = useState(true);- // const [ignored, forceUpdate] = useReducer((x) => x + 1, 0, undefined);useEffect(() => {if (AppConfig.isElectron) {@@ -132,7 +126,6 @@ function FileView(props: Props) {useEventListener('message', (e) => {if (typeof e.data === 'string') {- // console.log(e.data);try {const dataObj = JSON.parse(e.data);if (dataObj.eventID === eventID.current) {@@ -147,45 +140,8 @@ function FileView(props: Props) {}});- /*const savingFile = (force = false) => {- try {- if (- fileViewer &&- fileViewer.current &&- fileViewer.current.contentWindow &&- // @ts-ignore- fileViewer.current.contentWindow.getContent- ) {- // @ts-ignore- const fileContent = fileViewer.current.contentWindow.getContent();- //check if file is changed- if (fileChanged || force) {- setSavingInProgress(true);- forceUpdate();- saveFileOpen(openedEntry, fileContent).then((success) => {- if (success) {- setFileChanged(false);- // showNotification(- // t('core:fileSavedSuccessfully'),- // NotificationTypes.default- // );- }- // change state will not render DOT before file name too- setSavingInProgress(false);- });- }- }- } catch (e) {- setSavingInProgress(false);- console.debug('function getContent not exist for file:', e);- }- };*/const fileOpenerURL: string = useMemo(() => {if (openedEntry && openedEntry.path) {- // if (fileTitle.length > maxCharactersTitleLength) {- // fileTitle = fileTitle.substr(0, maxCharactersTitleLength) + '...';- // }-const textColor = theme.palette.text.primary;const primaryColor = theme.palette.primary.main;const bgndColor = theme.palette.background.default;@@ -257,16 +213,6 @@ function FileView(props: Props) {isSearchMode,]);- /* useEffect(() => {- const el = fileViewer.current;- if (!el) return;- // note: el.src may return fully qualified URL — use === comparison will work if we set it before,- // otherwise you can compare el.getAttribute('src') to be stricter.- if (el.getAttribute('src') !== fileOpenerURL) {- el.setAttribute('src', fileOpenerURL);- }- }, [fileOpenerURL]); */-return (<divref={fileViewerContainer}@@ -296,7 +242,7 @@ function FileView(props: Props) {<span>ESC</span></div>)}- {openedEntry.isFile && ( //!loadingThumb && (+ {openedEntry.isFile && (<iframeref={fileViewer}style={{diff --git a/src/renderer/components/FolderContainer.tsx b/src/renderer/components/FolderContainer.tsxindex e46984df5..87e57afe2 100644--- a/src/renderer/components/FolderContainer.tsx+++ b/src/renderer/components/FolderContainer.tsx@@ -176,7 +176,7 @@ function FolderContainer({ toggleDrawer, drawerOpened, hidden }: Props) {key={perspective.id}data-tid={perspective.key}onClick={() => switchPerspective(perspective.id)}- style={{+ sx={{opacity: 0.9,backgroundColor: theme.palette.background.default,border: '1px solid ' + theme.palette.divider,@@ -423,7 +423,7 @@ function FolderContainer({ toggleDrawer, drawerOpened, hidden }: Props) {value=""aria-label="chat-label"data-tid="chatTID"- style={{+ sx={{marginLeft: '5px',...(readOnlyLocation? {}diff --git a/src/renderer/components/HowToStart.tsx b/src/renderer/components/HowToStart.tsxindex a72cb6f20..f682c342b 100644--- a/src/renderer/components/HowToStart.tsx+++ b/src/renderer/components/HowToStart.tsx@@ -291,11 +291,11 @@ function HowToStart() {</style><Typographyvariant="inherit"- style={{+ sx={{color: theme.palette.text.primary,textTransform: 'uppercase',textAlign: 'center',- paddingTop: 20,+ paddingTop: '20px',}}noWrap>@@ -306,7 +306,7 @@ function HowToStart() {<Step key={step.label}><StepLabel>{step.label}</StepLabel><StepContent>- <Typography style={{ color: theme.palette.text.primary }}>+ <Typography sx={{ color: theme.palette.text.primary }}>{step.description}</Typography><Box sx={{ mb: 2 }}>@@ -337,8 +337,7 @@ function HowToStart() {<Papersquareelevation={0}- sx={{ p: 3 }}- style={{ backgroundColor: 'transparent' }}+ sx={{ p: 3, backgroundColor: 'transparent' }}><Typography>All steps completed - you're finished.</Typography><TsButton onClick={handleReset} sx={{ mt: 1, mr: 1 }}>diff --git a/src/renderer/components/LinksTab.tsx b/src/renderer/components/LinksTab.tsxindex 938d9be3b..709db1d4e 100644--- a/src/renderer/components/LinksTab.tsx+++ b/src/renderer/components/LinksTab.tsx@@ -142,7 +142,7 @@ function LinksTab(props: Props) {<LinkIcon /></TooltipTS>}- style={{+ sx={{marginRight: AppConfig.defaultSpaceBetweenButtons,textTransform: 'none',fontWeight: 'normal',@@ -183,7 +183,7 @@ function LinksTab(props: Props) {<LinkIcon /></TooltipTS>}- style={{+ sx={{marginRight: AppConfig.defaultSpaceBetweenButtons,textTransform: 'none',fontWeight: 'normal',diff --git a/src/renderer/components/LocationManager.tsx b/src/renderer/components/LocationManager.tsxindex 68e266bdb..c21ce847b 100644--- a/src/renderer/components/LocationManager.tsx+++ b/src/renderer/components/LocationManager.tsx@@ -156,10 +156,10 @@ function LocationManager(props: Props) {{locationDirectoryContextMenuAnchorEl && <LocationContextMenu />}<Listdata-tid="locationList"- style={{+ sx={{height: 'calc(100% - ' + reduceHeightBy + 'px)',- width: 310,- borderRadius: 5,+ width: '310px',+ borderRadius: '5px',paddingTop: 0,marginTop: 0,overflowY: 'auto',diff --git a/src/renderer/components/PerspectiveSelector.tsx b/src/renderer/components/PerspectiveSelector.tsxindex 719491920..c3424b84a 100644--- a/src/renderer/components/PerspectiveSelector.tsx+++ b/src/renderer/components/PerspectiveSelector.tsx@@ -45,7 +45,7 @@ function PerspectiveSelector(props: Props) {const perspectiveSelectorMenuItems = [];perspectiveSelectorMenuItems.push(<MenuItem- style={{ display: 'flex' }}+ sx={{ display: 'flex' }}key={PerspectiveIDs.UNSPECIFIED}value={PerspectiveIDs.UNSPECIFIED}>diff --git a/src/renderer/components/ProTeaser.tsx b/src/renderer/components/ProTeaser.tsxindex 107117c6c..c4a91fb83 100644--- a/src/renderer/components/ProTeaser.tsx+++ b/src/renderer/components/ProTeaser.tsx@@ -43,9 +43,9 @@ function ProTeaser(props: Props) {return (<Box style={{ display: 'block', marginBottom: 0 }}><CardContent- style={{- paddingLeft: 5,- paddingRight: 5,+ sx={{+ paddingLeft: '5px',+ paddingRight: '5px',paddingTop: 0,paddingBottom: 0,textAlign: 'center',@@ -57,7 +57,7 @@ function ProTeaser(props: Props) {{t('core:achieveMore')}</span><TsIconButton- style={{ right: 5, position: 'absolute' }}+ sx={{ right: '5px', position: 'absolute' }}size="small"aria-label="close"onClick={(event) => {@@ -81,13 +81,13 @@ function ProTeaser(props: Props) {{/* <img style={{ height: 35 }} src={ProTextLogo} alt="" /> */}<br /><ViewKanbanTwoToneIcon- style={{- fontSize: 50,+ sx={{+ fontSize: '50px',color: '#a466aa',}}/>- <CameraTwoToneIcon style={{ fontSize: 50, color: '#f7901e' }} />- <MapTwoToneIcon style={{ fontSize: 50, color: '#33b5be' }} />+ <CameraTwoToneIcon sx={{ fontSize: '50px', color: '#f7901e' }} />+ <MapTwoToneIcon sx={{ fontSize: '50px', color: '#33b5be' }} />{/* <img style={{ maxHeight: 60 }} src={ProTeaserImage} alt="" /> */}</div></CardContent>@@ -100,7 +100,7 @@ function ProTeaser(props: Props) {><ButtonGroup><TsButton- style={{ borderTopRightRadius: 0, borderBottomRightRadius: 0 }}+ sx={{ borderTopRightRadius: 0, borderBottomRightRadius: 0 }}onClick={(event: any) => {event.preventDefault();event.stopPropagation();@@ -110,7 +110,7 @@ function ProTeaser(props: Props) {{t('showMeMore')}</TsButton><TsButton- style={{ borderTopLeftRadius: 0, borderBottomLeftRadius: 0 }}+ sx={{ borderTopLeftRadius: 0, borderBottomLeftRadius: 0 }}onClick={(event: any) => {event.preventDefault();event.stopPropagation();diff --git a/src/renderer/components/Revisions.tsx b/src/renderer/components/Revisions.tsxindex 5752e9127..549f6d403 100644--- a/src/renderer/components/Revisions.tsx+++ b/src/renderer/components/Revisions.tsx@@ -16,15 +16,18 @@**/-import React, { useEffect, useState } from 'react';-import {- getBackupDir,- extractFileNameWithoutExt,- isMeta,-} from '@tagspaces/tagspaces-common/paths';-import { TS } from '-/tagspaces.namespace';-import { format, formatDistanceToNow } from 'date-fns';+import { DeleteIcon, PreviewIcon, RestoreIcon } from '-/components/CommonIcons';+import FilePreviewDialog from '-/components/dialogs/FilePreviewDialog';import TsIconButton from '-/components/TsIconButton';+import TsSelect from '-/components/TsSelect';+import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';+import { useEditedEntryMetaContext } from '-/hooks/useEditedEntryMetaContext';+import { useFilePropertiesContext } from '-/hooks/useFilePropertiesContext';+import { useIOActionsContext } from '-/hooks/useIOActionsContext';+import { useOpenedEntryContext } from '-/hooks/useOpenedEntryContext';+import { usePlatformFacadeContext } from '-/hooks/usePlatformFacadeContext';+import { Pro } from '-/pro';+import { TS } from '-/tagspaces.namespace';import {Box,Paper,@@ -36,18 +39,15 @@ import {TablePagination,TableRow,} from '@mui/material';-import { Pro } from '-/pro';-import { DeleteIcon, PreviewIcon, RestoreIcon } from '-/components/CommonIcons';-import FilePreviewDialog from '-/components/dialogs/FilePreviewDialog';-import { useTranslation } from 'react-i18next';-import { useOpenedEntryContext } from '-/hooks/useOpenedEntryContext';-import { usePlatformFacadeContext } from '-/hooks/usePlatformFacadeContext';-import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';-import { useIOActionsContext } from '-/hooks/useIOActionsContext';-import { useFilePropertiesContext } from '-/hooks/useFilePropertiesContext';-import { useEditedEntryMetaContext } from '-/hooks/useEditedEntryMetaContext';import MenuItem from '@mui/material/MenuItem';-import TsSelect from '-/components/TsSelect';+import {+ extractFileNameWithoutExt,+ getBackupDir,+ isMeta,+} from '@tagspaces/tagspaces-common/paths';+import { format, formatDistanceToNow } from 'date-fns';+import React, { useEffect, useState } from 'react';+import { useTranslation } from 'react-i18next';const initialRowsPerPage = 10;@@ -70,6 +70,12 @@ function Revisions() {const [revisionsType, setRevisionsType] = useState<'meta' | 'file'>('file');// const [ignored, forceUpdate] = useReducer(x => x + 1, 0);+ useEffect(() => {+ if (!openedEntry.isFile) {+ setRevisionsType('meta');+ }+ }, [openedEntry]);+useEffect(() => {// if no history item path - not loadHistoryItems for items in metaFolderif (openedEntry && !isMeta(openedEntry.path)) {@@ -238,22 +244,24 @@ function Revisions() {><DeleteIcon /></TsIconButton>- <TsSelect- data-tid="revisionsTypeTID"- fullWidth={false}- value={revisionsType}- onChange={(event: any) => {- return setRevisionsType(event.target.value);- }}- sx={{ minWidth: 120 }}- >- <MenuItem key="file" value="file">- {t('file')}- </MenuItem>- <MenuItem key="meta" value="meta">- {t('meta')}- </MenuItem>- </TsSelect>+ {openedEntry.isFile && (+ <TsSelect+ data-tid="revisionsTypeTID"+ fullWidth={false}+ value={revisionsType}+ onChange={(event: any) => {+ return setRevisionsType(event.target.value);+ }}+ sx={{ minWidth: 120 }}+ >+ <MenuItem key="file" value="file">+ {t('file')}+ </MenuItem>+ <MenuItem key="meta" value="meta">+ {t('meta')}+ </MenuItem>+ </TsSelect>+ )}</Box></TableCell><TableCell align="right">{t('created')}</TableCell>diff --git a/src/renderer/components/SearchAutocomplete.tsx b/src/renderer/components/SearchAutocomplete.tsxindex f68bc4e3c..e135acdc0 100644--- a/src/renderer/components/SearchAutocomplete.tsx+++ b/src/renderer/components/SearchAutocomplete.tsx@@ -489,7 +489,7 @@ function SearchAutocomplete(props: Props) {}><TsIconButton edge="end">- <HelpOutlineIcon style={{ color: 'lightgray' }} />+ <HelpOutlineIcon sx={{ color: 'lightgray' }} /></TsIconButton></Tooltip>);@@ -1271,7 +1271,7 @@ function SearchAutocomplete(props: Props) {tooltip={t('core:advancedSearch')}id="advancedButton"data-tid="advancedSearch"- style={{ maxHeight: 34 }}+ sx={{ maxHeight: '34px' }}size={desktopMode ? 'small' : 'medium'}onClick={(event: React.MouseEvent<HTMLButtonElement>) => {setAnchorSearch(event.currentTarget);@@ -1286,7 +1286,7 @@ function SearchAutocomplete(props: Props) {onClick={() => {clearSearch();}}- style={{ maxHeight: 34 }}+ sx={{ maxHeight: '34px' }}size={desktopMode ? 'small' : 'medium'}edge="end">@@ -1431,7 +1431,7 @@ function SearchAutocomplete(props: Props) {}}data-tid={dataTidFormat('menu' + option)}variant="text"- style={{+ sx={{backgroundColor: 'transparent',textTransform: 'lowercase',padding: 0,@@ -1439,7 +1439,7 @@ function SearchAutocomplete(props: Props) {}}endIcon={<ArrowDropDownIcon- style={{ marginLeft: -10 }}+ sx={{ marginLeft: '-10px' }}fontSize="small"/>}@@ -1457,7 +1457,7 @@ function SearchAutocomplete(props: Props) {onClick={() => {handleChange(null, [option], 'remove-value');}}- style={{+ sx={{padding: 0,margin: 0,textTransform: 'lowercase',@@ -1493,19 +1493,19 @@ function SearchAutocomplete(props: Props) {{option.color ? (<TsButtonvariant="text"- style={{- fontSize: 13,+ sx={{+ fontSize: '13px',textTransform: 'none',color: option.textcolor,backgroundColor: option.color,minHeight: 0,minWidth: 0,- margin: 2,+ margin: '2px',paddingTop: 0,paddingBottom: 0,- paddingRight: 5,- paddingLeft: 5,- borderRadius: 5,+ paddingRight: '5px',+ paddingLeft: '5px',+ borderRadius: '5px',}}>{option.label}@@ -1534,7 +1534,7 @@ function SearchAutocomplete(props: Props) {return (<TsTextField{...params}- style={{ overflow: 'auto', maxHeight: 40 }}+ sx={{ overflow: 'auto', maxHeight: '40px' }}onBlur={() => {isOpen.current = false;forceUpdate();@@ -1554,9 +1554,9 @@ function SearchAutocomplete(props: Props) {tooltip={isIndexing ? t('searchDisabledWhileIndexing') : ''}id="searchButton"disabled={isIndexing !== undefined}- style={{- marginRight: 10,- marginLeft: 10,+ sx={{+ marginRight: '10px',+ marginLeft: '10px',}}onClick={clickSearchButton}>diff --git a/src/renderer/components/SearchBox.tsx b/src/renderer/components/SearchBox.tsxindex dfdfba8f7..5096da2e9 100644--- a/src/renderer/components/SearchBox.tsx+++ b/src/renderer/components/SearchBox.tsx@@ -46,9 +46,9 @@ function SearchBox(props: Props) {}}slotProps={{paper: {- style: {+ sx: {overflow: 'hidden',- height: 720,+ height: '720px',// background: alpha(theme.palette.background.default, 0.95),// backdropFilter: 'blur(5px)',},diff --git a/src/renderer/components/SearchPopover.tsx b/src/renderer/components/SearchPopover.tsxindex d5a3cd4cf..ae9621480 100644--- a/src/renderer/components/SearchPopover.tsx+++ b/src/renderer/components/SearchPopover.tsx@@ -100,17 +100,17 @@ function SearchPopover(props: Props) {}><div style={{ display: 'flex' }}>- <Typography variant="button" style={{ margin: '12px 0 10px 10px' }}>+ <Typography variant="button" sx={{ margin: '12px 0 10px 10px' }}>{t('core:advancedSearch')}</Typography><Typographyvariant="caption"- style={{ flex: 1, margin: 'auto', paddingLeft: 10 }}+ sx={{ flex: 1, margin: 'auto', paddingLeft: '10px' }}>{indexStatus}</Typography><TsIconButton- style={{ marginLeft: 'auto', height: 40 }}+ sx={{ marginLeft: 'auto', height: '40px' }}data-tid="closeSearchTID"onClick={onClose}>@@ -143,9 +143,9 @@ function SearchPopover(props: Props) {<TooltipTS title={t('storedSearchQueriesTooltip')}><FormControlvariant="outlined"- style={{ width: '100%', marginTop: 6 }}+ sx={{ width: '100%', marginTop: '6px' }}>- <FormHelperText style={{ marginLeft: 0 }}>+ <FormHelperText sx={{ marginLeft: 0 }}>{t('core:savedSearchesTitle')}</FormHelperText><TsSelect@@ -154,7 +154,7 @@ function SearchPopover(props: Props) {onChange={handleSavedSearchChange}value={tempSearchQuery.uuid ? tempSearchQuery.uuid : -1}>- <MenuItem value={-1} style={{ display: 'none' }} />+ <MenuItem value={-1} sx={{ display: 'none' }} />{searches.length < 1 && (<MenuItem>{t('noSavedSearches')}</MenuItem>)}@@ -172,7 +172,7 @@ function SearchPopover(props: Props) {style={{ display: 'flex', alignSelf: 'center', paddingTop: 25 }}><ButtonGroup- style={{+ sx={{textAlign: 'center',width: '100%',}}@@ -221,7 +221,7 @@ function SearchPopover(props: Props) {{t('resetBtn')}</TsButton><TsButton- style={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}+ sx={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}variant="contained"disabled={isIndexing !== undefined}id="searchButtonAdvTID"diff --git a/src/renderer/components/SidePanelTitle.tsx b/src/renderer/components/SidePanelTitle.tsxindex 49b80f79f..a3fc5f489 100644--- a/src/renderer/components/SidePanelTitle.tsx+++ b/src/renderer/components/SidePanelTitle.tsx@@ -39,12 +39,12 @@ function SidePanelTitle(props: TSButtonProps) {<TooltipTS title={tooltip}><Typographyvariant="subtitle1"- style={{+ sx={{textTransform: 'uppercase',fontSize: '0.9rem',flex: 1,- paddingLeft: 7,- paddingTop: 12,+ paddingLeft: '7px',+ paddingTop: '12px',}}>{title}diff --git a/src/renderer/components/TsDatePicker.tsx b/src/renderer/components/TsDatePicker.tsxindex de17dd49a..9bbf59212 100644--- a/src/renderer/components/TsDatePicker.tsx+++ b/src/renderer/components/TsDatePicker.tsx@@ -32,7 +32,7 @@ function TsDatePicker(props) {return (<Box>{label && (- <FormHelperText style={{ marginLeft: 5, marginTop: 0 }}>+ <FormHelperText sx={{ marginLeft: '5px', marginTop: 0 }}>{label}</FormHelperText>)}diff --git a/src/renderer/components/TsToolbarButton.tsx b/src/renderer/components/TsToolbarButton.tsxindex 0f39252b9..d65e9ee9c 100644--- a/src/renderer/components/TsToolbarButton.tsx+++ b/src/renderer/components/TsToolbarButton.tsx@@ -38,7 +38,7 @@ function TsToolbarButton(props: TSIconButtonProps) {tooltip,title = '',disabled,- style,+ sx: style,// showTitle = false,...restProps} = props;@@ -49,7 +49,11 @@ function TsToolbarButton(props: TSIconButtonProps) {<IconButtonsize={desktopMode ? 'medium' : 'large'}disabled={disabled}- style={{+ sx={{+ '& .MuiSvgIcon-root ': {+ width: showTitle ? '0.9em' : '1em',+ heigh: showTitle ? '0.9em' : '1em',+ },borderRadius: AppConfig.defaultCSSRadius,padding: '8px',paddingLeft: '6px',@@ -57,12 +61,6 @@ function TsToolbarButton(props: TSIconButtonProps) {display: 'block',...style,}}- sx={{- '& .MuiSvgIcon-root ': {- width: showTitle ? '0.9em' : '1em',- heigh: showTitle ? '0.9em' : '1em',- },- }}{...restProps}>{children}diff --git a/src/renderer/components/WelcomePanel.tsx b/src/renderer/components/WelcomePanel.tsxindex 37d8e8fd5..d618259b9 100644--- a/src/renderer/components/WelcomePanel.tsx+++ b/src/renderer/components/WelcomePanel.tsx@@ -165,10 +165,10 @@ function WelcomePanel() {<Listdensearia-label="useful links in the welcome page"- style={{+ sx={{height: 'calc(100% - 70px)',- marginTop: 45,- marginBottom: 15,+ marginTop: '45px',+ marginBottom: '15px',overflowY: 'auto',overflowX: 'hidden',backgroundColor: theme.palette.background.default,diff --git a/src/renderer/components/ZoomComponent.tsx b/src/renderer/components/ZoomComponent.tsxindex 6f4e57b10..e813a8863 100644--- a/src/renderer/components/ZoomComponent.tsx+++ b/src/renderer/components/ZoomComponent.tsx@@ -100,11 +100,11 @@ export default function ZoomComponent(props: Props) {</TsToolbarButton><Typographyvariant="overline"- style={{+ sx={{color: theme.palette.text.primary,- margin: 3,- marginTop: 5,- fontSize: 11,+ margin: '3px',+ marginTop: '5px',+ fontSize: '11px',}}>{entrySizePercent}diff --git a/src/renderer/components/dialogs/AboutDialog.tsx b/src/renderer/components/dialogs/AboutDialog.tsxindex 60bbb9ce4..2a9f2578d 100644--- a/src/renderer/components/dialogs/AboutDialog.tsx+++ b/src/renderer/components/dialogs/AboutDialog.tsx@@ -130,7 +130,7 @@ function AboutDialog(props: Props) {onClose={onClose}closeButtonTestId="closeAboutDialogTID"/>- <DialogContent style={{ overflowY: 'auto' }}>+ <DialogContent sx={{ overflowY: 'auto' }}><imgalt="TagSpaces logo"src={LogoIcon}@@ -161,7 +161,7 @@ function AboutDialog(props: Props) {is made possible by the TagSpaces project and other open sourcesoftware listed in the:<TsButton- style={{ marginTop: 5 }}+ sx={{ marginTop: '5px' }}onClick={() => openThirdPartyLibsDialog()}>Software Acknowledgements@@ -183,7 +183,7 @@ function AboutDialog(props: Props) {<br />{imprintURL && (<TsButton- style={{ marginRight: AppConfig.defaultSpaceBetweenButtons }}+ sx={{ marginRight: AppConfig.defaultSpaceBetweenButtons }}variant="text"onClick={() => {openURLExternally(imprintURL, true);@@ -194,7 +194,7 @@ function AboutDialog(props: Props) {)}{privacyURL && (<TsButton- style={{ marginRight: AppConfig.defaultSpaceBetweenButtons }}+ sx={{ marginRight: AppConfig.defaultSpaceBetweenButtons }}variant="text"onClick={() => {openURLExternally(privacyURL, true);@@ -204,7 +204,7 @@ function AboutDialog(props: Props) {</TsButton>)}<TsButton- style={{ marginRight: AppConfig.defaultSpaceBetweenButtons }}+ sx={{ marginRight: AppConfig.defaultSpaceBetweenButtons }}variant="text"onClick={() => {openURLExternally(Links.links.changelogURL, true);@@ -213,7 +213,7 @@ function AboutDialog(props: Props) {Changelog</TsButton><TsButton- style={{ marginRight: AppConfig.defaultSpaceBetweenButtons }}+ sx={{ marginRight: AppConfig.defaultSpaceBetweenButtons }}variant="text"data-tid="openLicenseDialog"onClick={() => openLicenseDialog()}@@ -231,7 +231,7 @@ function AboutDialog(props: Props) {onClick={() => {openURLExternally(Links.links.productsOverview, true);}}- style={{ marginRight: AppConfig.defaultSpaceBetweenButtons }}+ sx={{ marginRight: AppConfig.defaultSpaceBetweenButtons }}>Upgrade to PRO</TsButton>diff --git a/src/renderer/components/dialogs/AddRemoveTagsDialog.tsx b/src/renderer/components/dialogs/AddRemoveTagsDialog.tsxindex d60e1808e..2396ccb40 100644--- a/src/renderer/components/dialogs/AddRemoveTagsDialog.tsx+++ b/src/renderer/components/dialogs/AddRemoveTagsDialog.tsx@@ -21,6 +21,7 @@ import TsButton from '-/components/TsButton';import TsDialogActions from '-/components/dialogs/components/TsDialogActions';import TsDialogTitle from '-/components/dialogs/components/TsDialogTitle';import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';+import { useSelectedEntriesContext } from '-/hooks/useSelectedEntriesContext';import { useTaggingActionsContext } from '-/hooks/useTaggingActionsContext';import { TS } from '-/tagspaces.namespace';import FolderIcon from '@mui/icons-material/FolderOpen';@@ -41,7 +42,6 @@ import {import { useReducer, useRef, useState } from 'react';import { useTranslation } from 'react-i18next';import TagsSelect from '../TagsSelect';-import { useSelectedEntriesContext } from '-/hooks/useSelectedEntriesContext';interface Props {open: boolean;@@ -168,10 +168,10 @@ function AddRemoveTagsDialog(props: Props) {tagMode="remove"autoFocus={true}/>- <Typography style={{ marginTop: 10 }} variant="subtitle2">+ <Typography sx={{ marginTop: '10px' }} variant="subtitle2">{t('selectedFilesAndFolders')}</Typography>- <List dense style={{ width: 550, marginLeft: -15 }}>+ <List dense sx={{ width: '550px', marginLeft: '-15px' }}>{currentEntries.length > 0 &¤tEntries.map((entry) => (<ListItem key={entry.path} title={entry.path}>diff --git a/src/renderer/components/dialogs/AddTagToTagGroupDialog.tsx b/src/renderer/components/dialogs/AddTagToTagGroupDialog.tsxindex 5278cce2d..16c0cd3ab 100644--- a/src/renderer/components/dialogs/AddTagToTagGroupDialog.tsx+++ b/src/renderer/components/dialogs/AddTagToTagGroupDialog.tsx@@ -78,7 +78,7 @@ function AddTagToTagGroupDialog(props: Props) {onClick={onConfirm}data-tid="createTagsConfirmButton"variant="contained"- style={+ sx={{WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }diff --git a/src/renderer/components/dialogs/ColorPickerDialog.tsx b/src/renderer/components/dialogs/ColorPickerDialog.tsxindex 291ce7d47..741b34412 100644--- a/src/renderer/components/dialogs/ColorPickerDialog.tsx+++ b/src/renderer/components/dialogs/ColorPickerDialog.tsx@@ -85,7 +85,7 @@ function ColorPickerDialog(props: Props) {variant="contained"onClick={onConfirm}data-tid="colorPickerConfirm"- style={+ sx={{WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }diff --git a/src/renderer/components/dialogs/ConfirmDialog.tsx b/src/renderer/components/dialogs/ConfirmDialog.tsxindex 657032a1b..966c42e9a 100644--- a/src/renderer/components/dialogs/ConfirmDialog.tsx+++ b/src/renderer/components/dialogs/ConfirmDialog.tsx@@ -83,7 +83,7 @@ function ConfirmDialog(props: Props) {scroll="paper"style={{ zIndex: 1301 }}>- <DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">+ <DialogTitle sx={{ cursor: 'move' }} id="draggable-dialog-title">{title}<DialogCloseButton testId="closeConfirmTID" onClose={onClose} /></DialogTitle>diff --git a/src/renderer/components/dialogs/CreateDirectoryDialog.tsx b/src/renderer/components/dialogs/CreateDirectoryDialog.tsxindex 5d0270eb8..a68812d04 100644--- a/src/renderer/components/dialogs/CreateDirectoryDialog.tsx+++ b/src/renderer/components/dialogs/CreateDirectoryDialog.tsx@@ -176,7 +176,7 @@ function CreateDirectoryDialog(props: Props) {data-tid="confirmCreateNewDirectory"id="confirmCreateNewDirectory"variant="contained"- style={+ sx={{WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }@@ -241,13 +241,13 @@ function CreateDirectoryDialog(props: Props) {label={t('backgroundColor')}retrieveValue={() => backgroundColor.current}value={' '}- style={{ marginTop: 0 }}+ sx={{ marginTop: 0 }}slotProps={{input: {readOnly: true,endAdornment: (- <InputAdornment position="end" style={{ height: 300 }}>- <Box style={{ padding: 10, width: 300 }}>+ <InputAdornment position="end" sx={{ height: '300px' }}>+ <Box sx={{ padding: '10px', width: '300px' }}>{defaultBackgrounds.map((background, cnt) => (<React.Fragment key={cnt}><TsIconButton@@ -258,10 +258,10 @@ function CreateDirectoryDialog(props: Props) {backgroundColor.current = background;forceUpdate();}}- style={{+ sx={{backgroundColor: background,backgroundImage: background,- margin: 5,+ margin: '5px',...(backgroundColor.current === background && {border: '0.5rem outset ' + background,}),diff --git a/src/renderer/components/dialogs/CreateTagsDialog.tsx b/src/renderer/components/dialogs/CreateTagsDialog.tsxindex 49450f97b..01959350c 100644--- a/src/renderer/components/dialogs/CreateTagsDialog.tsx+++ b/src/renderer/components/dialogs/CreateTagsDialog.tsx@@ -93,7 +93,7 @@ function CreateTagsDialog(props: Props) {onClick={onConfirm}data-tid="createTagsConfirmButton"variant="contained"- style={+ sx={{WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }diff --git a/src/renderer/components/dialogs/DialogCloseButton.tsx b/src/renderer/components/dialogs/DialogCloseButton.tsxindex 17fe2503c..5ad517187 100644--- a/src/renderer/components/dialogs/DialogCloseButton.tsx+++ b/src/renderer/components/dialogs/DialogCloseButton.tsx@@ -33,11 +33,11 @@ function DialogCloseButton(props: Props) {title={t('closeButtonDialog')}aria-label="close"tabIndex={-1}- style={{+ sx={{// float: 'right',position: 'absolute',- right: 15,- top: 15,+ right: '15px',+ top: '15px',}}data-tid={testId && testId}onClick={onClose}diff --git a/src/renderer/components/dialogs/DownloadUrlDialog.tsx b/src/renderer/components/dialogs/DownloadUrlDialog.tsxindex ffda571d9..8a525566d 100644--- a/src/renderer/components/dialogs/DownloadUrlDialog.tsx+++ b/src/renderer/components/dialogs/DownloadUrlDialog.tsx@@ -151,7 +151,7 @@ function DownloadUrlDialog(props: Props) {variant="contained"data-tid={'downloadFileUrlTID'}onClick={() => downloadURL()}- style={+ sx={{WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }diff --git a/src/renderer/components/dialogs/EditEntryTagDialog.tsx b/src/renderer/components/dialogs/EditEntryTagDialog.tsxindex 6990754ce..4b3d971a0 100644--- a/src/renderer/components/dialogs/EditEntryTagDialog.tsx+++ b/src/renderer/components/dialogs/EditEntryTagDialog.tsx@@ -216,7 +216,7 @@ function EditEntryTagDialog({ open, entries, tag, onClose }: Props) {</TsButton><TsButtondisabled={haveError() && !isTagChanged}- style={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}+ sx={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}onClick={onConfirm}data-tid="confirmEditTagEntryDialog"variant="contained"diff --git a/src/renderer/components/dialogs/EditTagDialog.tsx b/src/renderer/components/dialogs/EditTagDialog.tsxindex 5220fd741..ed30a8154 100644--- a/src/renderer/components/dialogs/EditTagDialog.tsx+++ b/src/renderer/components/dialogs/EditTagDialog.tsx@@ -120,7 +120,7 @@ function EditTagDialog(props: Props) {onClick={onConfirm}data-tid="editTagConfirm"variant="contained"- style={+ sx={{WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }@@ -157,7 +157,7 @@ function EditTagDialog(props: Props) {<FormControlfullWidth={true}error={inputError}- style={{ overflow: 'visible' }}+ sx={{ overflow: 'visible' }}>{props.selectedTag.modified_date && (<div@@ -202,16 +202,16 @@ function EditTagDialog(props: Props) {data-tid="editTagDescription"/></FormControl>- <ListItem style={{ paddingLeft: 0, paddingRight: 0 }}>+ <ListItem sx={{ paddingLeft: 0, paddingRight: 0 }}><ListItemText primary={t('core:tagBackgroundColor')} /><TransparentBackground><TsButtononClick={() => setDisplayColorPicker(!displayColorPicker)}data-tid="tagBackgroundColorEditTagDialog"- style={{- height: 30,- borderRadius: 2,- borderWidth: 1,+ sx={{+ height: '30px',+ borderRadius: '2px',+ borderWidth: '1px',borderStyle: 'solid',borderColor: 'gray',padding: '5px',@@ -231,16 +231,16 @@ function EditTagDialog(props: Props) {/>)}</ListItem>- <ListItem style={{ paddingLeft: 0, paddingRight: 0 }}>+ <ListItem sx={{ paddingLeft: 0, paddingRight: 0 }}><ListItemText primary={t('core:tagForegroundColor')} /><TransparentBackground><TsButtononClick={() => setDisplayTextColorPicker(!displayTextColorPicker)}data-tid="tagForegroundColorEditTagDialog"- style={{- height: 30,- borderRadius: 2,- borderWidth: 1,+ sx={{+ height: '30px',+ borderRadius: '2px',+ borderWidth: '1px',borderStyle: 'solid',borderColor: 'gray',padding: '5px',@@ -260,7 +260,7 @@ function EditTagDialog(props: Props) {/>)}</ListItem>- <ListItem style={{ paddingLeft: 0, paddingRight: 0 }}>+ <ListItem sx={{ paddingLeft: 0, paddingRight: 0 }}><ListItemText primary={t('core:tagPreview')} /><Tag backgroundColor={color} textColor={textcolor} isDragging={false}><span style={{ textTransform: 'lowercase' }}>diff --git a/src/renderer/components/dialogs/FilePreviewDialog.tsx b/src/renderer/components/dialogs/FilePreviewDialog.tsxindex a57b80a31..1e8f8fe23 100644--- a/src/renderer/components/dialogs/FilePreviewDialog.tsx+++ b/src/renderer/components/dialogs/FilePreviewDialog.tsx@@ -47,7 +47,6 @@ function FilePreviewDialog(props: Props) {const { isEditMode } = useFilePropertiesContext();const theme = useTheme();const smallScreen = useMediaQuery(theme.breakpoints.down('md'));- // const supportedFileTypes = useSelector(getSupportedFileTypes);const currentTheme = useSelector(getCurrentTheme);const fileViewer: MutableRefObject<HTMLIFrameElement> =useRef<HTMLIFrameElement>(null);@@ -61,7 +60,6 @@ function FilePreviewDialog(props: Props) {...(fsEntry.uuid && { uuid: fsEntry.uuid }),path: fsEntry.path,isFile: fsEntry.isFile,- // editMode: false,}: undefined;@@ -77,7 +75,7 @@ function FilePreviewDialog(props: Props) {fileViewer.current &&fileViewer.current.contentWindow &&// @ts-ignore- fileViewer.current.contentWindow.setContent+ fileViewer?.current?.contentWindow?.setContent) {let fileDirectory = extractContainingDirectoryPath(openedFile.path);if (AppConfig.isWeb) {@@ -143,8 +141,10 @@ function FilePreviewDialog(props: Props) {fullScreen={smallScreen}aria-labelledby="draggable-dialog-title"PaperComponent={DraggablePaper}- PaperProps={{ sx: { width: '100%', height: '100%' } }}- slotProps={{ backdrop: { style: { backgroundColor: 'transparent' } } }}+ slotProps={{+ backdrop: { sx: { backgroundColor: 'transparent' } },+ paper: { sx: { width: '100%', height: '100%' } },+ }}><TsDialogTitledialogTitle="Preview"@@ -152,11 +152,9 @@ function FilePreviewDialog(props: Props) {onClose={onClose}/><DialogContent- style={{- marginLeft: 'auto',- marginRight: 'auto',+ sx={{overflowY: 'hidden',- padding: smallScreen ? '0' : 'inherited',+ padding: '10px',flexGrow: 1,}}data-tid="filePreviewTID"@@ -164,7 +162,7 @@ function FilePreviewDialog(props: Props) {<Typographyvariant="body2"gutterBottom- style={{ wordBreak: 'break-all', margin: 10 }}+ sx={{ wordBreak: 'break-all', marginLeft: '15px' }}>{fsEntry.path}</Typography>@@ -172,7 +170,6 @@ function FilePreviewDialog(props: Props) {key="FileViewPreviewID"fileViewer={fileViewer}fileViewerContainer={fileViewerContainer}- height={'90%'}handleMessage={handleMessage}/></DialogContent>diff --git a/src/renderer/components/dialogs/ImportMacTagDialog.tsx b/src/renderer/components/dialogs/ImportMacTagDialog.tsxindex 647731a83..bc358ba2e 100644--- a/src/renderer/components/dialogs/ImportMacTagDialog.tsx+++ b/src/renderer/components/dialogs/ImportMacTagDialog.tsx@@ -120,7 +120,7 @@ Do you want to continue?`)style={{ minHeight: 200 }}><DialogTitle- style={{ cursor: 'move', minHeight: 20 }}+ sx={{ cursor: 'move', minHeight: '20px' }}data-tid="ImportMacTagDialogTitle"id="draggable-dialog-title">diff --git a/src/renderer/components/dialogs/IsTruncatedConfirmDialog.tsx b/src/renderer/components/dialogs/IsTruncatedConfirmDialog.tsxindex 4ffda1ac8..c404a124c 100644--- a/src/renderer/components/dialogs/IsTruncatedConfirmDialog.tsx+++ b/src/renderer/components/dialogs/IsTruncatedConfirmDialog.tsx@@ -16,24 +16,24 @@**/-import React from 'react';+import AppConfig from '-/AppConfig';+import DraggablePaper from '-/components/DraggablePaper';+import InfoIcon from '-/components/InfoIcon';import TsButton from '-/components/TsButton';+import DialogCloseButton from '-/components/dialogs/DialogCloseButton';+import MaxLoopsSelect from '-/components/dialogs/MaxLoopsSelect';import TsDialogActions from '-/components/dialogs/components/TsDialogActions';+import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';+import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';+import Dialog from '@mui/material/Dialog';import DialogContent from '@mui/material/DialogContent';-import DialogTitle from '@mui/material/DialogTitle';import DialogContentText from '@mui/material/DialogContentText';-import DraggablePaper from '-/components/DraggablePaper';-import Dialog from '@mui/material/Dialog';-import { locationType } from '@tagspaces/tagspaces-common/misc';-import DialogCloseButton from '-/components/dialogs/DialogCloseButton';-import MaxLoopsSelect from '-/components/dialogs/MaxLoopsSelect';-import AppConfig from '-/AppConfig';-import Typography from '@mui/material/Typography';-import InfoIcon from '-/components/InfoIcon';+import DialogTitle from '@mui/material/DialogTitle';import FormControlLabel from '@mui/material/FormControlLabel';+import Typography from '@mui/material/Typography';+import { locationType } from '@tagspaces/tagspaces-common/misc';+import React from 'react';import { useTranslation } from 'react-i18next';-import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';-import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';interface Props {open: boolean;@@ -85,7 +85,7 @@ function IsTruncatedConfirmDialog(props: Props) {keepMountedscroll="paper">- <DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">+ <DialogTitle sx={{ cursor: 'move' }} id="draggable-dialog-title">{t('core:warningDirectoryIsTruncated')}<DialogCloseButton testId="closeIsTruncatedTID" onClose={onClose} /></DialogTitle>diff --git a/src/renderer/components/dialogs/KeyboardDialog.tsx b/src/renderer/components/dialogs/KeyboardDialog.tsxindex 89cd3df07..211bf9169 100644--- a/src/renderer/components/dialogs/KeyboardDialog.tsx+++ b/src/renderer/components/dialogs/KeyboardDialog.tsx@@ -79,7 +79,7 @@ function KeyboardDialog(props: Props) {data-tid="closeKeyboardDialog"onClick={onClose}variant="outlined"- style={+ sx={{WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }diff --git a/src/renderer/components/dialogs/LicenseDialog.tsx b/src/renderer/components/dialogs/LicenseDialog.tsxindex 02a843922..97fe7ccc9 100644--- a/src/renderer/components/dialogs/LicenseDialog.tsx+++ b/src/renderer/components/dialogs/LicenseDialog.tsx@@ -71,7 +71,7 @@ function LicenseDialog(props: Props) {// inputRef={ref => {// licenseElement = ref;// }}- style={{ overflow: 'auto' }}+ sx={{ overflow: 'auto' }}><pre style={{ whiteSpace: 'pre-wrap', userSelect: 'text' }}>{Pro ? Pro.EULAContent : LicenseContent}diff --git a/src/renderer/components/dialogs/MapTileServerDialog.tsx b/src/renderer/components/dialogs/MapTileServerDialog.tsxindex c4f8a3aa6..fa6f8908a 100644--- a/src/renderer/components/dialogs/MapTileServerDialog.tsx+++ b/src/renderer/components/dialogs/MapTileServerDialog.tsx@@ -130,7 +130,7 @@ function MapTileServerDialog(props: Props) {data-tid="tileServerUrlTID"/><FormHelperText- style={{ marginLeft: 0, marginTop: 0, marginBottom: 10 }}+ sx={{ marginLeft: 0, marginTop: 0, marginBottom: '10px' }}>{t('core:tileServerUrlHelp')}</FormHelperText>@@ -148,7 +148,7 @@ function MapTileServerDialog(props: Props) {data-tid="tileserverInfoTID"/></FormControl>- <ListItem style={{ paddingLeft: 0, paddingRight: 0 }}>+ <ListItem sx={{ paddingLeft: 0, paddingRight: 0 }}><ListItemText primary={t('core:serverIsDefaultHelp')} /><Switchdata-tid="serverIsDefaultTID"@@ -187,8 +187,8 @@ function MapTileServerDialog(props: Props) {>{props.tileServer.uuid && (<TsButton- style={{- marginLeft: 10,+ sx={{+ marginLeft: '10px',}}data-tid="deleteTileServerTID"onClick={() => {@@ -206,7 +206,7 @@ function MapTileServerDialog(props: Props) {<TsButtondata-tid="saveTileServerDialogTID"onClick={saveTileServer}- style={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}+ sx={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}variant="contained">{t('core:confirmSaveButton')}diff --git a/src/renderer/components/dialogs/MaxLoopsSelect.tsx b/src/renderer/components/dialogs/MaxLoopsSelect.tsxindex fe92e0633..7440e0dec 100644--- a/src/renderer/components/dialogs/MaxLoopsSelect.tsx+++ b/src/renderer/components/dialogs/MaxLoopsSelect.tsx@@ -16,9 +16,9 @@**/-import React from 'react';-import { MenuItem } from '@mui/material';import TsSelect from '-/components/TsSelect';+import { MenuItem } from '@mui/material';+import React from 'react';interface Props {maxLoops: number;changeMaxLoops: (event: React.ChangeEvent<HTMLInputElement>) => void;@@ -33,8 +33,8 @@ function MaxLoopsSelect(props: Props) {fullWidth={false}onChange={changeMaxLoops}value={maxLoops}- style={{- minWidth: 100,+ sx={{+ minWidth: '100px',}}><MenuItem value="1">diff --git a/src/renderer/components/dialogs/MoveCopyFilesDialog.tsx b/src/renderer/components/dialogs/MoveCopyFilesDialog.tsxindex 00b2db718..db49a63f2 100644--- a/src/renderer/components/dialogs/MoveCopyFilesDialog.tsx+++ b/src/renderer/components/dialogs/MoveCopyFilesDialog.tsx@@ -203,10 +203,10 @@ function MoveCopyFilesDialog(props: Props) {</Typography><Listdense- style={{+ sx={{overflowY: 'auto',- width: 550,- maxHeight: 200,+ width: '550px',+ maxHeight: '200px',}}>{currentEntries.length > 0 &&diff --git a/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsx b/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsxindex 5658da2f1..a13b6031e 100644--- a/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsx+++ b/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsx@@ -147,7 +147,7 @@ function MoveOrCopyFilesDialog(props: Props) {{t('core:moveCopyToPath') + ': ' + targetDir}</Typography><Typography variant="subtitle2">{t('selectedFiles')}</Typography>- <List dense style={{ width: 550, marginLeft: -15 }}>+ <List dense sx={{ width: '550px', marginLeft: '-15px' }}>{selectedFiles &&selectedFiles.length > 0 &&selectedFiles.map((file) => (diff --git a/src/renderer/components/dialogs/NewAudioDialog.tsx b/src/renderer/components/dialogs/NewAudioDialog.tsxindex 0e7d6920d..eb595789e 100644--- a/src/renderer/components/dialogs/NewAudioDialog.tsx+++ b/src/renderer/components/dialogs/NewAudioDialog.tsx@@ -69,9 +69,9 @@ function NewAudioDialog(props: Props) {}}/><DialogContent- style={{- minWidth: 200,- minHeight: 200,+ sx={{+ minWidth: '200px',+ minHeight: '200px',overflow: 'overlay',}}data-tid="keyboardShortCutsDialog"diff --git a/src/renderer/components/dialogs/NewFileDialog.tsx b/src/renderer/components/dialogs/NewFileDialog.tsxindex 097b89008..18d3dd8b8 100644--- a/src/renderer/components/dialogs/NewFileDialog.tsx+++ b/src/renderer/components/dialogs/NewFileDialog.tsx@@ -222,7 +222,7 @@ function NewFileDialog(props: Props) {createFile(fileType, targetDirectoryPath);}}disabled={haveError.current}- style={+ sx={{WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }diff --git a/src/renderer/components/dialogs/OpenLinkDialog.tsx b/src/renderer/components/dialogs/OpenLinkDialog.tsxindex 8c5db7b5d..ea7d813b3 100644--- a/src/renderer/components/dialogs/OpenLinkDialog.tsx+++ b/src/renderer/components/dialogs/OpenLinkDialog.tsx@@ -94,7 +94,7 @@ function OpenLinkDialog(props: Props) {onClick={onConfirm}data-tid="confirmOpenLink"variant="contained"- style={+ sx={{WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }diff --git a/src/renderer/components/dialogs/ProTeaserDialog.tsx b/src/renderer/components/dialogs/ProTeaserDialog.tsxindex 54ec28ffd..f3a66bc5f 100644--- a/src/renderer/components/dialogs/ProTeaserDialog.tsx+++ b/src/renderer/components/dialogs/ProTeaserDialog.tsx@@ -81,7 +81,7 @@ function Slide(props: SlideProps) {><Typographyvariant="h5"- style={{ textAlign: 'center', paddingBottom: 10 }}+ sx={{ textAlign: 'center', paddingBottom: '10px' }}>{title}</Typography>@@ -146,7 +146,7 @@ function Slide(props: SlideProps) {onClick={() => {openURLExternally(ctaURL, true);}}- style={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}+ sx={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}>{ctaTitle}</TsButton>diff --git a/src/renderer/components/dialogs/ProgressDialog.tsx b/src/renderer/components/dialogs/ProgressDialog.tsxindex e233c6223..6244e8f4c 100644--- a/src/renderer/components/dialogs/ProgressDialog.tsx+++ b/src/renderer/components/dialogs/ProgressDialog.tsx@@ -42,7 +42,7 @@ function ProgressDialog(props: Props) {style={{ minHeight: 200 }}><DialogTitle- style={{ cursor: 'move', minHeight: 20 }}+ sx={{ cursor: 'move', minHeight: '20px' }}data-tid="progressDialogTitle"id="draggable-dialog-title">diff --git a/src/renderer/components/dialogs/RenameEntryDialog.tsx b/src/renderer/components/dialogs/RenameEntryDialog.tsxindex a24688f98..f691b55c0 100644--- a/src/renderer/components/dialogs/RenameEntryDialog.tsx+++ b/src/renderer/components/dialogs/RenameEntryDialog.tsx@@ -155,7 +155,7 @@ function RenameEntryDialog(props: Props) {onClick={onConfirm}data-tid="confirmRenameEntry"variant="contained"- style={+ sx={{WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }diff --git a/src/renderer/components/dialogs/ResolveConflictDialog.tsx b/src/renderer/components/dialogs/ResolveConflictDialog.tsxindex f9acbbde0..aa7b30d37 100644--- a/src/renderer/components/dialogs/ResolveConflictDialog.tsx+++ b/src/renderer/components/dialogs/ResolveConflictDialog.tsx@@ -68,7 +68,7 @@ function ResolveConflictDialog(props: Props) {scroll="paper"aria-labelledby="draggable-dialog-title">- <DialogTitle style={{ cursor: 'move' }} id="draggable-dialog-title">+ <DialogTitle sx={{ cursor: 'move' }} id="draggable-dialog-title">{t('core:resolveConflictTitle')}<DialogCloseButton testId="closeResolveConflictTID" onClose={onClose} /></DialogTitle>diff --git a/src/renderer/components/dialogs/SaveSearchDialog.tsx b/src/renderer/components/dialogs/SaveSearchDialog.tsxindex 8fab88a33..13efc8f8a 100644--- a/src/renderer/components/dialogs/SaveSearchDialog.tsx+++ b/src/renderer/components/dialogs/SaveSearchDialog.tsx@@ -130,7 +130,7 @@ function SaveSearchDialog(props: Props) {onClick={onConfirm}data-tid="confirmSavedSearchTID"variant="contained"- style={+ sx={{WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }@@ -185,10 +185,7 @@ function SaveSearchDialog(props: Props) {retrieveValue={() => title.current}data-tid="savedSearchTID"/>- <FormHelperText- style={{ marginLeft: 0 }}- error={!!inputError.current}- >+ <FormHelperText sx={{ marginLeft: 0 }} error={!!inputError.current}>{!!inputError.current? inputError.current: t('core:savedSearchHelp')}@@ -209,7 +206,7 @@ function SaveSearchDialog(props: Props) {<TsButtondata-tid="closeSavedSearchTID"onClick={() => onClose()}- style={{+ sx={{marginRight: AppConfig.defaultSpaceBetweenButtons,}}>diff --git a/src/renderer/components/dialogs/SettingsDialog.tsx b/src/renderer/components/dialogs/SettingsDialog.tsxindex a534925b0..56e38c2e1 100644--- a/src/renderer/components/dialogs/SettingsDialog.tsx+++ b/src/renderer/components/dialogs/SettingsDialog.tsx@@ -15,7 +15,6 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.**/-import React from 'react';import {AIIcon,AdvancedSettingsIcon,@@ -46,7 +45,7 @@ import Tabs from '@mui/material/Tabs';import { useTheme } from '@mui/material/styles';import useMediaQuery from '@mui/material/useMediaQuery';import Links from 'assets/links';-import { useState } from 'react';+import React, { useState } from 'react';import { useTranslation } from 'react-i18next';export enum SettingsTab {@@ -87,7 +86,7 @@ function SettingsDialog(props: Props) {<TsButtononClick={() => openURLExternally(Links.documentationLinks.settings, true)}color="secondary"- style={+ sx={{WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }@@ -118,7 +117,7 @@ function SettingsDialog(props: Props) {><Tabvalue={SettingsTab.General}- style={{+ sx={{textTransform: 'unset',justifyContent: 'flex-start',}}@@ -129,7 +128,7 @@ function SettingsDialog(props: Props) {/><Tabvalue={SettingsTab.FileTypes}- style={{+ sx={{textTransform: 'unset',justifyContent: 'flex-start',}}@@ -140,7 +139,7 @@ function SettingsDialog(props: Props) {/><Tabvalue={SettingsTab.Templates}- style={{+ sx={{textTransform: 'unset',justifyContent: 'flex-start',}}@@ -155,7 +154,7 @@ function SettingsDialog(props: Props) {/><Tabvalue={SettingsTab.KeyBindings}- style={{+ sx={{textTransform: 'unset',justifyContent: 'flex-start',}}@@ -166,7 +165,7 @@ function SettingsDialog(props: Props) {/><Tabvalue={SettingsTab.Extensions}- style={{+ sx={{textTransform: 'unset',justifyContent: 'flex-start',}}@@ -177,7 +176,7 @@ function SettingsDialog(props: Props) {/><Tabvalue={SettingsTab.Advanced}- style={{+ sx={{textTransform: 'unset',justifyContent: 'flex-start',}}@@ -188,7 +187,7 @@ function SettingsDialog(props: Props) {/><Tabvalue={SettingsTab.AI}- style={{+ sx={{textTransform: 'unset',justifyContent: 'flex-start',}}diff --git a/src/renderer/components/dialogs/ThirdPartyLibsDialog.tsx b/src/renderer/components/dialogs/ThirdPartyLibsDialog.tsxindex 95b8d4a64..9ce3831e2 100644--- a/src/renderer/components/dialogs/ThirdPartyLibsDialog.tsx+++ b/src/renderer/components/dialogs/ThirdPartyLibsDialog.tsx@@ -40,7 +40,7 @@ function ThirdPartyLibsDialog(props: Props) {const smallScreen = useMediaQuery(theme.breakpoints.down('md'));const okButton = (<TsButton- style={+ sx={{WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }diff --git a/src/renderer/components/dialogs/components/CreateFile.tsx b/src/renderer/components/dialogs/components/CreateFile.tsxindex e9ada352f..b6402a51a 100644--- a/src/renderer/components/dialogs/components/CreateFile.tsx+++ b/src/renderer/components/dialogs/components/CreateFile.tsx@@ -225,7 +225,11 @@ function CreateFile(props: Props) {<Typographyvariant="body2"title={template.content}- style={{ maxHeight: 75, height: 75, overflowY: 'auto' }}+ sx={{+ maxHeight: '75px',+ height: '75px',+ overflowY: 'auto',+ }}>{template.description || template.content}</Typography>@@ -233,10 +237,10 @@ function CreateFile(props: Props) {<CardActions><TsButtonsize="small"- style={{- marginLeft: 10,- marginBottom: 10,- marginTop: -10,+ sx={{+ marginLeft: '10px',+ marginBottom: '10px',+ marginTop: '-10px',}}onClick={() => createFile(template.type, template)}data-tid={diff --git a/src/renderer/components/dialogs/components/LocalForm.tsx b/src/renderer/components/dialogs/components/LocalForm.tsxindex 7c3f9361c..ae1da85d9 100644--- a/src/renderer/components/dialogs/components/LocalForm.tsx+++ b/src/renderer/components/dialogs/components/LocalForm.tsx@@ -81,7 +81,7 @@ function LocalForm(props: Props) {autoCorrect: 'off',autoCapitalize: 'none',endAdornment: (- <InputAdornment position="end" style={{ height: 32 }}>+ <InputAdornment position="end" sx={{ height: '32px' }}><TsIconButton onClick={openDirectory}><FolderIcon /></TsIconButton>diff --git a/src/renderer/components/dialogs/components/ObjectStoreForm.tsx b/src/renderer/components/dialogs/components/ObjectStoreForm.tsxindex bcfed374a..7829e5c1f 100644--- a/src/renderer/components/dialogs/components/ObjectStoreForm.tsx+++ b/src/renderer/components/dialogs/components/ObjectStoreForm.tsx@@ -141,7 +141,7 @@ function ObjectStoreForm(props: Props) {/>{cloudErrorTextName && (<FormHelperText- style={{ marginLeft: 0, marginTop: 0, marginBottom: 10 }}+ sx={{ marginLeft: 0, marginTop: 0, marginBottom: '10px' }}>{t('core:invalidName')}</FormHelperText>@@ -171,7 +171,7 @@ function ObjectStoreForm(props: Props) {/>{cloudErrorTextPath && (<FormHelperText- style={{ marginLeft: 0, marginTop: 0, marginBottom: 10 }}+ sx={{ marginLeft: 0, marginTop: 0, marginBottom: '10px' }}>{t('core:invalidPath')}</FormHelperText>@@ -193,7 +193,7 @@ function ObjectStoreForm(props: Props) {/>{cloudErrorAccessKey && (<FormHelperText- style={{ marginLeft: 0, marginTop: 0, marginBottom: 10 }}+ sx={{ marginLeft: 0, marginTop: 0, marginBottom: '10px' }}>{t('core:invalidAccessKey')}</FormHelperText>diff --git a/src/renderer/components/dialogs/components/SettingsAdvanced.tsx b/src/renderer/components/dialogs/components/SettingsAdvanced.tsxindex 8baad8ff0..b248697f9 100644--- a/src/renderer/components/dialogs/components/SettingsAdvanced.tsx+++ b/src/renderer/components/dialogs/components/SettingsAdvanced.tsx@@ -120,7 +120,7 @@ function SettingsAdvanced(props: Props) {dispatch(SettingsActions.setHistory(key, value));return (- <List style={{ overflowX: 'hidden', overflowY: 'auto', height: '100%' }}>+ <List sx={{ overflowX: 'hidden', overflowY: 'auto', height: '100%' }}><ListItem><TsButtondata-tid="resetSettingsTID"@@ -146,13 +146,13 @@ function SettingsAdvanced(props: Props) {)}color="secondary"- style={{ marginLeft: -7 }}+ sx={{ marginLeft: '-7px' }}>{t('core:resetSettings')}</TsButton><TsButtondata-tid="reloadAppTID"- style={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}+ sx={{ marginLeft: AppConfig.defaultSpaceBetweenButtons }}onClick={() => {if (AppConfig.isElectron) {window.electronIO.ipcRenderer.sendMessage('reloadWindow');@@ -183,9 +183,9 @@ function SettingsAdvanced(props: Props) {</ListItem>{workSpaces && workSpaces.length > 0 && (<List- style={{- padding: 5,- paddingLeft: 10,+ sx={{+ padding: '5px',+ paddingLeft: '10px',backgroundColor: '#d3d3d34a',borderRadius: AppConfig.defaultCSSRadius,}}@@ -352,9 +352,9 @@ function SettingsAdvanced(props: Props) {</TsButton></ListItem><List- style={{- padding: 5,- paddingLeft: 10,+ sx={{+ padding: '5px',+ paddingLeft: '10px',backgroundColor: '#d3d3d34a',borderRadius: AppConfig.defaultCSSRadius,}}@@ -382,7 +382,7 @@ function SettingsAdvanced(props: Props) {<TooltipTS title={t('core:serverIsDefaultHelp')}><CheckIcondata-tid="tileServerDefaultIndication"- style={{ marginLeft: 10 }}+ sx={{ marginLeft: '10px' }}/></TooltipTS>)}diff --git a/src/renderer/components/dialogs/components/SettingsExtensions.tsx b/src/renderer/components/dialogs/components/SettingsExtensions.tsxindex 973348bd6..ecb301a61 100644--- a/src/renderer/components/dialogs/components/SettingsExtensions.tsx+++ b/src/renderer/components/dialogs/components/SettingsExtensions.tsx@@ -24,6 +24,7 @@ import { useFileUploadDialogContext } from '-/components/dialogs/hooks/useFileUpimport { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';import { useExtensionsContext } from '-/hooks/useExtensionsContext';import { useIOActionsContext } from '-/hooks/useIOActionsContext';+import { useNotificationContext } from '-/hooks/useNotificationContext';import { actions as AppActions, AppDispatch } from '-/reducers/app';import { actions as SettingsActions, isDevMode } from '-/reducers/settings';import { getUserDataDir, loadExtensions, unZip } from '-/services/utils-io';@@ -36,10 +37,9 @@ import List from '@mui/material/List';import ListItem from '@mui/material/ListItem';import Switch from '@mui/material/Switch';import Typography from '@mui/material/Typography';-import { ChangeEvent, useRef, useState } from 'react';+import { ChangeEvent, useRef } from 'react';import { useTranslation } from 'react-i18next';import { useDispatch, useSelector } from 'react-redux';-import { useNotificationContext } from '-/hooks/useNotificationContext';function SettingsExtensions() {const { t } = useTranslation();@@ -142,7 +142,7 @@ function SettingsExtensions() {aria-controls="internal-content"id="internal-header">- <Typography style={{ fontWeight: 'bold' }}>+ <Typography sx={{ fontWeight: 'bold' }}>{t('core:coreExtensions')}</Typography><InfoIcon tooltip="These are extensions which are packaged with the current version of the app" />@@ -167,7 +167,7 @@ function SettingsExtensions() {aria-controls="installed-content"id="installed-header">- <Typography style={{ fontWeight: 'bold' }}>+ <Typography sx={{ fontWeight: 'bold' }}>{t('core:thirdPartyExtensions')}</Typography><InfoIcon tooltip="Extensions manually installed on top of the current app installation" />diff --git a/src/renderer/components/dialogs/components/SettingsFileTypes.tsx b/src/renderer/components/dialogs/components/SettingsFileTypes.tsxindex 301f18fa6..528226308 100644--- a/src/renderer/components/dialogs/components/SettingsFileTypes.tsx+++ b/src/renderer/components/dialogs/components/SettingsFileTypes.tsx@@ -25,6 +25,7 @@ import TsSelect from '-/components/TsSelect';import TsTextField from '-/components/TsTextField';import ColorPickerDialog from '-/components/dialogs/ColorPickerDialog';import { useExtensionsContext } from '-/hooks/useExtensionsContext';+import { useNotificationContext } from '-/hooks/useNotificationContext';import { AppDispatch } from '-/reducers/app';import {actions as SettingsActions,@@ -54,7 +55,6 @@ import {TableVirtuoso,TableVirtuosoHandle,} from 'react-virtuoso';-import { useNotificationContext } from '-/hooks/useNotificationContext';function SettingsFileTypes() {const { t } = useTranslation();@@ -328,8 +328,8 @@ function SettingsFileTypes() {<TsTextFielddata-tid={'typeTID' + item.type}defaultValue={item.type}- style={{- width: 160,+ sx={{+ width: '160px',marginTop: 0,}}error={@@ -351,10 +351,10 @@ function SettingsFileTypes() {<TsButtontooltip={t('core:colorPickerDialogTitle')}data-tid="settingsFileTypes_openColorPicker_"- style={{+ sx={{border: '1px solid lightgray',backgroundColor: `${item.color}`,- minWidth: 40,+ minWidth: '40px',}}onClick={() => {openColorPicker(item);@@ -394,7 +394,7 @@ function SettingsFileTypes() {data-tid={'viewerTID' + item.type}error={isValidationInProgress.current && item.viewer === ''}value={item.viewer}- style={{ minWidth: 150, marginTop: 0 }}+ sx={{ minWidth: '150px', marginTop: 0 }}onChange={(event) => {const extension: TS.Extension = extensions.find((ext) => ext.extensionId === event.target.value,@@ -436,7 +436,7 @@ function SettingsFileTypes() {<FormControl fullWidth error={isValidationInProgress.current}><TsSelectvalue={item.editor}- style={{ minWidth: 150, marginTop: 0 }}+ sx={{ minWidth: '150px', marginTop: 0 }}onChange={(event) =>updateItems(item, 'editor', event.target.value)}@@ -467,20 +467,20 @@ function SettingsFileTypes() {return (<Paperdata-tid="settingsFileTypesTID"- style={{- height: 500,+ sx={{+ height: '500px',width: '100%',- minWidth: 350,+ minWidth: '350px',overflow: 'hidden',background: 'transparent',- paddingLeft: 10,+ paddingLeft: '10px',}}><TsButtondata-tid="addNewFileTypeTID"onClick={onAddFileType}color="secondary"- style={{+ sx={{marginTop: AppConfig.defaultSpaceBetweenButtons,marginBottom: AppConfig.defaultSpaceBetweenButtons,}}@@ -496,7 +496,7 @@ function SettingsFileTypes() {dispatch(SettingsActions.setSupportedFileTypes(supportedFileTypes));}}color="secondary"- style={{+ sx={{margin: AppConfig.defaultSpaceBetweenButtons,}}>diff --git a/src/renderer/components/dialogs/components/SettingsGeneral.tsx b/src/renderer/components/dialogs/components/SettingsGeneral.tsxindex 1c76fa4cb..afc2dd70b 100644--- a/src/renderer/components/dialogs/components/SettingsGeneral.tsx+++ b/src/renderer/components/dialogs/components/SettingsGeneral.tsx@@ -321,7 +321,7 @@ function SettingsGeneral() {<TsToggleButtonvalue={false}data-tid="settingsSetPersistTagsInFileName"- style={{+ sx={{borderTopRightRadius: 0,borderBottomRightRadius: 0,}}@@ -340,7 +340,7 @@ function SettingsGeneral() {<TsToggleButtonvalue={true}data-tid="settingsSetPersistTagsInSidecarFile"- style={{+ sx={{borderTopLeftRadius: 0,borderBottomLeftRadius: 0,}}@@ -376,7 +376,7 @@ function SettingsGeneral() {<TsToggleButtonvalue={false}data-tid="fileNameBeginningTagTID"- style={{+ sx={{borderTopRightRadius: 0,borderBottomRightRadius: 0,}}@@ -395,7 +395,7 @@ function SettingsGeneral() {<TsToggleButtonvalue={true}data-tid="fileNameEndTagTID"- style={{+ sx={{borderTopLeftRadius: 0,borderBottomLeftRadius: 0,}}@@ -548,7 +548,7 @@ function SettingsGeneral() {<TransparentBackground><TsButtondata-tid="settingsToggleDefaultTagBackgroundColor"- style={{+ sx={{backgroundColor: settings.tagBackgroundColor,border: '1px solid lightgray',}}@@ -568,7 +568,7 @@ function SettingsGeneral() {<TransparentBackground><TsButtondata-tid="settingsToggleDefaultTagForegroundColor"- style={{+ sx={{border: '1px solid lightgray',backgroundColor: settings.tagTextColor,}}@@ -626,7 +626,7 @@ function SettingsGeneral() {<ListItem><ListItemText primary={t('core:maxSearchResultChoose')} /><TsTextField- style={{ maxWidth: '100px' }}+ sx={{ maxWidth: '100px' }}type="number"data-tid="settingsMaxSearchResult"value={settings.maxSearchResult}@@ -757,7 +757,7 @@ function SettingsGeneral() {}/><TsTextField- style={{ maxWidth: '100px' }}+ sx={{ maxWidth: '100px' }}data-tid="prefixTagContainerTID"value={settings.prefixTagContainer}onChange={(event) => setPrefixTagContainer(event.target.value)}@@ -775,7 +775,7 @@ function SettingsGeneral() {slotProps={{input: { inputMode: 'numeric', min: 0 },}}- style={{ maxWidth: '92px' }}+ sx={{ maxWidth: '92px' }}data-tid="prefixTagContainerTID"value={maxCollectedTag}onChange={(event: React.ChangeEvent<HTMLInputElement>) =>@@ -946,7 +946,7 @@ function SettingsGeneral() {/></Box><List- style={{+ sx={{overflowX: 'hidden',overflowY: 'auto',height: 'calc( 100% - 80px )',diff --git a/src/renderer/components/dialogs/components/SettingsKeyBindings.tsx b/src/renderer/components/dialogs/components/SettingsKeyBindings.tsxindex efbd74b05..d146cb376 100644--- a/src/renderer/components/dialogs/components/SettingsKeyBindings.tsx+++ b/src/renderer/components/dialogs/components/SettingsKeyBindings.tsx@@ -27,6 +27,7 @@ import {} from '-/reducers/settings';import DefaultSettings from '-/reducers/settings-default';import { setGlobalShortcuts } from '-/services/utils-io';+import Box from '@mui/material/Box';import ListItem from '@mui/material/ListItem';import ListItemText from '@mui/material/ListItemText';import Switch from '@mui/material/Switch';@@ -51,15 +52,15 @@ function SettingsKeyBindings() {};return (- <div- style={{+ <Box+ sx={{overflowX: 'hidden',overflowY: 'auto',height: '100%',- marginLeft: 10,+ marginLeft: '10px',}}>- <Typography variant="body2" style={{ marginBottom: 10 }}>+ <Typography variant="body2" sx={{ marginBottom: '10px' }}>The following key names can be used for defining key bindings:{' '}<Typography variant="overline">ctrl, command, alt, option, shift, space, backspace, escape, enter,@@ -68,7 +69,7 @@ function SettingsKeyBindings() {plus letters and digits from your keyboard.</Typography>{AppConfig.isElectron && (- <ListItem style={{ paddingLeft: 0, paddingRight: 0 }}>+ <ListItem sx={{ paddingLeft: 0, paddingRight: 0 }}><ListItemTextprimary={<>@@ -91,7 +92,7 @@ function SettingsKeyBindings() {)[0];return (<TsTextField- style={{ marginTop: 0, marginBottom: 10 }}+ sx={{ marginTop: 0, marginBottom: '10px' }}key={keyBinding.name}autoComplete="off"onBlur={(event) =>@@ -106,7 +107,7 @@ function SettingsKeyBindings() {/>);})}- </div>+ </Box>);}diff --git a/src/renderer/components/dialogs/components/SettingsTemplates.tsx b/src/renderer/components/dialogs/components/SettingsTemplates.tsxindex f7f83ecef..86fe7c346 100644--- a/src/renderer/components/dialogs/components/SettingsTemplates.tsx+++ b/src/renderer/components/dialogs/components/SettingsTemplates.tsx@@ -156,7 +156,7 @@ function SettingsTemplates(props: Props) {<AccordionDetails><Typographyvariant="caption"- style={{ display: 'block', marginTop: -20, marginBottom: 10 }}+ sx={{ display: 'block', marginTop: '-20px', marginBottom: '10px' }}>Supported template variables in the template content are:{' '}<b>@@ -190,7 +190,7 @@ function SettingsTemplates(props: Props) {onClick={() => {saveTemplate();}}- style={{ marginBottom: 10 }}+ sx={{ marginBottom: '10px' }}startIcon={<CreateFileIcon />}>{t('addTemplate')}@@ -202,8 +202,8 @@ function SettingsTemplates(props: Props) {fileTemplatesContext.resetTemplates();forceUpdate();}}- style={{- marginBottom: 10,+ sx={{+ marginBottom: '10px',marginLeft: AppConfig.defaultSpaceBetweenButtons,}}startIcon={<ReloadIcon />}@@ -339,7 +339,7 @@ function SettingsTemplates(props: Props) {<TsToggleButtonvalue={false}data-tid="templateMdTypeTID"- style={{+ sx={{borderTopRightRadius: 0,borderBottomRightRadius: 0,}}@@ -353,7 +353,7 @@ function SettingsTemplates(props: Props) {<TsToggleButtonvalue={false}data-tid="templateTxtTypeTID"- style={{+ sx={{borderTopRightRadius: 0,borderBottomRightRadius: 0,borderTopLeftRadius: 0,@@ -369,7 +369,7 @@ function SettingsTemplates(props: Props) {<TsToggleButtonvalue={false}data-tid="templateTxtTypeTID"- style={{+ sx={{borderTopLeftRadius: 0,borderBottomLeftRadius: 0,}}diff --git a/src/renderer/components/dialogs/components/TargetPath.tsx b/src/renderer/components/dialogs/components/TargetPath.tsxindex 2aa96bc07..6a4f5f9c6 100644--- a/src/renderer/components/dialogs/components/TargetPath.tsx+++ b/src/renderer/components/dialogs/components/TargetPath.tsx@@ -31,13 +31,13 @@ function TargetPath() {const currentLocation = findLocation();return (- <Grid container style={{ marginTop: 20 }}>+ <Grid container style={{ marginTop: '20px' }}>{targetDirectoryPath ? (<Typography- style={{ display: 'flex', alignItems: 'center' }}+ sx={{ display: 'flex', alignItems: 'center' }}variant="caption">- <InfoIcon style={{ paddingRight: 10 }} />+ <InfoIcon sx={{ paddingRight: '10px' }} />{t('core:entriesWillBeCreatedIn') +' ' +(currentLocation?.type === locationType.TYPE_CLOUDdiff --git a/src/renderer/components/menus/MenuKeyBinding.tsx b/src/renderer/components/menus/MenuKeyBinding.tsxindex 53c56c826..8de9f5f5f 100644--- a/src/renderer/components/menus/MenuKeyBinding.tsx+++ b/src/renderer/components/menus/MenuKeyBinding.tsx@@ -29,7 +29,7 @@ function MenuKeyBinding(props: Props) {<Typographyvariant="body2"color="text.secondary"- style={{ textTransform: 'uppercase' }}+ sx={{ textTransform: 'uppercase' }}>{adjustKeyBinding(keyBinding)}</Typography>diff --git a/src/renderer/containers/PageNotification.tsx b/src/renderer/containers/PageNotification.tsxindex 9f145f25d..c6d6c5d60 100644--- a/src/renderer/containers/PageNotification.tsx+++ b/src/renderer/containers/PageNotification.tsx@@ -19,6 +19,7 @@import AppConfig from '-/AppConfig';import TsButton from '-/components/TsButton';import TsIconButton from '-/components/TsIconButton';+import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';import { useLocationIndexContext } from '-/hooks/useLocationIndexContext';import { useNotificationContext } from '-/hooks/useNotificationContext';import { getLastPublishedVersion } from '-/reducers/settings';@@ -27,7 +28,6 @@ import CloseIcon from '@mui/icons-material/Close';import Snackbar from '@mui/material/Snackbar';import { styled } from '@mui/material/styles';import Links from 'assets/links';-import React from 'react';import { useTranslation } from 'react-i18next';import { useDispatch, useSelector } from 'react-redux';import { Pro } from '../pro';@@ -36,7 +36,6 @@ import {AppDispatch,isUpdateAvailable,} from '../reducers/app';-import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';const TSNotification = styled(Snackbar)(({ theme }) => {return {@@ -148,7 +147,7 @@ function PageNotification() {key="changelogButton"color="secondary"onClick={openChangelogPage}- style={{+ sx={{marginLeft: AppConfig.defaultSpaceBetweenButtons,}}>@@ -156,7 +155,7 @@ function PageNotification() {</TsButton>,<TsButtonkey="latestVersionButton"- style={{+ sx={{marginLeft: AppConfig.defaultSpaceBetweenButtons,}}onClick={getLatestVersion}diff --git a/src/renderer/perspectives/common/CellView.tsx b/src/renderer/perspectives/common/CellView.tsxindex 689a13cee..4c9d5d94a 100644--- a/src/renderer/perspectives/common/CellView.tsx+++ b/src/renderer/perspectives/common/CellView.tsx@@ -16,10 +16,6 @@**/-import React from 'react';-import { extractContainingDirectoryPath } from '@tagspaces/tagspaces-common/paths';-import { NativeTypes } from 'react-dnd-html5-backend';-import { useSelector } from 'react-redux';import AppConfig from '-/AppConfig';import CustomDragLayer from '-/components/CustomDragLayer';import DragItemTypes from '-/components/DragItemTypes';@@ -43,8 +39,13 @@ import { getEntryContainerTab } from '-/reducers/settings';import i18n from '-/services/i18n';import { TS } from '-/tagspaces.namespace';import DragHandleIcon from '@mui/icons-material/DragHandleOutlined';+import { Box } from '@mui/material';import Typography from '@mui/material/Typography';import { useTheme } from '@mui/material/styles';+import { extractContainingDirectoryPath } from '@tagspaces/tagspaces-common/paths';+import React from 'react';+import { NativeTypes } from 'react-dnd-html5-backend';+import { useSelector } from 'react-redux';interface Props {fsEntry: TS.FileSystemEntry;@@ -275,8 +276,8 @@ function CellView(props: Props) {AppConfig.isElectron &¤tLocation &&!currentLocation.haveObjectStoreSupport() && (- <div- style={{+ <Box+ sx={{display: 'flex',}}draggable="true"@@ -293,7 +294,7 @@ function CellView(props: Props) {>{i18n.t('dragOutsideApp')}</Typography>- </div>+ </Box>)}{cellContent(@@ -311,8 +312,8 @@ function CellView(props: Props) {const { FILE } = NativeTypes;return (- <div- style={{+ <Box+ sx={{position: 'relative',}}key={key}@@ -335,7 +336,7 @@ function CellView(props: Props) {)}</TargetMoveFileBox></TargetFileBox>- </div>+ </Box>);}diff --git a/src/renderer/perspectives/grid/components/GridSettingsDialog.tsx b/src/renderer/perspectives/grid/components/GridSettingsDialog.tsxindex 51abcfbc8..cd0727268 100644--- a/src/renderer/perspectives/grid/components/GridSettingsDialog.tsx+++ b/src/renderer/perspectives/grid/components/GridSettingsDialog.tsx@@ -114,7 +114,7 @@ function GridSettingsDialog(props: Props) {const helpButton = (<TsButton- style={+ sx={{WebkitAppRegion: 'no-drag',} as React.CSSProperties & { WebkitAppRegion?: string }@@ -145,7 +145,7 @@ function GridSettingsDialog(props: Props) {{haveLocalSetting() && (<><Typography- style={{ color: theme.palette.text.primary }}+ sx={{ color: theme.palette.text.primary }}variant="caption">{t('core:folderWithCustomPerspectiveSetting')}@@ -165,14 +165,14 @@ function GridSettingsDialog(props: Props) {)}<Box style={{ display: 'flex', marginTop: 8 }}><Typography- style={{ color: theme.palette.text.primary, alignSelf: 'center' }}+ sx={{ color: theme.palette.text.primary, alignSelf: 'center' }}variant="body1">{t('Size of the entries')}</Typography><ZoomComponent preview={true} /></Box>- <Divider style={{ marginTop: 8, marginBottom: 8 }} />+ <Divider sx={{ marginTop: '8px', marginBottom: '8px' }} /><FormGroup><FormControlLabel// labelPlacement="start"@@ -218,7 +218,7 @@ function GridSettingsDialog(props: Props) {}label={t('core:showHideEntriesDescription')}/>- <Divider style={{ marginTop: 8, marginBottom: 8 }} />+ <Divider sx={{ marginTop: '8px', marginBottom: '8px' }} /><FormControlLabelcontrol={<Switch@@ -248,7 +248,7 @@ function GridSettingsDialog(props: Props) {/>)}</FormGroup>- <Divider style={{ marginTop: 8, marginBottom: 8 }} />+ <Divider sx={{ marginTop: '8px', marginBottom: '8px' }} /><MenuItemdata-tid="gridPerspectiveToggleThumbnailsMode"title={t('core:toggleThumbnailModeTitle')}@@ -269,7 +269,7 @@ function GridSettingsDialog(props: Props) {</ListItemIcon><ListItemText primary={t('core:toggleThumbnailMode')} /></MenuItem>- <Divider style={{ marginTop: 8, marginBottom: 8 }} />+ <Divider sx={{ marginTop: '8px', marginBottom: '8px' }} /><MenuItemdata-tid="sortByMenuTID"title={t('core:sortBy')}@@ -379,7 +379,7 @@ function GridSettingsDialog(props: Props) {saveSettings(true);onClose();}}- style={{+ sx={{marginTop: AppConfig.defaultSpaceBetweenButtons,}}>@@ -392,7 +392,7 @@ function GridSettingsDialog(props: Props) {saveSettings(false);onClose();}}- style={{+ sx={{marginTop: AppConfig.defaultSpaceBetweenButtons,marginLeft: AppConfig.defaultSpaceBetweenButtons,}}diff --git a/src/renderer/perspectives/grid/components/MainContainer.tsx b/src/renderer/perspectives/grid/components/MainContainer.tsxindex 32b29ca23..667881d01 100644--- a/src/renderer/perspectives/grid/components/MainContainer.tsx+++ b/src/renderer/perspectives/grid/components/MainContainer.tsx@@ -26,11 +26,13 @@ import { TabNames } from '-/hooks/EntryPropsTabsContextProvider';import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';import { useIOActionsContext } from '-/hooks/useIOActionsContext';+import { useNotificationContext } from '-/hooks/useNotificationContext';import { useOpenedEntryContext } from '-/hooks/useOpenedEntryContext';import { usePerspectiveActionsContext } from '-/hooks/usePerspectiveActionsContext';import { usePerspectiveSettingsContext } from '-/hooks/usePerspectiveSettingsContext';import { useSelectedEntriesContext } from '-/hooks/useSelectedEntriesContext';import { fileOperationsEnabled } from '-/perspectives/common/main-container';+import { useReloadOnFocus } from '-/perspectives/common/useReloadOnFocus';import GridOptionsMenu from '-/perspectives/grid/components/GridOptionsMenu';import GridPagination from '-/perspectives/grid/components/GridPagination';import GridSettingsDialog from '-/perspectives/grid/components/GridSettingsDialog';@@ -43,13 +45,12 @@ import { getDesktopMode, getKeyBindingObject } from '-/reducers/settings';import { openURLExternally } from '-/services/utils-io';import { TS } from '-/tagspaces.namespace';import useFirstRender from '-/utils/useFirstRender';+import { Box } from '@mui/material';import Links from 'assets/links';-import React, { useCallback, useEffect, useRef, useState } from 'react';+import React, { useEffect, useRef, useState } from 'react';import { GlobalHotKeys } from 'react-hotkeys';import { useSelector } from 'react-redux';import GridCell from './GridCell';-import { useReloadOnFocus } from '-/perspectives/common/useReloadOnFocus';-import { useNotificationContext } from '-/hooks/useNotificationContext';interface Props {}@@ -321,9 +322,9 @@ function GridPerspective(props: Props) {};return (- <div- style={{- height: '100%', // 'calc(100% - 47px)'+ <Box+ sx={{+ height: '100%',}}data-tid="gridPerspectiveContainer">@@ -395,7 +396,7 @@ function GridPerspective(props: Props) {openSettings={openSettings}/>)}- </div>+ </Box>);}export default GridPerspective;diff --git a/src/renderer/perspectives/grid/components/MainToolbar.tsx b/src/renderer/perspectives/grid/components/MainToolbar.tsxindex 75de4ab20..1715b9ab4 100644--- a/src/renderer/perspectives/grid/components/MainToolbar.tsx+++ b/src/renderer/perspectives/grid/components/MainToolbar.tsx@@ -125,9 +125,9 @@ function MainToolbar(props: Props) {return (<Toolbar- style={{- paddingLeft: 5,- paddingRight: 5,+ sx={{+ paddingLeft: '5px',+ paddingRight: '5px',position: 'absolute',zIndex: 1,background: