Skip to content

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

fix: issues with creating files in kanban and improving howtostart texts

Ilian Sapundshiev60d24356f7fe
diff --git a/app/components/EditDescription.tsx b/app/components/EditDescription.tsx
index 3a7356c62..95c190fed 100644
--- a/app/components/EditDescription.tsx
+++ b/app/components/EditDescription.tsx
@@ -79,7 +79,7 @@ function EditDescription(props: Props) {
<div
onDoubleClick={() => {
if (props.toggleEditDescriptionField) {
- setEditMode(!editMode);
+ setEditMode(true);
props.toggleEditDescriptionField();
}
}}
diff --git a/app/components/HowToStart.tsx b/app/components/HowToStart.tsx
index 02facbcbb..3f4a7e974 100644
--- a/app/components/HowToStart.tsx
+++ b/app/components/HowToStart.tsx
@@ -51,8 +51,9 @@ function HowToStart(props: Props) {
label: 'Introduction',
description: (
<>
- The following guide will show you some basic functionalities of the
- application. It is recommended for first time users.
+ The following walkthrough will show you some important areas and
+ functionalities of the application. It is recommended for first time
+ users.
</>
)
},
@@ -60,10 +61,10 @@ function HowToStart(props: Props) {
label: 'Location Manager',
description: (
<>
- In order to use a folder and files in TagSpaces you have to connect
- this folder as location. The location manager is the place where you
- can create, edit, remove, import or export your locations. The
- pre-existing locations, pointing for example to your Desktop or
+ In order to use a folder tree with files in TagSpaces you have to
+ connect the main folder as location. The location manager is the place
+ where you can create, edit, remove, import or export your locations.
+ All pre-existing locations, pointing for example to your Desktop or
Download folders, are optional and can be removed.
<br />
<SlideButton
@@ -83,10 +84,10 @@ function HowToStart(props: Props) {
<>
The highlighted button will open a dialog where you can choose which
folder you want to use in TagSpaces and create a location pointing to
- it. Depending on location's type, the folder can be on your computer
- or located on an object storage in the Cloud. TagSpaces supports
- object storage from AWS S3 compatible providers such as Wasabi or
- Minio.
+ it. Depending on the location's type, the folder can be on your
+ computer or located on an object storage in the Cloud. TagSpaces
+ supports object storage from AWS S3 compatible providers such as
+ Wasabi or Minio.
<br />
<SlideButton
title="Open Videos Tutorials"
@@ -128,7 +129,7 @@ function HowToStart(props: Props) {
In this section you can find the following functionalities:
<ul>
<li>
- Searches you have stored for later use&nbsp;
+ Search queries you have stored for later use&nbsp;
<ProSign />
</li>
<li>
@@ -136,15 +137,15 @@ function HowToStart(props: Props) {
<ProSign />
</li>
<li>
- Recently opened files&nbsp;
+ A list of recently opened files&nbsp;
<ProSign />
</li>
<li>
- Recently edited files&nbsp;
+ A list of recently edited files&nbsp;
<ProSign />
</li>
<li>
- Recently opened folder&nbsp;
+ A list of recently opened folders&nbsp;
<ProSign />
</li>
</ul>
@@ -201,9 +202,9 @@ function HowToStart(props: Props) {
label: 'Creating files',
description: (
<>
- The highlighted button will open a dialog, where you can create new
- file or digital note. The new files can be in the following file
- formats:
+ The highlighted button will open a dialog, where you can create a new
+ file or <b>digital note</b>. The new files can be in the following
+ file formats:
<ul>
<li>
<b>Markdown</b> (recommended) - suitable for notes with simple
@@ -364,7 +365,7 @@ function HowToStart(props: Props) {
</Stepper>
{activeStep === steps.length && (
<Paper square elevation={0} sx={{ p: 3 }}>
- <Typography>All steps completed - you&apos;re finished</Typography>
+ <Typography>All steps completed - you&apos;re finished.</Typography>
<Button onClick={handleReset} sx={{ mt: 1, mr: 1 }}>
{i18n.t('core:resetBtn')}
</Button>
diff --git a/app/components/dialogs/CreateDialog.tsx b/app/components/dialogs/CreateDialog.tsx
index aa20b0656..79beef38b 100644
--- a/app/components/dialogs/CreateDialog.tsx
+++ b/app/components/dialogs/CreateDialog.tsx
@@ -41,7 +41,8 @@ import { getKeyBindingObject } from '-/reducers/settings';
import {
actions as AppActions,
getDirectoryPath,
- getSelectedEntries
+ getSelectedEntries,
+ getCurrentDirectoryPerspective
} from '-/reducers/app';
import IOActions from '-/reducers/io-actions';
import {
@@ -75,9 +76,10 @@ interface Props {
classes: any;
// locations: Array<TS.Location>;
firstRWLocation: TS.Location;
- currentLocation: TS.Location;
+ // currentLocation: TS.Location;
selectedEntries: Array<TS.FileSystemEntry>;
currentDirectoryPath: string | null;
+ currentDirectoryPerspective: string;
openLocation: (location: TS.Location) => void;
// selectedDirectoryPath: string;
// chooseDirectoryPath: (path: string) => void;
@@ -108,9 +110,9 @@ function CreateDialog(props: Props) {
createFileAdvanced,
openLocation,
currentDirectoryPath,
+ currentDirectoryPerspective,
selectedEntries,
- currentLocation,
- // locations,
+ // currentLocation,
showNotification,
firstRWLocation
} = props;
@@ -127,15 +129,12 @@ function CreateDialog(props: Props) {
let targetDirectoryPath = currentDirectoryPath;
if (
- currentLocation &&
- currentLocation.perspective === PerspectiveIDs.KANBAN &&
+ currentDirectoryPerspective === PerspectiveIDs.KANBAN &&
selectedEntries &&
- selectedEntries.length === 1
+ selectedEntries.length === 1 &&
+ !selectedEntries[0].isFile
) {
- targetDirectoryPath = extractContainingDirectoryPath(
- selectedEntries[0].path,
- PlatformIO.getDirSeparator()
- );
+ targetDirectoryPath = selectedEntries[0].path;
}
if (!targetDirectoryPath && firstRWLocation) {
@@ -447,7 +446,8 @@ function mapStateToProps(state) {
keyBindings: getKeyBindingObject(state),
selectedEntries: getSelectedEntries(state),
currentDirectoryPath: getDirectoryPath(state),
- currentLocation: getCurrentLocation(state)
+ currentDirectoryPerspective: getCurrentDirectoryPerspective(state)
+ // currentLocation: getCurrentLocation(state)
};
}
diff --git a/app/reducers/locations.ts b/app/reducers/locations.ts
index d95050695..254b7816d 100644
--- a/app/reducers/locations.ts
+++ b/app/reducers/locations.ts
@@ -294,7 +294,7 @@ export const getCurrentLocation = (state: any): string | undefined => {
let foundLocation = state.locations.find(
location => location.uuid === state.app.currentLocationId
);
- return foundLocation ? foundLocation.uuid : undefined;
+ return foundLocation ? foundLocation : undefined;
};
export const getFirstRWLocation = (state: any): string | undefined => {
let foundLocation = state.locations.find(