TagSpaces is an offline, open source, document manager with tagging support
chore: improving clearing history UI
Ilian Sapundshiev24c89fb9e425
diff --git a/app/components/dialogs/settings/SettingsAdvanced.tsx b/app/components/dialogs/settings/SettingsAdvanced.tsxindex f165de1f5..2da67dfc4 100644--- a/app/components/dialogs/settings/SettingsAdvanced.tsx+++ b/app/components/dialogs/settings/SettingsAdvanced.tsx@@ -181,14 +181,16 @@ function SettingsAdvanced(props: Props) {<ListItem className={classes.listItem}><ListItemText primary={i18n.t('core:fileOpenHistory')} /><ListItemIcon>- <IconButton- aria-label={i18n.t('core:clearHistory')}- onClick={() => setConfirmDialogKey(historyKeys.fileOpenKey)}- data-tid="clearSearchTID"- size="small"- >- <DeleteIcon />- </IconButton>+ <Tooltip title={i18n.t('clearHistory')}>+ <IconButton+ aria-label={i18n.t('core:clearHistory')}+ onClick={() => setConfirmDialogKey(historyKeys.fileOpenKey)}+ data-tid="clearSearchTID"+ size="small"+ >+ <DeleteIcon />+ </IconButton>+ </Tooltip></ListItemIcon><Selectdata-tid="fileOpenTID"@@ -208,14 +210,18 @@ function SettingsAdvanced(props: Props) {<ListItem className={classes.listItem}><ListItemText primary={i18n.t('core:folderOpenHistory')} /><ListItemIcon>- <IconButton- aria-label={i18n.t('core:clearHistory')}- onClick={() => setConfirmDialogKey(historyKeys.folderOpenKey)}- data-tid="clearSearchTID"- size="small"- >- <DeleteIcon />- </IconButton>+ <Tooltip title={i18n.t('clearHistory')}>+ <IconButton+ aria-label={i18n.t('core:clearHistory')}+ onClick={() =>+ setConfirmDialogKey(historyKeys.folderOpenKey)+ }+ data-tid="clearSearchTID"+ size="small"+ >+ <DeleteIcon />+ </IconButton>+ </Tooltip></ListItemIcon><Selectdata-tid="folderOpenTID"@@ -238,14 +244,16 @@ function SettingsAdvanced(props: Props) {<ListItem className={classes.listItem}><ListItemText primary={i18n.t('core:fileEditHistory')} /><ListItemIcon>- <IconButton- aria-label={i18n.t('core:clearHistory')}- onClick={() => setConfirmDialogKey(historyKeys.fileEditKey)}- data-tid="clearSearchTID"- size="small"- >- <DeleteIcon />- </IconButton>+ <Tooltip title={i18n.t('clearHistory')}>+ <IconButton+ aria-label={i18n.t('core:clearHistory')}+ onClick={() => setConfirmDialogKey(historyKeys.fileEditKey)}+ data-tid="clearSearchTID"+ size="small"+ >+ <DeleteIcon />+ </IconButton>+ </Tooltip></ListItemIcon><Selectdata-tid="fileEditTID"@@ -265,16 +273,18 @@ function SettingsAdvanced(props: Props) {<ListItem className={classes.listItem}><ListItemText primary={i18n.t('core:searchHistory')} /><ListItemIcon>- <IconButton- aria-label={i18n.t('core:clearHistory')}- onClick={() =>- setConfirmDialogKey(historyKeys.searchHistoryKey)- }- data-tid="clearSearchTID"- size="small"- >- <DeleteIcon />- </IconButton>+ <Tooltip title={i18n.t('clearHistory')}>+ <IconButton+ aria-label={i18n.t('core:clearHistory')}+ onClick={() =>+ setConfirmDialogKey(historyKeys.searchHistoryKey)+ }+ data-tid="clearSearchTID"+ size="small"+ >+ <DeleteIcon />+ </IconButton>+ </Tooltip></ListItemIcon><Selectdata-tid="searchHistoryTID"diff --git a/app/locales/en/core.json b/app/locales/en/core.jsonindex 2a5075259..96a63a129 100644--- a/app/locales/en/core.json+++ b/app/locales/en/core.json@@ -786,9 +786,9 @@"maxLoopsHelp": "The app can handle as much files in one S3-folder as specified in this setting","enterTagTimePeriodFrom": "Time period from","enterTagTimePeriodTo": "Time period to",- "confirmtsSearchHistoryDeletion": "Are you sure you want to delete all search history?",- "confirmtsLastEditedFilesHistoryDeletion": "Are you sure you want to delete all last edited files history?",- "confirmtsLastOpenedFoldersHistoryDeletion": "Are you sure you want to delete all last opened folders history?",- "confirmtsLastOpenedFilesHistoryDeletion": "Are you sure you want to delete all last opened files history?",+ "confirmtsSearchHistoryDeletion": "Are you sure you want clear your search history?",+ "confirmtsLastEditedFilesHistoryDeletion": "Are you sure you want to clear the list of your recently edited files?",+ "confirmtsLastOpenedFoldersHistoryDeletion": "Are you sure you want to clear the list of your recently opened folders?",+ "confirmtsLastOpenedFilesHistoryDeletion": "Are you sure you want to clear the list of your recently opened files?","-": "-"}