TagSpaces is an offline, open source, document manager with tagging support
chore: improving mui styling
Ilian Sapundshiev911c4ecdd1dc
diff --git a/src/renderer/components/EditSearchQuery.tsx b/src/renderer/components/EditSearchQuery.tsxindex b06caf291..f816a48cc 100644--- a/src/renderer/components/EditSearchQuery.tsx+++ b/src/renderer/components/EditSearchQuery.tsx@@ -302,7 +302,7 @@ function EditSearchQuery(props: Props) {onChange={switchSearchType}size="small"exclusive- style={{ marginBottom: 0, alignSelf: 'center' }}+ sx={{ marginBottom: 0, alignSelf: 'center' }}value={tempSearchQuery.searchType}><TsToggleButton@@ -348,7 +348,7 @@ function EditSearchQuery(props: Props) {}}size="small"exclusive- style={{ marginBottom: 0, alignSelf: 'center' }}+ sx={{ marginBottom: 0, alignSelf: 'center' }}value={tempSearchQuery.forceIndexing}><TsToggleButtondiff --git a/src/renderer/components/dialogs/CreateTagsDialog.tsx b/src/renderer/components/dialogs/CreateTagsDialog.tsxindex 01959350c..eedc31289 100644--- a/src/renderer/components/dialogs/CreateTagsDialog.tsx+++ b/src/renderer/components/dialogs/CreateTagsDialog.tsx@@ -125,7 +125,7 @@ function CreateTagsDialog(props: Props) {onClose={onClose}actionSlot={okButton}/>- <DialogContent style={{ minWidth: 300, paddingTop: 10 }}>+ <DialogContent sx={{ minWidth: '300px', paddingTop: '10px' }}><FormControl fullWidth={true} error={inputError}><TsTextFielderror={inputError}diff --git a/src/renderer/components/dialogs/DownloadUrlDialog.tsx b/src/renderer/components/dialogs/DownloadUrlDialog.tsxindex 8a525566d..bb1e03a60 100644--- a/src/renderer/components/dialogs/DownloadUrlDialog.tsx+++ b/src/renderer/components/dialogs/DownloadUrlDialog.tsx@@ -179,9 +179,9 @@ function DownloadUrlDialog(props: Props) {actionSlot={okButton}/><DialogContent- style={{- minWidth: 200,- marginBottom: 20,+ sx={{+ minWidth: '200px',+ marginBottom: '20px',overflow: 'overlay',}}data-tid="downloadUrlDialogTID"diff --git a/src/renderer/components/dialogs/EditTagGroupDialog.tsx b/src/renderer/components/dialogs/EditTagGroupDialog.tsxindex f018598b6..34b3af4d7 100644--- a/src/renderer/components/dialogs/EditTagGroupDialog.tsx+++ b/src/renderer/components/dialogs/EditTagGroupDialog.tsx@@ -15,6 +15,7 @@* along with this program. If not, see <https://www.gnu.org/licenses/>.**/+import AppConfig from '-/AppConfig';import DraggablePaper from '-/components/DraggablePaper';import { ProLabel } from '-/components/HelperComponents';import InfoIcon from '-/components/InfoIcon';@@ -34,7 +35,7 @@ import { Pro } from '-/pro';import { getSaveTagInLocation } from '-/reducers/settings';import { TS } from '-/tagspaces.namespace';import { CommonLocation } from '-/utils/CommonLocation';-import { Paper, useMediaQuery, useTheme } from '@mui/material';+import { Box, Paper, useMediaQuery, useTheme } from '@mui/material';import Dialog from '@mui/material/Dialog';import DialogContent from '@mui/material/DialogContent';import FormControl from '@mui/material/FormControl';@@ -189,11 +190,11 @@ function EditTagGroupDialog(props: Props) {);const renderContent = (- <DialogContent style={{ overflowY: 'visible', overflowX: 'hidden' }}>+ <DialogContent sx={{ overflowY: 'visible', overflowX: 'hidden' }}><FormControlfullWidth={true}error={inputError}- style={{ overflow: 'visible' }}+ sx={{ overflow: 'visible' }}><TsTextFielderror={inputError}@@ -209,7 +210,7 @@ function EditTagGroupDialog(props: Props) {)}</FormControl>{saveTagInLocation && (- <ListItem style={{ paddingLeft: 0, paddingRight: 0 }}>+ <ListItem sx={{ paddingLeft: 0, paddingRight: 0 }}><TsSelectfullWidthdisabled={!Pro}@@ -241,7 +242,7 @@ function EditTagGroupDialog(props: Props) {</TsSelect></ListItem>)}- <ListItem style={{ paddingLeft: 0, paddingRight: 0 }}>+ <ListItem sx={{ paddingLeft: 0, paddingRight: 0 }}><WorkSpacesDropdowndisabled={!Pro}dataTid="taggroupWorkspaceTID"@@ -257,16 +258,16 @@ function EditTagGroupDialog(props: Props) {onOpenNewWorkspace={() => workSpacesContext.openNewWorkspaceDialog()}/></ListItem>- <ListItem style={{ paddingLeft: 0, paddingRight: 0 }}>+ <ListItem sx={{ paddingLeft: 0, paddingRight: 0 }}><ListItemText primary={t('tagBackgroundColor')} /><TransparentBackground><TsButtononClick={() => setDisplayColorPicker(!displayColorPicker)}data-tid="editTagGroupBackgroundColor"- style={{- height: 30,- borderRadius: 2,- borderWidth: 1,+ sx={{+ height: '30px',+ borderRadius: AppConfig.defaultCSSRadius,+ borderWidth: '1px',borderStyle: 'solid',borderColor: 'gray',padding: '5px',@@ -285,16 +286,16 @@ function EditTagGroupDialog(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="editTagGroupForegroundColor"- style={{- height: 30,- borderRadius: 2,- borderWidth: 1,+ sx={{+ height: '30px',+ borderRadius: AppConfig.defaultCSSRadius,+ borderWidth: '1px',borderStyle: 'solid',borderColor: 'gray',padding: '5px',@@ -314,16 +315,15 @@ function EditTagGroupDialog(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' }}>+ <Box sx={{ textTransform: 'lowercase', marginRight: '4px' }}>{t('core:tagPreview')}- </span>- <span style={{ margin: 3 }} />+ </Box></Tag></ListItem>- <ListItem style={{ paddingLeft: 0, paddingRight: 0 }}>+ <ListItem sx={{ paddingLeft: 0, paddingRight: 0 }}><ListItemText primary={t('core:colorChangesToAllTags')} /><Switchdata-tid="editTagGroupSwitch"diff --git a/src/renderer/components/dialogs/ImportMacTagDialog.tsx b/src/renderer/components/dialogs/ImportMacTagDialog.tsxindex bc358ba2e..86e8ffd6c 100644--- a/src/renderer/components/dialogs/ImportMacTagDialog.tsx+++ b/src/renderer/components/dialogs/ImportMacTagDialog.tsx@@ -117,7 +117,7 @@ Do you want to continue?`)PaperComponent={DraggablePaper}open={open}onClose={onClose}- style={{ minHeight: 200 }}+ sx={{ minHeight: '200px' }}><DialogTitlesx={{ cursor: 'move', minHeight: '20px' }}@@ -143,7 +143,7 @@ Do you want to continue?`)label={t('core:importTagsRecursive')}/></DialogContent>- <TsDialogActions style={{ justifyContent: 'space-between' }}>+ <TsDialogActions sx={{ justifyContent: 'space-between' }}><TsButtondata-tid="cancelImportTagsTID"onClick={() => {diff --git a/src/renderer/components/dialogs/KeyboardDialog.tsx b/src/renderer/components/dialogs/KeyboardDialog.tsxindex c5b690698..f2f791856 100644--- a/src/renderer/components/dialogs/KeyboardDialog.tsx+++ b/src/renderer/components/dialogs/KeyboardDialog.tsx@@ -91,8 +91,8 @@ function KeyboardDialog(props: Props) {/><DialogContentdata-tid="keyboardShortCutsDialog"- style={{- minWidth: 350,+ sx={{+ minWidth: '350px',overflow: 'auto',}}>@@ -119,7 +119,7 @@ function KeyboardDialog(props: Props) {</DialogContent>{!smallScreen && (<TsDialogActions- style={{+ sx={{justifyContent: 'space-between',}}>diff --git a/src/renderer/components/dialogs/LinkGeneratorDialog.tsx b/src/renderer/components/dialogs/LinkGeneratorDialog.tsxindex 642bcdbc0..bc9c46b1d 100644--- a/src/renderer/components/dialogs/LinkGeneratorDialog.tsx+++ b/src/renderer/components/dialogs/LinkGeneratorDialog.tsx@@ -91,7 +91,7 @@ function LinkGeneratorDialog(props: Props) {closeButtonTestId="closeLinkGeneratorTID"onClose={onClose}/>- <DialogContent style={{ overflow: 'auto', minHeight: 510 }}>+ <DialogContent sx={{ overflow: 'auto', minHeight: '510px' }}><TsSelectlabel={<>@@ -171,7 +171,7 @@ function LinkGeneratorDialog(props: Props) {/></DialogContent><TsDialogActions- style={{+ sx={{justifyContent: 'space-between',}}>diff --git a/src/renderer/components/dialogs/MapTileServerDialog.tsx b/src/renderer/components/dialogs/MapTileServerDialog.tsxindex fa6f8908a..3b1a228fe 100644--- a/src/renderer/components/dialogs/MapTileServerDialog.tsx+++ b/src/renderer/components/dialogs/MapTileServerDialog.tsx@@ -181,7 +181,7 @@ function MapTileServerDialog(props: Props) {/>{renderContent()}<TsDialogActions- style={{+ sx={{justifyContent: props.tileServer.uuid ? 'space-between' : 'flex-end',}}>diff --git a/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsx b/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsxindex a13b6031e..bdb781031 100644--- a/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsx+++ b/src/renderer/components/dialogs/MoveOrCopyFilesDialog.tsx@@ -138,7 +138,7 @@ function MoveOrCopyFilesDialog(props: Props) {onClose={onClose}/><DialogContent- style={{+ sx={{overflowX: 'hidden',overflowY: 'auto',}}diff --git a/src/renderer/components/dialogs/NewFileDialog.tsx b/src/renderer/components/dialogs/NewFileDialog.tsxindex 18d3dd8b8..b650e2478 100644--- a/src/renderer/components/dialogs/NewFileDialog.tsx+++ b/src/renderer/components/dialogs/NewFileDialog.tsx@@ -249,10 +249,9 @@ function NewFileDialog(props: Props) {actionSlot={okButton}></TsDialogTitle><DialogContent- style={{- paddingTop: 10,- minWidth: 200,- // minHeight: 200,+ sx={{+ paddingTop: '10px',+ minWidth: '200px',overflow: 'overlay',}}data-tid="newFileDialog"diff --git a/src/renderer/components/dialogs/OnboardingDialog.tsx b/src/renderer/components/dialogs/OnboardingDialog.tsxindex 3e9569e2a..cace8a857 100644--- a/src/renderer/components/dialogs/OnboardingDialog.tsx+++ b/src/renderer/components/dialogs/OnboardingDialog.tsx@@ -91,12 +91,12 @@ function OnboardingDialog(props: Props) {><TsDialogTitledialogTitle={''}- style={{ height: 25 }}+ sx={{ height: '25px' }}onClose={onClose}closeButtonTestId={'closeOnboardingDialog'}/><DialogContent- style={{+ sx={{overflowY: 'auto',overflowX: 'hidden',}}@@ -154,7 +154,7 @@ function OnboardingDialog(props: Props) {}}><TsToggleButton- style={{+ sx={{borderTopRightRadius: 0,borderBottomRightRadius: 0,}}@@ -163,7 +163,7 @@ function OnboardingDialog(props: Props) {{t('light')}</TsToggleButton><TsToggleButton- style={{+ sx={{borderTopLeftRadius: 0,borderBottomLeftRadius: 0,}}@@ -179,7 +179,7 @@ function OnboardingDialog(props: Props) {</Typography><Typography variant="h5"> </Typography><FormControl- style={{ marginTop: 20, marginBottom: 20 }}+ sx={{ marginTop: '20px', marginBottom: '20px' }}component="fieldset"><RadioGroup@@ -193,20 +193,20 @@ function OnboardingDialog(props: Props) {label={<Typographyvariant="subtitle1"- style={{ textAlign: 'left' }}+ sx={{ textAlign: 'left' }}>{t('obChooseTaggingFilename')}</Typography>}/><FormControlLabel- style={{ marginTop: 20 }}+ sx={{ marginTop: '20px' }}value="true"control={<Radio checked={isPersistTagsInSidecar} />}label={<Typographyvariant="subtitle1"- style={{ textAlign: 'left' }}+ sx={{ textAlign: 'left' }}>{t('obChooseTaggingSidecar')}</Typography>@@ -224,7 +224,7 @@ function OnboardingDialog(props: Props) {</Typography></SwiperSlide><SwiperSlide>- <Typography variant="h5" style={{ marginBottom: 20 }}>+ <Typography variant="h5" sx={{ marginBottom: '20px' }}>{t('obWebClipperTitle')}</Typography><Typography variant="body1">{t('obWebClipperMain')}</Typography>@@ -243,11 +243,11 @@ function OnboardingDialog(props: Props) {{t('obWebClipperClarification')}</Typography><TsButton- style={{- marginTop: 20,+ sx={{+ marginTop: '20px',marginLeft: 'auto',marginRight: 'auto',- marginBottom: 20,+ marginBottom: '20px',display: 'block',}}onClick={() => {@@ -258,7 +258,7 @@ function OnboardingDialog(props: Props) {</TsButton></SwiperSlide><SwiperSlide>- <Typography variant="h5" style={{ marginBottom: 20 }}>+ <Typography variant="h5" sx={{ marginBottom: '20px' }}>{t('obExplanationsTitle')}</Typography><Typography variant="body1">@@ -280,11 +280,11 @@ function OnboardingDialog(props: Props) {{t('obExplanationsMain2')}</Typography><TsButton- style={{- marginTop: 20,+ sx={{+ marginTop: '20px',marginLeft: 'auto',marginRight: 'auto',- marginBottom: 20,+ marginBottom: '20px',display: 'block',}}onClick={() => {@@ -311,11 +311,11 @@ function OnboardingDialog(props: Props) {{t('obFinalExplanation')}</Typography><TsButton- style={{- marginTop: 20,+ sx={{+ marginTop: '20px',marginLeft: 'auto',marginRight: 'auto',- marginBottom: 20,+ marginBottom: '20px',display: 'block',}}onClick={() => {diff --git a/src/renderer/perspectives/grid/components/SortingMenu.tsx b/src/renderer/perspectives/grid/components/SortingMenu.tsxindex e694f3bc2..0120f731f 100644--- a/src/renderer/perspectives/grid/components/SortingMenu.tsx+++ b/src/renderer/perspectives/grid/components/SortingMenu.tsx@@ -50,7 +50,7 @@ function SortingMenu(props: Props) {handleSortBy('byRelevance');}}>- <ListItemIcon style={{ minWidth: 25 }}>+ <ListItemIcon sx={{ minWidth: '25px' }}>{sortBy === 'byRelevance' &&(orderBy ? <ArrowDownIcon /> : <ArrowUpIcon />)}</ListItemIcon>@@ -63,7 +63,7 @@ function SortingMenu(props: Props) {handleSortBy('byName');}}>- <ListItemIcon style={{ minWidth: 25 }}>+ <ListItemIcon sx={{ minWidth: '25px' }}>{sortBy === 'byName' &&(orderBy ? <ArrowDownIcon /> : <ArrowUpIcon />)}</ListItemIcon>@@ -75,7 +75,7 @@ function SortingMenu(props: Props) {handleSortBy('byFileSize');}}>- <ListItemIcon style={{ minWidth: 25 }}>+ <ListItemIcon sx={{ minWidth: '25px' }}>{sortBy === 'byFileSize' &&(orderBy ? <ArrowDownIcon /> : <ArrowUpIcon />)}</ListItemIcon>@@ -87,7 +87,7 @@ function SortingMenu(props: Props) {handleSortBy('byDateModified');}}>- <ListItemIcon style={{ minWidth: 25 }}>+ <ListItemIcon sx={{ minWidth: '25px' }}>{sortBy === 'byDateModified' &&(orderBy ? <ArrowDownIcon /> : <ArrowUpIcon />)}</ListItemIcon>@@ -99,7 +99,7 @@ function SortingMenu(props: Props) {handleSortBy('byFirstTag');}}>- <ListItemIcon style={{ minWidth: 25 }}>+ <ListItemIcon sx={{ minWidth: '25px' }}>{sortBy === 'byFirstTag' &&(orderBy ? <ArrowDownIcon /> : <ArrowUpIcon />)}</ListItemIcon>@@ -111,7 +111,7 @@ function SortingMenu(props: Props) {handleSortBy('byExtension');}}>- <ListItemIcon style={{ minWidth: 25 }}>+ <ListItemIcon sx={{ minWidth: '25px' }}>{sortBy === 'byExtension' &&(orderBy ? <ArrowDownIcon /> : <ArrowUpIcon />)}</ListItemIcon>@@ -123,7 +123,7 @@ function SortingMenu(props: Props) {handleSortBy('random');}}>- <ListItemIcon style={{ minWidth: 25 }}>+ <ListItemIcon sx={{ minWidth: '25px' }}>{sortBy === 'random' && <ArrowDownIcon />}</ListItemIcon><ListItemText primary={t('core:random')} />