TagSpaces is an offline, open source, document manager with tagging support
fixes issues with file description and adding tags (#1223)
Stanimir8e58387fde7a
diff --git a/app/components/EntryProperties.tsx b/app/components/EntryProperties.tsxindex 0e3afe20c..8b2200327 100644--- a/app/components/EntryProperties.tsx+++ b/app/components/EntryProperties.tsx@@ -238,7 +238,7 @@ const EntryProperties = (props: Props) => {useEffect(() => {if (- editDescription === currentEntry.description &&+ // editDescription === currentEntry.description &&fileDescriptionRef.current) {fileDescriptionRef.current.focus();diff --git a/app/components/dialogs/ObjectStoreForm.tsx b/app/components/dialogs/ObjectStoreForm.tsxindex cc6f7724a..003d09f5f 100644--- a/app/components/dialogs/ObjectStoreForm.tsx+++ b/app/components/dialogs/ObjectStoreForm.tsx@@ -31,11 +31,36 @@ import Visibility from '@material-ui/icons/Visibility';import VisibilityOff from '@material-ui/icons/VisibilityOff';import i18n from '-/services/i18n';+/**+ * https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-regions-availability-zones.html+ us-east-2 US East (Ohio) Not required Not available+us-east-1 US East (N. Virginia) Not required Not available+us-west-1 US West (N. California) Not required Not available+us-west-2 US West (Oregon) Not required us-west-2-lax-1a us-west-2-lax-1b+af-south-1 Africa (Cape Town) Required Not available+ap-east-1 Asia Pacific (Hong Kong) Required Not available+ap-south-1 Asia Pacific (Mumbai) Not required Not available+ap-northeast-3 Asia Pacific (Osaka-Local) Not required Not available+ap-northeast-2 Asia Pacific (Seoul) Not required Not available+ap-southeast-1 Asia Pacific (Singapore) Not required Not available+ap-southeast-2 Asia Pacific (Sydney) Not required Not available+ap-northeast-1 Asia Pacific (Tokyo) Not required Not available+ca-central-1 Canada (Central) Not required Not available+eu-central-1 Europe (Frankfurt) Not required Not available+eu-west-1 Europe (Ireland) Not required Not available+eu-west-2 Europe (London) Not required Not available+eu-south-1 Europe (Milan) Required Not available+eu-west-3 Europe (Paris) Not required Not available+eu-north-1 Europe (Stockholm) Not required Not available+me-south-1 Middle East (Bahrain) Required Not available+sa-east-1 South America (São Paulo) Not required Not available+ */export const regions = ['us-east-2','us-east-1','us-west-1','us-west-2',+ 'af-south-1','ap-south-1','ap-northeast-3','ap-northeast-2',@@ -43,12 +68,15 @@ export const regions = ['ap-southeast-2','ap-northeast-1','ca-central-1',- 'cn-north-1',- 'cn-northwest-1','eu-central-1','eu-west-1','eu-west-2',+ 'eu-south-1','eu-west-3',+ 'eu-north-1',+ 'me-south-1',+ // 'cn-north-1',+ // 'cn-northwest-1','sa-east-1'];diff --git a/app/perspectives/grid-perspective/components/CellContent.tsx b/app/perspectives/grid-perspective/components/CellContent.tsxindex 0a5d9bc20..2f85a4d2b 100644--- a/app/perspectives/grid-perspective/components/CellContent.tsx+++ b/app/perspectives/grid-perspective/components/CellContent.tsx@@ -29,7 +29,7 @@ import FolderIcon from '@material-ui/icons/FolderOpen';// import UnSelectedIcon from '@material-ui/icons/RadioButtonUnchecked';import TagIcon from '@material-ui/icons/LocalOfferOutlined';import { formatFileSize, formatDateTime } from '-/utils/misc';-import { extractTitle } from '-/utils/paths';+import { extractTagsAsObjects, extractTitle } from '-/utils/paths';import { FileSystemEntry, findColorForFileEntry } from '-/services/utils-io';import TagContainerDnd from '-/components/TagContainerDnd';import TagContainer from '-/components/TagContainer';@@ -98,9 +98,21 @@ const CellContent = (props: Props) => {supportedFileTypes);+ const fileNameTags = extractTagsAsObjects(+ fsEntry.name,+ AppConfig.tagDelimiter,+ PlatformIO.getDirSeparator()+ );++ const sideCarTagsTitles = fsEntry.tags.map(tag => tag.title);+ const entryTags = [+ ...fsEntry.tags,+ ...fileNameTags.filter(tag => !sideCarTagsTitles.includes(tag.title))+ ];+let tagTitles = '';- if (fsEntry.tags) {- fsEntry.tags.map(tag => {+ if (entryTags) {+ entryTags.map(tag => {tagTitles += tag.title + ', ';return true;});@@ -146,8 +158,8 @@ const CellContent = (props: Props) => {/>)}<div id="gridCellTags" className={classes.gridCellTags}>- {showTags && fsEntry.tags- ? fsEntry.tags.map(tag => renderTag(tag))+ {showTags && entryTags+ ? entryTags.map(tag => renderTag(tag)): tagPlaceholder}</div>{description.length > 0 && (@@ -273,8 +285,8 @@ const CellContent = (props: Props) => {<Typography style={{ wordBreak: 'break-all', alignSelf: 'center' }}>{entryTitle} - {showTags && fsEntry.tags- ? fsEntry.tags.map(tag => renderTag(tag))+ {showTags && entryTags+ ? entryTags.map(tag => renderTag(tag)): tagPlaceholder}</Typography></Grid>@@ -283,8 +295,8 @@ const CellContent = (props: Props) => {<Typography style={{ wordBreak: 'break-all' }}>{entryTitle}</Typography>- {showTags && fsEntry.tags- ? fsEntry.tags.map(tag => renderTag(tag))+ {showTags && entryTags+ ? entryTags.map(tag => renderTag(tag)): tagPlaceholder}<Typographystyle={{diff --git a/app/reducers/app.ts b/app/reducers/app.tsindex 37839af3d..a74746d0d 100644--- a/app/reducers/app.ts+++ b/app/reducers/app.ts@@ -1306,7 +1306,7 @@ export const actions = {if (fsEntryMeta.color) {entryForOpening.color = fsEntryMeta.color;}- if (fsEntryMeta.description) {+ if (fsEntryMeta.description !== undefined) {entryForOpening.description = fsEntryMeta.description;}if (fsEntryMeta.perspective) {