TagSpaces is an offline, open source, document manager with tagging support
chore: improving ux of the edit description functionality
Ilian Sapundshievcc7427134807
diff --git a/src/renderer/components/EditDescription.tsx b/src/renderer/components/EditDescription.tsxindex d317f1543..08607ee1a 100644--- a/src/renderer/components/EditDescription.tsx+++ b/src/renderer/components/EditDescription.tsx@@ -123,7 +123,7 @@ function EditDescription() {)}</div><span style={{ verticalAlign: 'sub', paddingLeft: 5 }}>- <Typography+ {/* <Typographyvariant="caption"style={{color: theme.palette.text.primary,@@ -133,7 +133,7 @@ function EditDescription() {<b className={classes.mdHelpers}>**bold**</b>{' '}<span className={classes.mdHelpers}>* list item</span>{' '}<span className={classes.mdHelpers}>[Link text](http://...)</span>- </Typography>+ </Typography> */}</span></EditDescriptionRoot>);diff --git a/src/renderer/components/EditDescriptionButtons.tsx b/src/renderer/components/EditDescriptionButtons.tsxindex 55fc5a7d3..ba97815f6 100644--- a/src/renderer/components/EditDescriptionButtons.tsx+++ b/src/renderer/components/EditDescriptionButtons.tsx@@ -7,21 +7,6 @@ import { useTranslation } from 'react-i18next';import { useDescriptionContext } from '-/hooks/useDescriptionContext';import ConfirmDialog from '-/components/dialogs/ConfirmDialog';-const PREFIX = 'EditDescriptionButtons';--const classes = {- button: `${PREFIX}-button`,-};--const Root = styled('span')(({ theme }) => ({- float: 'right',- [`& .${classes.button}`]: {- position: 'relative',- padding: '4px 10px 4px 10px',- margin: '0',- },-}));-export interface DescriptionChangedRef {setDescriptionChanged: (changed: boolean) => void;}@@ -73,15 +58,15 @@ const EditDescriptionButtons: React.FC<Props> = ({ buttonsRef }) => {// };return (- <Root>+ <span style={{ float: 'left' }}>{isEditMode && (<Button- className={classes.button}onClick={() => {setEditMode(false);}}>- {t(isDescriptionChanged ? 'core:cancel' : 'core:close')}+ {t('core:cancel')}+ {/* {t(isDescriptionChanged ? 'core:cancel' : 'core:close')} */}</Button>)}{/* {!editMode && (@@ -93,7 +78,6 @@ const EditDescriptionButtons: React.FC<Props> = ({ buttonsRef }) => {<Buttondata-tid="editDescriptionTID"color="primary"- className={classes.button}disabled={!Pro}onClick={() => {if (isEditMode) {@@ -102,7 +86,7 @@ const EditDescriptionButtons: React.FC<Props> = ({ buttonsRef }) => {setEditMode(!isEditMode);}}>- {isEditMode ? t('core:confirmSaveButton') : t('core:edit')}+ {isEditMode ? t('core:confirmSaveButton') : t('core:editDescription')}</Button></ProTooltip><ConfirmDialog@@ -123,7 +107,7 @@ const EditDescriptionButtons: React.FC<Props> = ({ buttonsRef }) => {confirmDialogTID="confirmSaveDescCloseDialog"confirmDialogContentTID="confirmDescDialogContent"/>- </Root>+ </span>);};