TagSpaces is an offline, open source, document manager with tagging support
chore: small ui adjustments
Ilian Sapundshiev78e884e5c8f3
diff --git a/src/renderer/components/EntryProperties.tsx b/src/renderer/components/EntryProperties.tsxindex ae08427f1..b745f3ee6 100644--- a/src/renderer/components/EntryProperties.tsx+++ b/src/renderer/components/EntryProperties.tsx@@ -24,12 +24,16 @@ import { ProTooltip } from '-/components/HelperComponents';import InfoIcon from '-/components/InfoIcon';import NoTileServer from '-/components/NoTileServer';import PerspectiveSelector from '-/components/PerspectiveSelector';+import TagDropContainer from '-/components/TagDropContainer';+import TagsSelect from '-/components/TagsSelect';import Tooltip from '-/components/Tooltip';+import TransparentBackground from '-/components/TransparentBackground';import TsButton from '-/components/TsButton';import TsIconButton from '-/components/TsIconButton';import TsTextField from '-/components/TsTextField';import ConfirmDialog from '-/components/dialogs/ConfirmDialog';import LinkGeneratorDialog from '-/components/dialogs/LinkGeneratorDialog';+import MoveCopyFilesDialog from '-/components/dialogs/MoveCopyFilesDialog';import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';import { useEditedEntryMetaContext } from '-/hooks/useEditedEntryMetaContext';import { useFilePropertiesContext } from '-/hooks/useFilePropertiesContext';@@ -57,7 +61,6 @@ import {FormControl,InputAdornment,Popover,- TextField,Typography,inputBaseClasses,} from '@mui/material';@@ -92,12 +95,8 @@ import {} from 'react-leaflet';import { useSelector } from 'react-redux';import { Pro } from '../pro';-import TagDropContainer from './TagDropContainer';-import TagsSelect from './TagsSelect';-import TransparentBackground from './TransparentBackground';-import MoveCopyFilesDialog from './dialogs/MoveCopyFilesDialog';-const ThumbnailTextField = styled(TextField)(({ theme }) => ({+const ThumbnailTextField = styled(TsTextField)(({ theme }) => ({[`& .${inputBaseClasses.root}`]: {height: 220,},@@ -842,7 +841,6 @@ function EntryProperties(props: Props) {/></Grid>)}-{!openedEntry.isFile && (<Grid size={12} style={{ marginTop: 5 }}><TsTextField@@ -950,76 +948,14 @@ function EntryProperties(props: Props) {/></Grid>)}- <Grid size={openedEntry.isFile ? 12 : 6}>- <FormHelperText>{t('core:thumbnail')}</FormHelperText>- <ThumbnailTextField- margin="dense"- variant="outlined"- style={{ marginTop: 0 }}- fullWidth- slotProps={{- input: {- readOnly: true,- startAdornment: (- <InputAdornment position="end">- <Stack- direction="column"- spacing={0}- style={{ alignItems: 'center' }}- >- {!readOnlyMode &&- !isEditMode &&- editName === undefined && (- <ProTooltip tooltip={t('changeThumbnail')}>- <TsButton- data-tid="changeThumbnailTID"- fullWidth- variant="text"- onClick={toggleThumbFilesDialog}- >- {t('core:change')}- </TsButton>- </ProTooltip>- )}- <div- role="button"- tabIndex={0}- style={{- backgroundSize: 'cover',- backgroundRepeat: 'no-repeat',- backgroundImage: thumbImage.current,- backgroundPosition: 'center',- borderRadius: 8,- minHeight: 150,- minWidth: 150,- marginBottom: 5,- }}- onClick={toggleThumbFilesDialog}- />- </Stack>- </InputAdornment>- ),- },- }}- />- </Grid>- {!openedEntry.isFile && (- <Grid size={6}>- <FormHelperText- style={{- marginLeft: AppConfig.defaultSpaceBetweenButtons,- }}- >- {t('core:backgroundImage')}- </FormHelperText>+ <Grid container spacing={1}>+ <Grid size={openedEntry.isFile ? 12 : 6}>+ <FormHelperText>{t('core:thumbnail')}</FormHelperText><ThumbnailTextFieldmargin="dense"- fullWidth- style={{- marginTop: 0,- marginLeft: AppConfig.defaultSpaceBetweenButtons,- }}variant="outlined"+ style={{ marginTop: 0 }}+ fullWidthslotProps={{input: {readOnly: true,@@ -1033,32 +969,31 @@ function EntryProperties(props: Props) {{!readOnlyMode &&!isEditMode &&editName === undefined && (- <ProTooltip tooltip={t('changeBackgroundImage')}>+ <ProTooltip tooltip={t('changeThumbnail')}><TsButton- data-tid="changeBackgroundImageTID"+ data-tid="changeThumbnailTID"fullWidthvariant="text"- onClick={toggleBgndImgDialog}+ onClick={toggleThumbFilesDialog}>{t('core:change')}</TsButton></ProTooltip>)}<div- data-tid="propsBgnImageTID"role="button"tabIndex={0}style={{backgroundSize: 'cover',backgroundRepeat: 'no-repeat',- backgroundImage: backgroundImage.current,+ backgroundImage: thumbImage.current,backgroundPosition: 'center',borderRadius: 8,minHeight: 150,minWidth: 150,marginBottom: 5,}}- onClick={toggleBgndImgDialog}+ onClick={toggleThumbFilesDialog}/></Stack></InputAdornment>@@ -1067,7 +1002,65 @@ function EntryProperties(props: Props) {}}/></Grid>- )}+ {!openedEntry.isFile && (+ <Grid size={6}>+ <FormHelperText>{t('core:backgroundImage')}</FormHelperText>+ <ThumbnailTextField+ margin="dense"+ fullWidth+ style={{+ marginTop: 0,+ }}+ variant="outlined"+ slotProps={{+ input: {+ readOnly: true,+ startAdornment: (+ <InputAdornment position="end">+ <Stack+ direction="column"+ spacing={0}+ style={{ alignItems: 'center' }}+ >+ {!readOnlyMode &&+ !isEditMode &&+ editName === undefined && (+ <ProTooltip tooltip={t('changeBackgroundImage')}>+ <TsButton+ data-tid="changeBackgroundImageTID"+ fullWidth+ variant="text"+ onClick={toggleBgndImgDialog}+ >+ {t('core:change')}+ </TsButton>+ </ProTooltip>+ )}+ <div+ data-tid="propsBgnImageTID"+ role="button"+ tabIndex={0}+ style={{+ backgroundSize: 'cover',+ backgroundRepeat: 'no-repeat',+ backgroundImage: backgroundImage.current,+ backgroundPosition: 'center',+ borderRadius: 8,+ minHeight: 150,+ minWidth: 150,+ marginBottom: 5,+ }}+ onClick={toggleBgndImgDialog}+ />+ </Stack>+ </InputAdornment>+ ),+ },+ }}+ />+ </Grid>+ )}+ </Grid><Grid size={12}><TsTextFielddata-tid="entryIDTID"diff --git a/src/renderer/components/dialogs/CreateEditLocationDialog.tsx b/src/renderer/components/dialogs/CreateEditLocationDialog.tsxindex 64c16b856..63bfffb6f 100644--- a/src/renderer/components/dialogs/CreateEditLocationDialog.tsx+++ b/src/renderer/components/dialogs/CreateEditLocationDialog.tsx@@ -685,7 +685,7 @@ function CreateEditLocationDialog(props: Props) {{content}<FormControlLabellabelPlacement="start"- style={{ justifyContent: 'space-between' }}+ style={{ justifyContent: 'space-between', marginLeft: 0 }}control={<Switchdata-tid="locationIsDefault"@@ -700,7 +700,7 @@ function CreateEditLocationDialog(props: Props) {/><FormControlLabellabelPlacement="start"- style={{ justifyContent: 'space-between' }}+ style={{ justifyContent: 'space-between', marginLeft: 0 }}control={<Switchdisabled={!Pro}@@ -749,7 +749,7 @@ function CreateEditLocationDialog(props: Props) {AppConfig.isCordova}labelPlacement="start"- style={{ justifyContent: 'space-between' }}+ style={{ justifyContent: 'space-between', marginLeft: 0 }}control={<Switchdata-tid="changeWatchForChanges"@@ -780,10 +780,10 @@ function CreateEditLocationDialog(props: Props) {<Typography>{t('core:switchAdvanced')}</Typography></AccordionSummary><AccordionDetails>- <FormGroup style={{ width: '100%' }}>+ <FormGroup><FormControlLabellabelPlacement="start"- style={{ justifyContent: 'space-between' }}+ style={{ justifyContent: 'space-between', marginLeft: 0 }}control={<Switchdisabled={!Pro}@@ -804,7 +804,7 @@ function CreateEditLocationDialog(props: Props) {/><FormControlLabellabelPlacement="start"- style={{ justifyContent: 'space-between' }}+ style={{ justifyContent: 'space-between', marginLeft: 0 }}control={<Switchdata-tid="locationSettingsGenThumbsTID"@@ -819,7 +819,7 @@ function CreateEditLocationDialog(props: Props) {/><FormControlLabellabelPlacement="start"- style={{ justifyContent: 'space-between' }}+ style={{ justifyContent: 'space-between', marginLeft: 0 }}control={<Switchdisabled={!Pro}@@ -840,7 +840,7 @@ function CreateEditLocationDialog(props: Props) {/><FormControlLabellabelPlacement="start"- style={{ justifyContent: 'space-between' }}+ style={{ justifyContent: 'space-between', marginLeft: 0 }}control={<TsTextFieldname="maxIndexAge"@@ -866,7 +866,7 @@ function CreateEditLocationDialog(props: Props) {{type === locationType.TYPE_CLOUD && (<FormControlLabellabelPlacement="start"- style={{ justifyContent: 'space-between' }}+ style={{ justifyContent: 'space-between', marginLeft: 0 }}control={<MaxLoopsSelectmaxLoops={maxLoops}@@ -884,7 +884,7 @@ function CreateEditLocationDialog(props: Props) {{AppConfig.useSidecarsForFileTaggingDisableSetting ? (<FormControlLabellabelPlacement="start"- style={{ justifyContent: 'space-between' }}+ style={{ justifyContent: 'space-between', marginLeft: 0 }}control={<TsButton disabled>{currentTagsSetting@@ -901,7 +901,11 @@ function CreateEditLocationDialog(props: Props) {) : (<FormControlLabellabelPlacement="top"- style={{ alignItems: 'start', marginBottom: 10 }}+ style={{+ alignItems: 'start',+ marginBottom: 10,+ marginLeft: 0,+ }}control={<ToggleButtonGroupvalue={persistTagsInSidecarFile}@@ -1004,7 +1008,12 @@ function CreateEditLocationDialog(props: Props) {<FormControlLabeldisabled={!Pro}labelPlacement="start"- style={{ justifyContent: 'space-between', marginTop: 15 }}+ style={{+ justifyContent: 'space-between',+ marginTop: 15,+ marginLeft: 0,+ marginRight: 0,+ }}control={<ProTooltip tooltip={t('ignorePatternDialogTitle')}><TsButton