Skip to content

TagSpaces is an offline, open source, document manager with tagging support

Feature: show url in the property's path field of entries in the cloud

Ilian Sapundshievb02f78fc00ca
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsx
index 7e2554d87..5f259400d 100644
--- a/app/components/EntryContainer.tsx
+++ b/app/components/EntryContainer.tsx
@@ -1229,6 +1229,7 @@ class EntryContainer extends React.Component<Props, State> {
resetState={this.resetState}
setPropertiesEditMode={this.setPropertiesEditMode}
entryPath={currentEntry.path}
+ entryURL={currentEntry.url}
shouldReload={currentEntry.shouldReload}
renameFile={this.props.renameFile}
renameDirectory={this.props.renameDirectory}
diff --git a/app/components/EntryProperties.tsx b/app/components/EntryProperties.tsx
index efb96bc0d..202e97ce5 100644
--- a/app/components/EntryProperties.tsx
+++ b/app/components/EntryProperties.tsx
@@ -28,6 +28,9 @@ import FormControl from '@material-ui/core/FormControl';
import Typography from '@material-ui/core/Typography';
import TextField from '@material-ui/core/TextField';
import Button from '@material-ui/core/Button';
+import InputAdornment from '@material-ui/core/InputAdornment';
+import LocationIcon from '@material-ui/icons/WorkOutline';
+import CloudLocationIcon from '@material-ui/icons/CloudQueue';
import DOMPurify from 'dompurify';
import TagDropContainer from './TagDropContainer';
import EntryTagMenu from './menus/EntryTagMenu';
@@ -154,6 +157,7 @@ interface Props {
classes: any;
theme: any;
entryPath: string;
+ entryURL: string;
shouldReload: boolean | null;
shouldCopyFile: boolean;
editTagForEntry: () => void;
@@ -536,7 +540,13 @@ class EntryProperties extends Component<Props, State> {
};
render() {
- const { classes, entryPath, removeTags, isReadOnlyMode } = this.props;
+ const {
+ classes,
+ entryPath,
+ removeTags,
+ isReadOnlyMode,
+ entryURL
+ } = this.props;
const {
path,
tags,
@@ -894,13 +904,19 @@ class EntryProperties extends Component<Props, State> {
<FormControl fullWidth={true} className={classes.formControl}>
<TextField
margin="dense"
- InputProps={{
- readOnly: true
- }}
name="path"
+ title={entryURL || entryPath}
fullWidth={true}
data-tid="filePathProperties"
value={entryPath || ''}
+ InputProps={{
+ readOnly: true,
+ startAdornment: (
+ <InputAdornment position="start">
+ {entryURL ? <CloudLocationIcon /> : <LocationIcon />}
+ </InputAdornment>
+ )
+ }}
/>
</FormControl>
</div>