TagSpaces is an offline, open source, document manager with tagging support
chore: making settings tab verticle on the desktop app
Ilian Sapundshievf682b6739cb7
diff --git a/src/renderer/components/dialogs/settings/SettingsAdvanced.tsx b/src/renderer/components/dialogs/settings/SettingsAdvanced.tsxindex 61e3a983e..6da91027c 100644--- a/src/renderer/components/dialogs/settings/SettingsAdvanced.tsx+++ b/src/renderer/components/dialogs/settings/SettingsAdvanced.tsx@@ -47,35 +47,8 @@ import { DeleteIcon } from '-/components/CommonIcons';import { ListItemIcon } from '@mui/material';import ConfirmDialog from '-/components/dialogs/ConfirmDialog';import { AppDispatch } from '-/reducers/app';-import { styled } from '@mui/material/styles';import { useTranslation } from 'react-i18next';-const PREFIX = 'SettingsGeneral';--const classes = {- root: `${PREFIX}-root`,- listItem: `${PREFIX}-listItem`,- pro: `${PREFIX}-pro`,- colorChooserButton: `${PREFIX}-colorChooserButton`,-};--const Root = styled('div')(({ theme }) => ({- [`& .${classes.root}`]: {- overflowX: 'hidden',- },- [`& .${classes.listItem}`]: {- paddingLeft: 0,- paddingRight: 0,- },- [`& .${classes.pro}`]: {- backgroundColor: '#1DD19F',- },- [`& .${classes.colorChooserButton}`]: {- minHeight: 30,- border: '1px solid lightgray',- },-}));-interface Props {showResetSettings: (showDialog: boolean) => void;}@@ -91,7 +64,6 @@ function SettingsAdvanced(props: Props) {const dispatch: AppDispatch = useDispatch();const settings = useSelector(getSettings);const tileServers: Array<TS.MapTileServer> = useSelector(getMapTileServers);- //const enableWS = useSelector(getEnableWS);const devMode = useSelector(isDevMode);const [tileServerDialog, setTileServerDialog] = useState<any>(undefined);const [confirmDialogKey, setConfirmDialogKey] = useState<null | string>(null);@@ -135,341 +107,337 @@ function SettingsAdvanced(props: Props) {dispatch(SettingsActions.setPrefixTagContainer(prefix));return (- <Root style={{ width: '100%' }}>- <List className={classes.root}>- <ListItem className={classes.listItem}>- <Button- data-tid="resetSettingsTID"- onClick={() => showResetSettings(true)}- color="secondary"- style={{ marginLeft: -7 }}- >- {t('core:resetSettings')}- </Button>- <Button- data-tid="reloadAppTID"- onClick={() => {- if (AppConfig.isElectron) {- window.electronIO.ipcRenderer.sendMessage('reloadWindow');- } else {- window.location.reload();+ <List style={{ overflowX: 'hidden', overflowY: 'auto', height: '100%' }}>+ <ListItem>+ <Button+ data-tid="resetSettingsTID"+ onClick={() => showResetSettings(true)}+ color="secondary"+ style={{ marginLeft: -7 }}+ >+ {t('core:resetSettings')}+ </Button>+ <Button+ data-tid="reloadAppTID"+ onClick={() => {+ if (AppConfig.isElectron) {+ window.electronIO.ipcRenderer.sendMessage('reloadWindow');+ } else {+ window.location.reload();+ }+ }}+ color="secondary"+ >+ {t('core:reloadApplication')}+ </Button>+ </ListItem>+ <ListItem>+ <ListItemText primary={t('enableMobileMode')} />+ <Switch+ data-tid="settingsSetDesktopMode"+ disabled={!(typeof window.ExtDisplayMode === 'undefined')}+ onClick={() => setDesktopMode(!settings.desktopMode)}+ checked={!settings.desktopMode}+ />+ </ListItem>+ <ListItem>+ <ListItemText primary={t('enableDevMode')} />+ <Switch+ data-tid="settingsEnableDevMode"+ disabled={window.ExtDevMode && window.ExtDevMode === true}+ onClick={() => setDevMode(!devMode)}+ checked={devMode}+ />+ </ListItem>+ <ListItem>+ <ListItemText primary={t('enableWS')} />+ <Switch+ data-tid="settingsEnableWS"+ disabled={!AppConfig.isElectron}+ onClick={() => setEnableWS(!settings.enableWS)}+ checked={settings.enableWS}+ />+ </ListItem>+ <ListItem>+ <ListItemText primary={t('warningOpeningFilesExternally')} />+ <Switch+ data-tid="warningOpeningFilesExternally"+ onClick={() =>+ setWarningOpeningFilesExternally(+ !settings.warningOpeningFilesExternally,+ )+ }+ checked={settings.warningOpeningFilesExternally}+ />+ </ListItem>+ <ListItem>+ <ListItemText primary={t('core:prefixTagContainer')} />+ <Input+ style={{ maxWidth: '100px' }}+ data-tid="prefixTagContainerTID"+ value={settings.prefixTagContainer}+ onChange={(event) => setPrefixTagContainer(event.target.value)}+ />+ </ListItem>+ {Pro && (+ <>+ <ListItem>+ <ListItemText primary={t('core:fileOpenHistory')} />+ <ListItemIcon>+ <Tooltip title={t('clearHistory')}>+ <IconButton+ aria-label={t('core:clearHistory')}+ onClick={() => setConfirmDialogKey(historyKeys.fileOpenKey)}+ data-tid="clearSearchTID"+ size="small"+ >+ <DeleteIcon />+ </IconButton>+ </Tooltip>+ </ListItemIcon>+ <Select+ data-tid="fileOpenTID"+ title={t('core:fileOpenHistoryTitle')}+ value={settings[historyKeys.fileOpenKey]}+ onChange={(event) =>+ setHistory(historyKeys.fileOpenKey, event.target.value)+ }+ input={<Input id="fileOpenSelector" />}+ >+ <MenuItem value={0}>{t('core:disabled')}</MenuItem>+ <MenuItem value={10}>10</MenuItem>+ <MenuItem value={50}>50</MenuItem>+ <MenuItem value={100}>100</MenuItem>+ </Select>+ </ListItem>+ <ListItem>+ <ListItemText primary={t('core:folderOpenHistory')} />+ <ListItemIcon>+ <Tooltip title={t('clearHistory')}>+ <IconButton+ aria-label={t('core:clearHistory')}+ onClick={() => setConfirmDialogKey(historyKeys.folderOpenKey)}+ data-tid="clearSearchTID"+ size="small"+ >+ <DeleteIcon />+ </IconButton>+ </Tooltip>+ </ListItemIcon>+ <Select+ data-tid="folderOpenTID"+ title={t('core:folderOpenHistoryTitle')}+ value={settings[historyKeys.folderOpenKey]}+ onChange={(event: any) =>+ setHistory(historyKeys.folderOpenKey, event.target.value)+ }+ input={<Input id="folderOpenSelector" />}+ >+ <MenuItem value={0}>{t('core:disabled')}</MenuItem>+ <MenuItem value={10}>10</MenuItem>+ <MenuItem value={50}>50</MenuItem>+ <MenuItem value={100}>100</MenuItem>+ </Select>+ </ListItem>+ <ListItem>+ <ListItemText primary={t('core:fileEditHistory')} />+ <ListItemIcon>+ <Tooltip title={t('clearHistory')}>+ <IconButton+ aria-label={t('core:clearHistory')}+ onClick={() => setConfirmDialogKey(historyKeys.fileEditKey)}+ data-tid="clearSearchTID"+ size="small"+ >+ <DeleteIcon />+ </IconButton>+ </Tooltip>+ </ListItemIcon>+ <Select+ data-tid="fileEditTID"+ title={t('core:fileEditHistoryTitle')}+ value={settings[historyKeys.fileEditKey]}+ onChange={(event: any) =>+ setHistory(historyKeys.fileEditKey, event.target.value)+ }+ input={<Input id="fileEditSelector" />}+ >+ <MenuItem value={0}>{t('core:disabled')}</MenuItem>+ <MenuItem value={10}>10</MenuItem>+ <MenuItem value={50}>50</MenuItem>+ <MenuItem value={100}>100</MenuItem>+ </Select>+ </ListItem>+ <ListItem>+ <ListItemText primary={t('core:searchHistory')} />+ <ListItemIcon>+ <Tooltip title={t('clearHistory')}>+ <IconButton+ aria-label={t('core:clearHistory')}+ onClick={() =>+ setConfirmDialogKey(historyKeys.searchHistoryKey)+ }+ data-tid="clearSearchTID"+ size="small"+ >+ <DeleteIcon />+ </IconButton>+ </Tooltip>+ </ListItemIcon>+ <Select+ data-tid="searchHistoryTID"+ title={t('core:searchHistoryTitle')}+ value={settings[historyKeys.searchHistoryKey]}+ onChange={(event: any) =>+ setHistory(historyKeys.searchHistoryKey, event.target.value)}+ input={<Input id="searchHistorySelector" />}+ >+ <MenuItem value={0}>{t('core:disabled')}</MenuItem>+ <MenuItem value={10}>10</MenuItem>+ <MenuItem value={50}>50</MenuItem>+ <MenuItem value={100}>100</MenuItem>+ </Select>+ </ListItem>+ <ConfirmDialog+ open={confirmDialogKey !== null}+ onClose={() => {+ setConfirmDialogKey(null);}}- color="secondary"- >- {t('core:reloadApplication')}- </Button>- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('enableMobileMode')} />- <Switch- data-tid="settingsSetDesktopMode"- disabled={!(typeof window.ExtDisplayMode === 'undefined')}- onClick={() => setDesktopMode(!settings.desktopMode)}- checked={!settings.desktopMode}- />- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('enableDevMode')} />- <Switch- data-tid="settingsEnableDevMode"- disabled={window.ExtDevMode && window.ExtDevMode === true}- onClick={() => setDevMode(!devMode)}- checked={devMode}- />- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('enableWS')} />- <Switch- data-tid="settingsEnableWS"- disabled={!AppConfig.isElectron}- onClick={() => setEnableWS(!settings.enableWS)}- checked={settings.enableWS}- />- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('warningOpeningFilesExternally')} />- <Switch- data-tid="warningOpeningFilesExternally"- onClick={() =>- setWarningOpeningFilesExternally(- !settings.warningOpeningFilesExternally,- )- }- checked={settings.warningOpeningFilesExternally}- />- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:prefixTagContainer')} />- <Input- style={{ maxWidth: '100px' }}- data-tid="prefixTagContainerTID"- value={settings.prefixTagContainer}- onChange={(event) => setPrefixTagContainer(event.target.value)}- />- </ListItem>- {Pro && (- <>- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:fileOpenHistory')} />- <ListItemIcon>- <Tooltip title={t('clearHistory')}>- <IconButton- aria-label={t('core:clearHistory')}- onClick={() => setConfirmDialogKey(historyKeys.fileOpenKey)}- data-tid="clearSearchTID"- size="small"- >- <DeleteIcon />- </IconButton>- </Tooltip>- </ListItemIcon>- <Select- data-tid="fileOpenTID"- title={t('core:fileOpenHistoryTitle')}- value={settings[historyKeys.fileOpenKey]}- onChange={(event) =>- setHistory(historyKeys.fileOpenKey, event.target.value)- }- input={<Input id="fileOpenSelector" />}- >- <MenuItem value={0}>{t('core:disabled')}</MenuItem>- <MenuItem value={10}>10</MenuItem>- <MenuItem value={50}>50</MenuItem>- <MenuItem value={100}>100</MenuItem>- </Select>- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:folderOpenHistory')} />- <ListItemIcon>- <Tooltip title={t('clearHistory')}>- <IconButton- aria-label={t('core:clearHistory')}- onClick={() =>- setConfirmDialogKey(historyKeys.folderOpenKey)- }- data-tid="clearSearchTID"- size="small"- >- <DeleteIcon />- </IconButton>- </Tooltip>- </ListItemIcon>- <Select- data-tid="folderOpenTID"- title={t('core:folderOpenHistoryTitle')}- value={settings[historyKeys.folderOpenKey]}- onChange={(event: any) =>- setHistory(historyKeys.folderOpenKey, event.target.value)- }- input={<Input id="folderOpenSelector" />}- >- <MenuItem value={0}>{t('core:disabled')}</MenuItem>- <MenuItem value={10}>10</MenuItem>- <MenuItem value={50}>50</MenuItem>- <MenuItem value={100}>100</MenuItem>- </Select>- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:fileEditHistory')} />- <ListItemIcon>- <Tooltip title={t('clearHistory')}>- <IconButton- aria-label={t('core:clearHistory')}- onClick={() => setConfirmDialogKey(historyKeys.fileEditKey)}- data-tid="clearSearchTID"- size="small"- >- <DeleteIcon />- </IconButton>- </Tooltip>- </ListItemIcon>- <Select- data-tid="fileEditTID"- title={t('core:fileEditHistoryTitle')}- value={settings[historyKeys.fileEditKey]}- onChange={(event: any) =>- setHistory(historyKeys.fileEditKey, event.target.value)- }- input={<Input id="fileEditSelector" />}- >- <MenuItem value={0}>{t('core:disabled')}</MenuItem>- <MenuItem value={10}>10</MenuItem>- <MenuItem value={50}>50</MenuItem>- <MenuItem value={100}>100</MenuItem>- </Select>- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:searchHistory')} />- <ListItemIcon>- <Tooltip title={t('clearHistory')}>- <IconButton- aria-label={t('core:clearHistory')}- onClick={() =>- setConfirmDialogKey(historyKeys.searchHistoryKey)- }- data-tid="clearSearchTID"- size="small"- >- <DeleteIcon />- </IconButton>- </Tooltip>- </ListItemIcon>- <Select- data-tid="searchHistoryTID"- title={t('core:searchHistoryTitle')}- value={settings[historyKeys.searchHistoryKey]}- onChange={(event: any) =>- setHistory(historyKeys.searchHistoryKey, event.target.value)- }- input={<Input id="searchHistorySelector" />}- >- <MenuItem value={0}>{t('core:disabled')}</MenuItem>- <MenuItem value={10}>10</MenuItem>- <MenuItem value={50}>50</MenuItem>- <MenuItem value={100}>100</MenuItem>- </Select>- </ListItem>- <ConfirmDialog- open={confirmDialogKey !== null}- onClose={() => {- setConfirmDialogKey(null);- }}- title="Confirm"- content={t('core:confirm' + confirmDialogKey + 'Deletion')}- confirmCallback={(result) => {- if (result) {- historyContext.delAllHistory(confirmDialogKey);- }- }}- cancelDialogTID={'cancelDelete' + confirmDialogKey + 'Dialog'}- confirmDialogTID={'confirmDelete' + confirmDialogKey + 'Dialog'}- confirmDialogContentTID={- 'confirmDelete' + confirmDialogKey + 'DialogContent'+ title="Confirm"+ content={t('core:confirm' + confirmDialogKey + 'Deletion')}+ confirmCallback={(result) => {+ if (result) {+ historyContext.delAllHistory(confirmDialogKey);}- />- </>- )}- <ListItem className={classes.listItem}>- <ListItemText- primary={- <>- {t('setRevisionsEnabled')}- <InfoIcon tooltip={t('core:setRevisionsEnabledHelp')} />- <ProLabel />- </>- }- />- <Switch- data-tid="setRevisionsEnabledTID"- disabled={!Pro}- onClick={() => setRevisionsEnabled(!settings.isRevisionsEnabled)}- checked={settings.isRevisionsEnabled}- />- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText- primary={- <>- {t('enableTagsFromLocation')}- <InfoIcon tooltip={t('core:enableTagsFromLocationHelp')} />- <ProLabel />- </>+ }}+ cancelDialogTID={'cancelDelete' + confirmDialogKey + 'Dialog'}+ confirmDialogTID={'confirmDelete' + confirmDialogKey + 'Dialog'}+ confirmDialogContentTID={+ 'confirmDelete' + confirmDialogKey + 'DialogContent'}/>- <Switch- data-tid="saveTagInLocationTID"- disabled={!Pro}- onClick={() => setSaveTagInLocation(!settings.saveTagInLocation)}- checked={settings.saveTagInLocation}- />- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:geoTaggingFormat')} />- <Select- disabled={geoTaggingFormatDisabled}- data-tid="geoTaggingFormatTID"- title={- geoTaggingFormatDisabled- ? t('core:settingExternallyConfigured')- : ''- }- value={- geoTaggingFormatDisabled- ? AppConfig.geoTaggingFormat- : settings.geoTaggingFormat- }- onChange={(event: any) => setGeoTaggingFormat(event.target.value)}- input={<Input id="geoTaggingFormatSelector" />}- >- {settings.supportedGeoTagging.map((geoTagging) => (- <MenuItem key={geoTagging} value={geoTagging}>- {geoTagging.toUpperCase()}- </MenuItem>- ))}- </Select>- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:tileServerTitle')} />- <ListItemSecondaryAction style={{ right: 0 }}>- <Button- color="primary"- onClick={(event) => handleEditTileServerClick(event, {}, true)}- >- {t('tileServerDialogAdd')}- </Button>- </ListItemSecondaryAction>- </ListItem>- <List- style={{- padding: 5,- paddingLeft: 10,- backgroundColor: '#d3d3d34a',- borderRadius: 10,- }}- dense+ </>+ )}+ <ListItem>+ <ListItemText+ primary={+ <>+ {t('setRevisionsEnabled')}+ <InfoIcon tooltip={t('core:setRevisionsEnabledHelp')} />+ <ProLabel />+ </>+ }+ />+ <Switch+ data-tid="setRevisionsEnabledTID"+ disabled={!Pro}+ onClick={() => setRevisionsEnabled(!settings.isRevisionsEnabled)}+ checked={settings.isRevisionsEnabled}+ />+ </ListItem>+ <ListItem>+ <ListItemText+ primary={+ <>+ {t('enableTagsFromLocation')}+ <InfoIcon tooltip={t('core:enableTagsFromLocationHelp')} />+ <ProLabel />+ </>+ }+ />+ <Switch+ data-tid="saveTagInLocationTID"+ disabled={!Pro}+ onClick={() => setSaveTagInLocation(!settings.saveTagInLocation)}+ checked={settings.saveTagInLocation}+ />+ </ListItem>+ <ListItem>+ <ListItemText primary={t('core:geoTaggingFormat')} />+ <Select+ disabled={geoTaggingFormatDisabled}+ data-tid="geoTaggingFormatTID"+ title={+ geoTaggingFormatDisabled+ ? t('core:settingExternallyConfigured')+ : ''+ }+ value={+ geoTaggingFormatDisabled+ ? AppConfig.geoTaggingFormat+ : settings.geoTaggingFormat+ }+ onChange={(event: any) => setGeoTaggingFormat(event.target.value)}+ input={<Input id="geoTaggingFormatSelector" />}>- {tileServers.length > 0 ? (- tileServers.map((tileServer, index) => (- <ListItem key={tileServer.uuid} className={classes.listItem}>- <ListItemText- primary={tileServer.name}- secondary={tileServer.serverURL}- style={{ maxWidth: 470 }}- />- <ListItemSecondaryAction>- {index === 0 && (- <Tooltip title={t('core:serverIsDefaultHelp')}>- <CheckIcon- data-tid="tileServerDefaultIndication"- style={{ marginLeft: 10 }}- />- </Tooltip>- )}- <IconButton- aria-label={t('core:options')}- aria-haspopup="true"- edge="end"- data-tid={'tileServerEdit_' + tileServer.name}- onClick={(event) =>- handleEditTileServerClick(event, tileServer, index === 0)- }- size="large"- >- <EditIcon />- </IconButton>- </ListItemSecondaryAction>- </ListItem>- ))- ) : (- <ListItem key="noTileServers" className={classes.listItem}>+ {settings.supportedGeoTagging.map((geoTagging) => (+ <MenuItem key={geoTagging} value={geoTagging}>+ {geoTagging.toUpperCase()}+ </MenuItem>+ ))}+ </Select>+ </ListItem>+ <ListItem>+ <ListItemText primary={t('core:tileServerTitle')} />+ <ListItemSecondaryAction style={{ right: 0 }}>+ <Button+ color="primary"+ onClick={(event) => handleEditTileServerClick(event, {}, true)}+ >+ {t('tileServerDialogAdd')}+ </Button>+ </ListItemSecondaryAction>+ </ListItem>+ <List+ style={{+ padding: 5,+ paddingLeft: 10,+ backgroundColor: '#d3d3d34a',+ borderRadius: 10,+ }}+ dense+ >+ {tileServers.length > 0 ? (+ tileServers.map((tileServer, index) => (+ <ListItem key={tileServer.uuid}><ListItemText- primary={t('core:noTileServersTitle')}- secondary={t('core:addTileServersHelp')}+ primary={tileServer.name}+ secondary={tileServer.serverURL}+ style={{ maxWidth: 470 }}/>+ <ListItemSecondaryAction>+ {index === 0 && (+ <Tooltip title={t('core:serverIsDefaultHelp')}>+ <CheckIcon+ data-tid="tileServerDefaultIndication"+ style={{ marginLeft: 10 }}+ />+ </Tooltip>+ )}+ <IconButton+ aria-label={t('core:options')}+ aria-haspopup="true"+ edge="end"+ data-tid={'tileServerEdit_' + tileServer.name}+ onClick={(event) =>+ handleEditTileServerClick(event, tileServer, index === 0)+ }+ size="large"+ >+ <EditIcon />+ </IconButton>+ </ListItemSecondaryAction></ListItem>- )}- </List>+ ))+ ) : (+ <ListItem key="noTileServers">+ <ListItemText+ primary={t('core:noTileServersTitle')}+ secondary={t('core:addTileServersHelp')}+ />+ </ListItem>+ )}</List>{tileServerDialog && (<MapTileServerDialog@@ -479,7 +447,7 @@ function SettingsAdvanced(props: Props) {isDefault={tileServerDialog.isDefault}/>)}- </Root>+ </List>);}diff --git a/src/renderer/components/dialogs/settings/SettingsDialog.tsx b/src/renderer/components/dialogs/settings/SettingsDialog.tsxindex 20c3382ec..41387ce8b 100644--- a/src/renderer/components/dialogs/settings/SettingsDialog.tsx+++ b/src/renderer/components/dialogs/settings/SettingsDialog.tsx@@ -22,16 +22,17 @@ import { useSelector } from 'react-redux';import Button from '@mui/material/Button';import useMediaQuery from '@mui/material/useMediaQuery';import { useTheme } from '@mui/material/styles';-import AppBar from '@mui/material/AppBar';import Tabs from '@mui/material/Tabs';import Tab from '@mui/material/Tab';+import Dialog from '@mui/material/Dialog';import DialogActions from '@mui/material/DialogActions';import DialogContent from '@mui/material/DialogContent';import DialogTitle from '@mui/material/DialogTitle';-import ConfirmDialog from '../ConfirmDialog';-import SettingsGeneral from '../settings/SettingsGeneral';-import SettingsKeyBindings from '../settings/SettingsKeyBindings';-import SettingsFileTypes from '../settings/SettingsFileTypes';+import { isDesktopMode } from '-/reducers/settings';+import ConfirmDialog from '-/components/dialogs/ConfirmDialog';+import SettingsGeneral from '-/components/dialogs/settings/SettingsGeneral';+import SettingsKeyBindings from '-/components/dialogs/settings/SettingsKeyBindings';+import SettingsFileTypes from '-/components/dialogs/settings/SettingsFileTypes';import { clearAllURLParams } from '-/utils/dom';import SettingsAdvanced from '-/components/dialogs/settings/SettingsAdvanced';import DialogCloseButton from '-/components/dialogs/DialogCloseButton';@@ -51,56 +52,110 @@ interface Props {function SettingsDialog(props: Props) {const { t } = useTranslation();const [currentTab, setCurrentTab] = useState<number>(0);+ const desktopMode = useSelector(isDesktopMode);const [isResetSettingsDialogOpened, setIsResetSettingsDialogOpened] =useState<boolean>(false);+ const { open, onClose } = props;+ const theme = useTheme();+ const fullScreen = useMediaQuery(theme.breakpoints.down('md'));const handleTabClick = (event, tab) => {setCurrentTab(tab);};const renderTitle = () => (- <>- <DialogTitle>- {t('core:settings')}- <DialogCloseButton testId="closeSettingsTID" onClose={onClose} />- </DialogTitle>- <AppBar position="static" color="default">- <Tabs- value={currentTab}- onChange={handleTabClick}- indicatorColor="primary"- scrollButtons="auto"- variant="scrollable"- >- <Tab data-tid="generalSettingsDialog" label={t('core:generalTab')} />- <Tab- data-tid="fileTypeSettingsDialog"- label={t('core:fileTypeTab')}- />- <Tab- data-tid="keyBindingsSettingsDialog"- label={t('core:keyBindingsTab')}- />- <Tab- data-tid="extensionsSettingsDialog"- label={t('core:extensionsTab')}- />- <Tab- data-tid="advancedSettingsDialogTID"- label={t('core:advancedSettingsTab')}- />- </Tabs>- </AppBar>- </>+ <DialogTitle>+ {t('core:settings')}+ <DialogCloseButton testId="closeSettingsTID" onClose={onClose} />+ </DialogTitle>);const renderContent = () => (<DialogContentstyle={{- overflowY: 'auto',+ overflowY: 'hidden',overflowX: 'hidden',+ display: fullScreen ? 'block' : 'flex',+ flexGrow: 1,}}>+ <Tabs+ value={currentTab}+ centered+ onChange={handleTabClick}+ indicatorColor="primary"+ scrollButtons="auto"+ variant={fullScreen ? 'scrollable' : 'standard'}+ orientation={fullScreen ? 'horizontal' : 'vertical'}+ style={{+ width: fullScreen ? '100%' : '150px',+ }}+ >+ <Tab+ style={{+ // textTransform: 'unset',+ alignItems: 'baseline',+ paddingLeft: 0,+ }}+ data-tid="generalSettingsDialog"+ label={t('core:generalTab')}+ />+ <Tab+ style={{+ // textTransform: 'unset',+ alignItems: 'baseline',+ paddingLeft: 0,+ }}+ data-tid="fileTypeSettingsDialog"+ label={t('core:fileTypeTab')}+ />+ <Tab+ style={{+ // textTransform: 'unset',+ alignItems: 'baseline',+ paddingLeft: 0,+ }}+ data-tid="keyBindingsSettingsDialog"+ label={t('core:keyBindingsTab')}+ />+ <Tab+ style={{+ // textTransform: 'unset',+ alignItems: 'baseline',+ paddingLeft: 0,+ }}+ data-tid="extensionsSettingsDialog"+ label={t('core:extensionsTab')}+ />+ <Tab+ style={{+ // textTransform: 'unset',+ alignItems: 'baseline',+ paddingLeft: 0,+ }}+ data-tid="advancedSettingsDialogTID"+ label={t('core:advancedSettingsTab')}+ />+ </Tabs>+ <div+ data-tid="settingsDialog"+ style={{+ height: 'calc(100% - 50px)',+ minHeight: 400,+ minWidth: 600,+ maxWidth: 600,+ }}+ >+ {currentTab === 0 && <SettingsGeneral />}+ {currentTab === 1 && <SettingsFileTypes />}+ {currentTab === 2 && <SettingsKeyBindings />}+ {currentTab === 3 && <SettingsExtensions />}+ {currentTab === 4 && (+ <SettingsAdvanced+ showResetSettings={setIsResetSettingsDialogOpened}+ />+ )}+ </div>{isResetSettingsDialogOpened && (<ConfirmDialogopen={isResetSettingsDialogOpened}@@ -119,11 +174,6 @@ function SettingsDialog(props: Props) {} else {window.location.reload();}-- /* const electron = window.require('electron');- const webContents = electron.remote.getCurrentWebContents();- webContents.session.clearStorageData();- webContents.reload(); */}}}cancelDialogTID="cancelResetSettingsDialogTID"@@ -131,18 +181,6 @@ function SettingsDialog(props: Props) {confirmDialogContentTID="confirmResetSettingsDialogContentTID"/>)}-- <div data-tid="settingsDialog">- {currentTab === 0 && <SettingsGeneral />}- {currentTab === 1 && <SettingsFileTypes />}- {currentTab === 2 && <SettingsKeyBindings />}- {currentTab === 3 && <SettingsExtensions />}- {currentTab === 4 && (- <SettingsAdvanced- showResetSettings={setIsResetSettingsDialogOpened}- />- )}- </div></DialogContent>);@@ -162,7 +200,6 @@ function SettingsDialog(props: Props) {>{t('core:help')}</Button>-<Buttondata-tid="closeSettingsDialog"onClick={props.onClose}@@ -174,21 +211,29 @@ function SettingsDialog(props: Props) {</DialogActions>);- const { open, onClose } = props;- const theme = useTheme();- const fullScreen = useMediaQuery(theme.breakpoints.down('md'));return (- <TranslucentDialog+ <Dialog+ sx={{+ '& .MuiDialog-paper': {+ maxWidth: 'unset',+ height: '100%',+ // background: props.fullScreen+ // ? theme.palette.background.default+ // : alpha(theme.palette.background.default, 0.85),+ // backdropFilter: props.fullScreen ? 'unset' : 'blur(5px)',+ },+ }}fullScreen={fullScreen}open={open}keepMountedscroll="paper"onClose={onClose}+ style={{ maxWidth: 'auto' }}>{renderTitle()}{renderContent()}{renderActions()}- </TranslucentDialog>+ </Dialog>);}diff --git a/src/renderer/components/dialogs/settings/SettingsExtensions.tsx b/src/renderer/components/dialogs/settings/SettingsExtensions.tsxindex b11633cb3..51cce4df8 100644--- a/src/renderer/components/dialogs/settings/SettingsExtensions.tsx+++ b/src/renderer/components/dialogs/settings/SettingsExtensions.tsx@@ -104,7 +104,7 @@ function SettingsExtensions() {};return (- <div style={{ minHeight: 400 }}>+ <div style={{ overflowX: 'hidden', overflowY: 'auto', height: '100%' }}><Accordion defaultExpanded><AccordionSummaryexpandIcon={<ExpandMoreIcon />}diff --git a/src/renderer/components/dialogs/settings/SettingsGeneral.tsx b/src/renderer/components/dialogs/settings/SettingsGeneral.tsxindex 28556e1f0..7eff3a723 100644--- a/src/renderer/components/dialogs/settings/SettingsGeneral.tsx+++ b/src/renderer/components/dialogs/settings/SettingsGeneral.tsx@@ -52,32 +52,6 @@ import { useTranslation } from 'react-i18next';import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';import { setLanguage } from '-/services/utils-io';-const PREFIX = 'SettingsGeneral';--const classes = {- root: `${PREFIX}-root`,- listItem: `${PREFIX}-listItem`,- pro: `${PREFIX}-pro`,- colorChooserButton: `${PREFIX}-colorChooserButton`,-};--const Root = styled('div')(({ theme }) => ({- [`& .${classes.root}`]: {- overflowX: 'hidden',- },- [`& .${classes.listItem}`]: {- paddingLeft: 0,- paddingRight: 0,- },- [`& .${classes.pro}`]: {- backgroundColor: '#1DD19F',- },- [`& .${classes.colorChooserButton}`]: {- minHeight: 30,- border: '1px solid lightgray',- },-}));-function SettingsGeneral() {const { i18n, t } = useTranslation();const { openCurrentDirectory } = useDirectoryContentContext();@@ -97,14 +71,6 @@ function SettingsGeneral() {setDisplayTextColorPicker(!displayTextColorPicker);};- /* handleChange = event => {- this.setState({ currentTheme: event.target.value });- }; */-- /* handleTagDelimiterChange = event => {- this.props.setTagDelimiter(event.target.value);- }; */-const handleMaxSearchResult = (event) => {dispatch(SettingsActions.setMaxSearchResult(event.target.value));};@@ -120,353 +86,351 @@ function SettingsGeneral() {}return (- <Root>- <List className={classes.root}>- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:interfaceLanguage')} />- <Select- data-tid="settingsSetLanguage"- value={settings.interfaceLanguage}- onChange={(event: any) => {- return i18n.changeLanguage(event.target.value).then(() => {- dispatch(SettingsActions.setLanguage(event.target.value));- setLanguage(event.target.value);- return true;- });- }}- input={<Input id="languageSelector" />}- >- {settings.supportedLanguages.map((language) => (- <MenuItem key={language.iso} value={language.iso}>- {language.title}- </MenuItem>- ))}- </Select>- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:themeSelector')} />- <Select- data-tid="settingsSetCurrentTheme"- value={settings.currentTheme}- onChange={(event: any) =>- dispatch(SettingsActions.setCurrentTheme(event.target.value))- }- input={<Input id="themeSelector" />}- >- {settings.supportedThemes.map((theme) => (- <MenuItem key={theme} value={theme}>- {theme === 'light' && t('core:regularScheme')}- {theme === 'dark' && t('core:darkScheme')}- {theme === 'system' && t('core:systemScheme')}- </MenuItem>- ))}- </Select>- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:themeRegularSelector')} />- <Select- data-tid="settingsCurrentRegularThemeTID"- value={settings.currentRegularTheme}- onChange={(event: any) =>- dispatch(- SettingsActions.setCurrentRegularTheme(event.target.value),- )- }- input={<Input id="themeRegularSelector" />}- >- {settings.supportedRegularThemes.map((theme) => (- <MenuItem key={theme} value={theme}>- {theme.charAt(0).toUpperCase() + theme.slice(1)}- </MenuItem>- ))}- </Select>- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:themeDarkSelector')} />- <Select- data-tid="settingsCurrentDarkThemeTID"- value={settings.currentDarkTheme}- onChange={(event: any) =>- dispatch(SettingsActions.setCurrentDarkTheme(event.target.value))- }- input={<Input id="themeDarkSelector" />}- >- {settings.supportedDarkThemes.map((theme) => (- <MenuItem key={theme} value={theme}>- {theme.charAt(0).toUpperCase() + theme.slice(1)}- </MenuItem>- ))}- </Select>- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('createLocationDefaultPerspective')} />- <PerspectiveSelector- onChange={changePerspective}- defaultValue={defaultPerspective}- testId="changePerspectiveInSettingsTID"- />- </ListItem>- <ListItem- className={classes.listItem}- title={- AppConfig.useSidecarsForFileTaggingDisableSetting- ? t('core:settingExternallyConfigured')- : ''+ <List style={{ overflowX: 'hidden', overflowY: 'auto', height: '100%' }}>+ <ListItem>+ <ListItemText primary={t('core:interfaceLanguage')} />+ <Select+ data-tid="settingsSetLanguage"+ value={settings.interfaceLanguage}+ onChange={(event: any) => {+ return i18n.changeLanguage(event.target.value).then(() => {+ dispatch(SettingsActions.setLanguage(event.target.value));+ setLanguage(event.target.value);+ return true;+ });+ }}+ input={<Input id="languageSelector" />}+ >+ {settings.supportedLanguages.map((language) => (+ <MenuItem key={language.iso} value={language.iso}>+ {language.title}+ </MenuItem>+ ))}+ </Select>+ </ListItem>+ <ListItem>+ <ListItemText primary={t('core:themeSelector')} />+ <Select+ data-tid="settingsSetCurrentTheme"+ value={settings.currentTheme}+ onChange={(event: any) =>+ dispatch(SettingsActions.setCurrentTheme(event.target.value))+ }+ input={<Input id="themeSelector" />}+ >+ {settings.supportedThemes.map((theme) => (+ <MenuItem key={theme} value={theme}>+ {theme === 'light' && t('core:regularScheme')}+ {theme === 'dark' && t('core:darkScheme')}+ {theme === 'system' && t('core:systemScheme')}+ </MenuItem>+ ))}+ </Select>+ </ListItem>+ <ListItem>+ <ListItemText primary={t('core:themeRegularSelector')} />+ <Select+ data-tid="settingsCurrentRegularThemeTID"+ value={settings.currentRegularTheme}+ onChange={(event: any) =>+ dispatch(SettingsActions.setCurrentRegularTheme(event.target.value))+ }+ input={<Input id="themeRegularSelector" />}+ >+ {settings.supportedRegularThemes.map((theme) => (+ <MenuItem key={theme} value={theme}>+ {theme.charAt(0).toUpperCase() + theme.slice(1)}+ </MenuItem>+ ))}+ </Select>+ </ListItem>+ <ListItem>+ <ListItemText primary={t('core:themeDarkSelector')} />+ <Select+ data-tid="settingsCurrentDarkThemeTID"+ value={settings.currentDarkTheme}+ onChange={(event: any) =>+ dispatch(SettingsActions.setCurrentDarkTheme(event.target.value))}+ input={<Input id="themeDarkSelector" />}>- <ListItemText primary={t('core:fileTaggingSetting')} />- {AppConfig.useSidecarsForFileTaggingDisableSetting ? (- <Button size="small" variant="outlined" disabled>- {persistTagsInSidecarFile- ? t('core:useSidecarFile')- : t('core:renameFile')}- </Button>- ) : (- <ToggleButtonGroup- value={persistTagsInSidecarFile}- size="small"- exclusive+ {settings.supportedDarkThemes.map((theme) => (+ <MenuItem key={theme} value={theme}>+ {theme.charAt(0).toUpperCase() + theme.slice(1)}+ </MenuItem>+ ))}+ </Select>+ </ListItem>+ <ListItem>+ <ListItemText primary={t('createLocationDefaultPerspective')} />+ <PerspectiveSelector+ onChange={changePerspective}+ defaultValue={defaultPerspective}+ testId="changePerspectiveInSettingsTID"+ />+ </ListItem>+ <ListItem+ title={+ AppConfig.useSidecarsForFileTaggingDisableSetting+ ? t('core:settingExternallyConfigured')+ : ''+ }+ >+ <ListItemText primary={t('core:fileTaggingSetting')} />+ {AppConfig.useSidecarsForFileTaggingDisableSetting ? (+ <Button size="small" variant="outlined" disabled>+ {persistTagsInSidecarFile+ ? t('core:useSidecarFile')+ : t('core:renameFile')}+ </Button>+ ) : (+ <ToggleButtonGroup+ value={persistTagsInSidecarFile}+ size="small"+ exclusive+ >+ <ToggleButton+ value={false}+ data-tid="settingsSetPersistTagsInFileName"+ onClick={() =>+ dispatch(SettingsActions.setPersistTagsInSidecarFile(false))+ }>- <ToggleButton- value={false}- data-tid="settingsSetPersistTagsInFileName"- onClick={() =>- dispatch(SettingsActions.setPersistTagsInSidecarFile(false))+ <Tooltip+ title={+ <Typography color="inherit">+ {t('core:tagsInFilenameExplanation')}+ </Typography>}>- <Tooltip- title={- <Typography color="inherit">- {t('core:tagsInFilenameExplanation')}- </Typography>- }- >- <div style={{ display: 'flex', textTransform: 'unset' }}>- {!persistTagsInSidecarFile && <CheckIcon />}- {t('core:renameFile')} - <InfoMuiIcon />- </div>- </Tooltip>- </ToggleButton>- <ToggleButton- value={true}- data-tid="settingsSetPersistTagsInSidecarFile"- onClick={() =>- dispatch(SettingsActions.setPersistTagsInSidecarFile(true))+ <div style={{ display: 'flex', textTransform: 'unset' }}>+ {!persistTagsInSidecarFile && <CheckIcon />}+ {t('core:renameFile')} + <InfoMuiIcon />+ </div>+ </Tooltip>+ </ToggleButton>+ <ToggleButton+ value={true}+ data-tid="settingsSetPersistTagsInSidecarFile"+ onClick={() =>+ dispatch(SettingsActions.setPersistTagsInSidecarFile(true))+ }+ >+ <Tooltip+ title={+ <Typography color="inherit">+ {t('core:tagsInSidecarFileExplanation')}+ </Typography>}>- <Tooltip- title={- <Typography color="inherit">- {t('core:tagsInSidecarFileExplanation')}- </Typography>- }- >- <div style={{ display: 'flex', textTransform: 'unset' }}>- {persistTagsInSidecarFile && <CheckIcon />}- {t('core:useSidecarFile')} - <InfoMuiIcon />- </div>- </Tooltip>- </ToggleButton>- </ToggleButtonGroup>- )}- </ListItem>- {!persistTagsInSidecarFile && (- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:fileNameTagSetting')} />- <ToggleButtonGroup- value={filenameTagPlacedAtEnd}- size="small"- exclusive+ <div style={{ display: 'flex', textTransform: 'unset' }}>+ {persistTagsInSidecarFile && <CheckIcon />}+ {t('core:useSidecarFile')} + <InfoMuiIcon />+ </div>+ </Tooltip>+ </ToggleButton>+ </ToggleButtonGroup>+ )}+ </ListItem>+ {!persistTagsInSidecarFile && (+ <ListItem>+ <ListItemText primary={t('core:fileNameTagSetting')} />+ <ToggleButtonGroup+ value={filenameTagPlacedAtEnd}+ size="small"+ exclusive+ >+ <ToggleButton+ value={false}+ data-tid="fileNameBeginningTagTID"+ onClick={() =>+ dispatch(SettingsActions.setFileNameTagPlace(false))+ }>- <ToggleButton- value={false}- data-tid="fileNameBeginningTagTID"- onClick={() =>- dispatch(SettingsActions.setFileNameTagPlace(false))+ <Tooltip+ title={+ <Typography color="inherit">+ {t('core:fileNameBeginTagPlaceExplanation')}+ </Typography>}>- <Tooltip- title={- <Typography color="inherit">- {t('core:fileNameBeginTagPlaceExplanation')}- </Typography>- }- >- <div style={{ display: 'flex', textTransform: 'unset' }}>- {!filenameTagPlacedAtEnd && <CheckIcon />}- {t('core:atTheBeginningOfFileName')} - <InfoMuiIcon />- </div>- </Tooltip>- </ToggleButton>- <ToggleButton- value={true}- data-tid="fileNameEndTagTID"- onClick={() =>- dispatch(SettingsActions.setFileNameTagPlace(true))+ <div style={{ display: 'flex', textTransform: 'unset' }}>+ {!filenameTagPlacedAtEnd && <CheckIcon />}+ {t('core:atTheBeginningOfFileName')} + <InfoMuiIcon />+ </div>+ </Tooltip>+ </ToggleButton>+ <ToggleButton+ value={true}+ data-tid="fileNameEndTagTID"+ onClick={() =>+ dispatch(SettingsActions.setFileNameTagPlace(true))+ }+ >+ <Tooltip+ title={+ <Typography color="inherit">+ {t('core:fileNameEndTagPlaceExplanation')}+ </Typography>}>- <Tooltip- title={- <Typography color="inherit">- {t('core:fileNameEndTagPlaceExplanation')}- </Typography>- }- >- <div style={{ display: 'flex', textTransform: 'unset' }}>- {filenameTagPlacedAtEnd && <CheckIcon />}- {t('core:filenameTagPlacedAtEnd')} - <InfoMuiIcon />- </div>- </Tooltip>- </ToggleButton>- </ToggleButtonGroup>- </ListItem>- )}+ <div style={{ display: 'flex', textTransform: 'unset' }}>+ {filenameTagPlacedAtEnd && <CheckIcon />}+ {t('core:filenameTagPlacedAtEnd')} + <InfoMuiIcon />+ </div>+ </Tooltip>+ </ToggleButton>+ </ToggleButtonGroup>+ </ListItem>+ )}- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:checkForNewVersionOnStartup')} />- <Switch- data-tid="settingsSetCheckForUpdates"- onClick={() =>- dispatch(- SettingsActions.setCheckForUpdates(!settings.checkForUpdates),- )- }- checked={settings.checkForUpdates}+ <ListItem>+ <ListItemText primary={t('core:checkForNewVersionOnStartup')} />+ <Switch+ data-tid="settingsSetCheckForUpdates"+ onClick={() =>+ dispatch(+ SettingsActions.setCheckForUpdates(!settings.checkForUpdates),+ )+ }+ checked={settings.checkForUpdates}+ />+ </ListItem>+ <ListItem>+ <ListItemText+ primary={+ <>+ {t('core:reorderTags')}+ <BetaLabel />+ </>+ }+ />+ <Switch+ data-tid="reorderTagsTID"+ onClick={() =>+ dispatch(SettingsActions.reorderTags(!settings.reorderTags))+ }+ checked={settings.reorderTags}+ />+ </ListItem>+ <ListItem>+ <ListItemText primary={t('core:addTagsToLibrary')} />+ <Switch+ data-tid="settingsSetAddTagsToLibrary"+ onClick={() =>+ dispatch(+ SettingsActions.setAddTagsToLibrary(!settings.addTagsToLibrary),+ )+ }+ checked={settings.addTagsToLibrary}+ />+ </ListItem>+ <ListItem>+ <ListItemText primary={t('core:useGenerateThumbnails')} />+ <Switch+ disabled={AppConfig.useGenerateThumbnails !== undefined}+ data-tid="settingsUseGenerateThumbnails"+ onClick={() =>+ dispatch(+ SettingsActions.setUseGenerateThumbnails(+ !settings.useGenerateThumbnails,+ ),+ )+ }+ checked={+ AppConfig.useGenerateThumbnails !== undefined+ ? AppConfig.useGenerateThumbnails+ : settings.useGenerateThumbnails+ }+ />+ </ListItem>+ <ListItem>+ <ListItemText primary={t('core:tagBackgroundColor')} />+ <TransparentBackground>+ <Button+ data-tid="settingsToggleDefaultTagBackgroundColor"+ size="small"+ style={{+ backgroundColor: settings.tagBackgroundColor,+ border: '1px solid lightgray',+ }}+ onClick={toggleDefaultTagBackgroundColorPicker}+ >+ + </Button>+ </TransparentBackground>+ {displayColorPicker && (+ <ColorPickerDialog+ open={displayColorPicker}+ setColor={(color) => {+ dispatch(SettingsActions.setTagColor(color));+ }}+ onClose={toggleDefaultTagBackgroundColorPicker}+ color={settings.tagBackgroundColor}/>- </ListItem>- <ListItem className={classes.listItem}>+ )}+ </ListItem>+ <ListItem>+ <ListItemText primary={t('core:tagForegroundColor')} />+ <TransparentBackground>+ <Button+ data-tid="settingsToggleDefaultTagForegroundColor"+ size="small"+ style={{+ border: '1px solid lightgray',+ backgroundColor: settings.tagTextColor,+ }}+ onClick={toggleDefaultTagTextColorPicker}+ >+ + </Button>+ </TransparentBackground>+ {displayTextColorPicker && (+ <ColorPickerDialog+ open={displayTextColorPicker}+ setColor={(color) => {+ dispatch(SettingsActions.setTagTextColor(color));+ }}+ onClose={toggleDefaultTagTextColorPicker}+ color={settings.tagTextColor}+ />+ )}+ </ListItem>+ {AppConfig.isElectron && (+ <ListItem><ListItemTextprimary={- <>- {t('core:reorderTags')}- <BetaLabel />- </>- }- />- <Switch- data-tid="reorderTagsTID"- onClick={() =>- dispatch(SettingsActions.reorderTags(!settings.reorderTags))- }- checked={settings.reorderTags}- />- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:addTagsToLibrary')} />- <Switch- data-tid="settingsSetAddTagsToLibrary"- onClick={() =>- dispatch(- SettingsActions.setAddTagsToLibrary(!settings.addTagsToLibrary),- )+ <Typography>+ {t('core:useTrashCan')}+ <InfoIcon tooltip={t('core:useTrashCanInfo')} />+ </Typography>}- checked={settings.addTagsToLibrary}/>- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:useGenerateThumbnails')} /><Switch- disabled={AppConfig.useGenerateThumbnails !== undefined}- data-tid="settingsUseGenerateThumbnails"+ data-tid="settingsSetUseTrashCan"onClick={() =>- dispatch(- SettingsActions.setUseGenerateThumbnails(- !settings.useGenerateThumbnails,- ),- )- }- checked={- AppConfig.useGenerateThumbnails !== undefined- ? AppConfig.useGenerateThumbnails- : settings.useGenerateThumbnails+ dispatch(SettingsActions.setUseTrashCan(!settings.useTrashCan))}+ checked={settings.useTrashCan}/></ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:tagBackgroundColor')} />- <TransparentBackground>- <Button- data-tid="settingsToggleDefaultTagBackgroundColor"- className={classes.colorChooserButton}- size="small"- style={{- backgroundColor: settings.tagBackgroundColor,- }}- onClick={toggleDefaultTagBackgroundColorPicker}- >- - </Button>- </TransparentBackground>- {displayColorPicker && (- <ColorPickerDialog- open={displayColorPicker}- setColor={(color) => {- dispatch(SettingsActions.setTagColor(color));- }}- onClose={toggleDefaultTagBackgroundColorPicker}- color={settings.tagBackgroundColor}- />- )}- </ListItem>- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:tagForegroundColor')} />- <TransparentBackground>- <Button- data-tid="settingsToggleDefaultTagForegroundColor"- className={classes.colorChooserButton}- size="small"- style={{ backgroundColor: settings.tagTextColor }}- onClick={toggleDefaultTagTextColorPicker}- >- - </Button>- </TransparentBackground>- {displayTextColorPicker && (- <ColorPickerDialog- open={displayTextColorPicker}- setColor={(color) => {- dispatch(SettingsActions.setTagTextColor(color));- }}- onClose={toggleDefaultTagTextColorPicker}- color={settings.tagTextColor}- />- )}- </ListItem>- {AppConfig.isElectron && (- <ListItem className={classes.listItem}>- <ListItemText- primary={- <Typography>- {t('core:useTrashCan')}- <InfoIcon tooltip={t('core:useTrashCanInfo')} />- </Typography>- }- />- <Switch- data-tid="settingsSetUseTrashCan"- onClick={() =>- dispatch(SettingsActions.setUseTrashCan(!settings.useTrashCan))- }- checked={settings.useTrashCan}- />- </ListItem>- )}- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:showUnixHiddenFiles')} />- <Switch- data-tid="settingsSetShowUnixHiddenEntries"- onClick={() => {- dispatch(SettingsActions.toggleShowUnixHiddenEntries());- openCurrentDirectory(!settings.showUnixHiddenEntries);- }}- checked={settings.showUnixHiddenEntries}- />- </ListItem>- {/* <ListItem className={classes.listItem}>+ )}+ <ListItem>+ <ListItemText primary={t('core:showUnixHiddenFiles')} />+ <Switch+ data-tid="settingsSetShowUnixHiddenEntries"+ onClick={() => {+ dispatch(SettingsActions.toggleShowUnixHiddenEntries());+ openCurrentDirectory(!settings.showUnixHiddenEntries);+ }}+ checked={settings.showUnixHiddenEntries}+ />+ </ListItem>+ {/* <ListItem><ListItemText style={{ maxWidth: '300px' }} primary={t('core:tagDelimiterChoose')} /><Selectstyle={{ minWidth: '170px' }}@@ -483,18 +447,17 @@ function SettingsGeneral() {<MenuItem value=",">{t('core:tagDelimiterComma')}</MenuItem></Select></ListItem> */}- <ListItem className={classes.listItem}>- <ListItemText primary={t('core:maxSearchResultChoose')} />- <Input- style={{ maxWidth: '100px' }}- type="number"- data-tid="settingsMaxSearchResult"- value={settings.maxSearchResult}- onChange={handleMaxSearchResult}- />- </ListItem>- </List>- </Root>+ <ListItem>+ <ListItemText primary={t('core:maxSearchResultChoose')} />+ <Input+ style={{ maxWidth: '100px' }}+ type="number"+ data-tid="settingsMaxSearchResult"+ value={settings.maxSearchResult}+ onChange={handleMaxSearchResult}+ />+ </ListItem>+ </List>);}diff --git a/src/renderer/components/dialogs/settings/SettingsKeyBindings.tsx b/src/renderer/components/dialogs/settings/SettingsKeyBindings.tsxindex 997a2eba3..8de35debd 100644--- a/src/renderer/components/dialogs/settings/SettingsKeyBindings.tsx+++ b/src/renderer/components/dialogs/settings/SettingsKeyBindings.tsx@@ -36,19 +36,6 @@ import Typography from '@mui/material/Typography';import { setGlobalShortcuts } from '-/services/utils-io';import AppConfig from '-/AppConfig';-const PREFIX = 'SettingsKeyBindings';--const classes = {- keyBinding: `${PREFIX}-keyBinding`,-};--const Root = styled('form')(({ theme }) => ({- [`& .${classes.keyBinding}`]: {- marginTop: 10,- marginBottom: 10,- },-}));-function SettingsKeyBindings() {const { t } = useTranslation();const keyBindings = useSelector(getKeyBindings);@@ -65,7 +52,14 @@ function SettingsKeyBindings() {};return (- <Root className={classes.keyBinding} noValidate autoComplete="off">+ <div+ style={{+ overflowX: 'hidden',+ overflowY: 'auto',+ height: '100%',+ marginLeft: 10,+ }}+ ><Typography variant="body2" style={{ marginBottom: 10 }}>The following key names can be used for defining key bindings:{' '}<Typography variant="overline">@@ -91,8 +85,9 @@ function SettingsKeyBindings() {)[0];return (<TsTextField- className={classes.keyBinding}+ style={{ marginTop: 10, marginBottom: 10 }}key={keyBinding.name}+ autoComplete="off"InputLabelProps={{ shrink: true }}onBlur={(event) =>setKeyBinding(keyBinding.name, event.target.value)@@ -106,7 +101,7 @@ function SettingsKeyBindings() {/>);})}- </Root>+ </div>);}