TagSpaces is an offline, open source, document manager with tagging support
TSN548 - Kanban - various issues v4 (#1782)
Stanimir171aba0c1f3d
diff --git a/app/components/TagContainer.tsx b/app/components/TagContainer.tsxindex 2cb539912..be217a6b2 100644--- a/app/components/TagContainer.tsx+++ b/app/components/TagContainer.tsx@@ -141,7 +141,7 @@ function TagContainer(props: Props) {}}- let tagTitle = tag.title;+ let tagTitle = ''; // tag.title;if (isTagDate) {let date;if (tag.title.length > 8) {@@ -153,11 +153,11 @@ function TagContainer(props: Props) {}if (tag.description) {- tagTitle = tagTitle + ' - ' + tag.description;+ tagTitle = tagTitle + ' ' + tag.description;}if (isTagDate && title.length > 8) {- title = title.substr(0, 8) + '...';+ title = title.substring(0, 8) + '...';}return (diff --git a/app/perspectives/grid-perspective/components/MainContainer.tsx b/app/perspectives/grid-perspective/components/MainContainer.tsxindex 6d1a8cc6c..30328692a 100644--- a/app/perspectives/grid-perspective/components/MainContainer.tsx+++ b/app/perspectives/grid-perspective/components/MainContainer.tsx@@ -124,10 +124,7 @@ function getSettings(directoryMeta: TS.FileSystemEntryMeta): TS.FolderSettings {directoryMeta.perspectiveSettings &&directoryMeta.perspectiveSettings[PerspectiveIDs.GRID]) {- return {- ...directoryMeta.perspectiveSettings[PerspectiveIDs.GRID],- isLocal: true- };+ return directoryMeta.perspectiveSettings[PerspectiveIDs.GRID];} else {// loading settings for not Proreturn JSON.parse(localStorage.getItem(defaultSettings.settingsKey));@@ -135,6 +132,11 @@ function getSettings(directoryMeta: TS.FileSystemEntryMeta): TS.FolderSettings {}function GridPerspective(props: Props) {+ const isLocal =+ Pro &&+ props.directoryMeta &&+ props.directoryMeta.perspectiveSettings &&+ props.directoryMeta.perspectiveSettings[PerspectiveIDs.GRID];const settings = getSettings(props.directoryMeta);const [mouseX, setMouseX] = useState<number>(undefined);@@ -746,7 +748,7 @@ function GridPerspective(props: Props) {sortBy={sortBy.current}orderBy={orderBy.current}handleSortingMenu={handleSortingMenu}- isLocal={settings && settings.isLocal}+ isLocal={isLocal}resetLocalSettings={() => {Pro.MetaOperations.savePerspectiveSettings(currentDirectoryPath,diff --git a/app/perspectives/list/components/MainContainer.tsx b/app/perspectives/list/components/MainContainer.tsxindex 8e7aa2f71..9c15b7378 100644--- a/app/perspectives/list/components/MainContainer.tsx+++ b/app/perspectives/list/components/MainContainer.tsx@@ -123,10 +123,7 @@ function getSettings(directoryMeta: TS.FileSystemEntryMeta): TS.FolderSettings {directoryMeta.perspectiveSettings &&directoryMeta.perspectiveSettings[PerspectiveIDs.LIST]) {- return {- ...directoryMeta.perspectiveSettings[PerspectiveIDs.LIST],- isLocal: true- };+ return directoryMeta.perspectiveSettings[PerspectiveIDs.LIST];} else {// loading settings for not Proreturn JSON.parse(localStorage.getItem(defaultSettings.settingsKey));@@ -134,6 +131,11 @@ function getSettings(directoryMeta: TS.FileSystemEntryMeta): TS.FolderSettings {}function GridPerspective(props: Props) {+ const isLocal =+ Pro &&+ props.directoryMeta &&+ props.directoryMeta.perspectiveSettings &&+ props.directoryMeta.perspectiveSettings[PerspectiveIDs.LIST];const settings = getSettings(props.directoryMeta);const [mouseX, setMouseX] = useState<number>(undefined);@@ -751,7 +753,7 @@ function GridPerspective(props: Props) {sortBy={sortBy.current}orderBy={orderBy.current}handleSortingMenu={handleSortingMenu}- isLocal={settings && settings.isLocal}+ isLocal={isLocal}resetLocalSettings={() => {Pro.MetaOperations.savePerspectiveSettings(currentDirectoryPath,diff --git a/app/reducers/app.ts b/app/reducers/app.tsindex adc11dc8b..8c2061d7b 100644--- a/app/reducers/app.ts+++ b/app/reducers/app.ts@@ -306,23 +306,18 @@ export default (state: any = initialState, action: any) => {let currentDirectoryFiles: Array<TS.OrderVisibilitySettings> = [];if (action.directoryMeta &&- action.directoryMeta.perspectiveSettings &&- action.directoryMeta.perspectiveSettings[PerspectiveIDs.KANBAN] &&- action.directoryMeta.perspectiveSettings[PerspectiveIDs.KANBAN].files+ action.directoryMeta.customOrder &&+ action.directoryMeta.customOrder.files) {- currentDirectoryFiles =- action.directoryMeta.perspectiveSettings[PerspectiveIDs.KANBAN].files;+ currentDirectoryFiles = action.directoryMeta.customOrder.files;}let currentDirectoryDirs: Array<TS.OrderVisibilitySettings> = [];if (action.directoryMeta &&- action.directoryMeta.perspectiveSettings &&- action.directoryMeta.perspectiveSettings[PerspectiveIDs.KANBAN] &&- action.directoryMeta.perspectiveSettings[PerspectiveIDs.KANBAN].columns+ action.directoryMeta.customOrder &&+ action.directoryMeta.customOrder.folders) {- currentDirectoryDirs =- action.directoryMeta.perspectiveSettings[PerspectiveIDs.KANBAN]- .columns;+ currentDirectoryDirs = action.directoryMeta.customOrder.folders;}return {...state,diff --git a/app/reducers/io-actions.ts b/app/reducers/io-actions.tsindex d497ad4f2..f55b64981 100644--- a/app/reducers/io-actions.ts+++ b/app/reducers/io-actions.ts@@ -351,8 +351,10 @@ const actions = {// TODO try to replace this with <input type="file"if (AppConfig.isElectron) {- return PlatformIO.getFileContentPromise(job[0]).then(fileContent =>- PlatformIO.getPropertiesPromise(filePath)+ // for AWS location getFileContentPromise cannot load with io-objectore+ return import('fs-extra').then(fs => {+ const fileContent = fs.readFileSync(job[0]);+ return PlatformIO.getPropertiesPromise(filePath).then(entryProps => {if (entryProps) {dispatch(@@ -405,9 +407,10 @@ const actions = {}).catch(err => {console.log('Error getting properties ' + err);- })- );+ });+ });}+return undefined;});Promise.all(jobsPromises)@@ -447,25 +450,35 @@ const actions = {const metaFilePath = getMetaFileLocationForFile(file.path,AppConfig.dirSeparator- ).replace(/[/\\]/g, '');+ );+ if (metaFilePath !== undefined) {+ for (let i = 0; i < arrMeta.length; i += 1) {+ const metaFile = arrMeta[i];+ if (+ metaFile.path.replace(/[/\\]/g, '') ===+ metaFilePath.replace(/[/\\]/g, '')+ ) {+ // eslint-disable-next-line no-param-reassign+ file.meta = metaFile.meta;+ }+ }+ }const thumbFilePath = getThumbFileLocationForFile(file.path,AppConfig.dirSeparator- ).replace(/[/\\]/g, '');- for (let i = 0; i < arrMeta.length; i += 1) {- const metaFile = arrMeta[i];- if (metaFile.path.replace(/[/\\]/g, '') === metaFilePath) {- // eslint-disable-next-line no-param-reassign- file.meta = metaFile.meta;- }- }- for (let i = 0; i < arrThumb.length; i += 1) {- const thumbFile = arrThumb[i];- if (thumbFile.path.replace(/[/\\]/g, '') === thumbFilePath) {- // eslint-disable-next-line no-param-reassign- file.thumbPath = PlatformIO.getURLforPath(- thumbFile.thumbPath- );+ );+ if (thumbFilePath !== undefined) {+ for (let i = 0; i < arrThumb.length; i += 1) {+ const thumbFile = arrThumb[i];+ if (+ thumbFile.path.replace(/[/\\]/g, '') ===+ thumbFilePath.replace(/[/\\]/g, '')+ ) {+ // eslint-disable-next-line no-param-reassign+ file.thumbPath = PlatformIO.getURLforPath(+ thumbFile.thumbPath+ );+ }}}if (file.meta) {diff --git a/app/services/utils-io.ts b/app/services/utils-io.tsindex 8b9d57836..a01ab24cb 100644--- a/app/services/utils-io.ts+++ b/app/services/utils-io.ts@@ -873,6 +873,9 @@ export function cleanMetaData(if (metaData.perspectiveSettings) {cleanedMeta.perspectiveSettings = metaData.perspectiveSettings;}+ if (metaData.customOrder) {+ cleanedMeta.customOrder = metaData.customOrder;+ }/*if (metaData.perspectiveSettings) { // clean perspectiveSettings !== defaultSettingsObject.keys(metaData.perspectiveSettings).forEach(perspective => {if (!cleanedMeta.perspectiveSettings) {diff --git a/app/tagspaces.namespace.d.ts b/app/tagspaces.namespace.d.tsindex 2153033cc..d22d2c937 100644--- a/app/tagspaces.namespace.d.ts+++ b/app/tagspaces.namespace.d.ts@@ -139,8 +139,13 @@ export namespace TS {appName: string;appVersion: string;lastUpdated: string;+ customOrder?: CustomOrder;perspectiveSettings?: PerspectiveSettings;}+ interface CustomOrder {+ folders?: Array<OrderVisibilitySettings>;+ files?: Array<OrderVisibilitySettings>;+ }interface HistoryItem {path: string;url: string;@@ -179,9 +184,7 @@ export namespace TS {entrySize?: string;thumbnailMode?: string;gridPageLimit?: number;- isLocal?: boolean;- columns?: Array<OrderVisibilitySettings>;- files?: Array<OrderVisibilitySettings>;+ // isLocal?: boolean;}interface OrderVisibilitySettings {