TagSpaces is an offline, open source, document manager with tagging support
Script for importing kanban boards as files (#1757)
Stanimir289882fb6d00
diff --git a/app/containers/MainPage.tsx b/app/containers/MainPage.tsxindex 9073f83a8..3ad4b2991 100644--- a/app/containers/MainPage.tsx+++ b/app/containers/MainPage.tsx@@ -68,6 +68,7 @@ import {getOpenedFiles,OpenedEntry,isDeleteMultipleEntriesDialogOpened,+ isImportKanBanDialogOpened,getSelectedEntries,currentUser,isLocationDialogOpened@@ -88,6 +89,7 @@ import listen from '-/containers/RendererListener';import { actions as LocationIndexActions } from '-/reducers/location-index';import MoveOrCopyFilesDialog from '-/components/dialogs/MoveOrCopyFilesDialog';import PlatformIO from '-/services/platform-facade';+import { Pro } from '-/pro';const drawerWidth = 320;const body = document.getElementsByTagName('body')[0];@@ -96,6 +98,8 @@ const bufferedLeftSplitResize = buffer({id: 'buffered-leftsplit-resize'});+const KanBanImportDialog = Pro && Pro.UI ? Pro.UI.KanBanImportDialog : false;+const styles: any = (theme: any) => ({content: {height: '100%',@@ -159,6 +163,7 @@ interface Props {toggleSettingsDialog: () => void; // needed by electron-menustoggleKeysDialog: () => void; // needed by electron-menustoggleLicenseDialog: () => void; // needed by electron-menus+ toggleImportKanBanDialog: () => void;toggleThirdPartyLibsDialog: () => void; // neede by electron-menustoggleAboutDialog: () => void; // needed by electron-menustoggleLocationDialog: () => void; // needed by electron-menus@@ -202,6 +207,7 @@ interface Props {) => any;onUploadProgress: (progress: Progress, response: any) => void;isDeleteMultipleEntriesDialogOpened: boolean;+ isImportKanBanDialogOpened: boolean;toggleDeleteMultipleEntriesDialog: () => void;selectedEntries: Array<any>;deleteFile: (path: string) => void;@@ -710,6 +716,12 @@ function MainPage(props: Props) {onClose={toggleSettingsDialog}/>)}+ {KanBanImportDialog && props.selectedEntries[0] && (+ <KanBanImportDialog+ open={props.isImportKanBanDialogOpened}+ onClose={props.toggleImportKanBanDialog}+ />+ )}{props.isDeleteMultipleEntriesDialogOpened && (<ConfirmDialogopen={props.isDeleteMultipleEntriesDialogOpened}@@ -843,6 +855,7 @@ function mapStateToProps(state) {isDeleteMultipleEntriesDialogOpened: isDeleteMultipleEntriesDialogOpened(state),+ isImportKanBanDialogOpened: isImportKanBanDialogOpened(state),selectedEntries: getSelectedEntries(state),user: currentUser(state)};@@ -867,6 +880,7 @@ function mapDispatchToProps(dispatch) {toggleSettingsDialog: AppActions.toggleSettingsDialog,toggleKeysDialog: AppActions.toggleKeysDialog,toggleLicenseDialog: AppActions.toggleLicenseDialog,+ toggleImportKanBanDialog: AppActions.toggleImportKanBanDialog,toggleThirdPartyLibsDialog: AppActions.toggleThirdPartyLibsDialog,toggleAboutDialog: AppActions.toggleAboutDialog,toggleLocationDialog: AppActions.toggleLocationDialog,@@ -930,6 +944,8 @@ const areEqual = (prevProp, nextProp) =>prevProp.isThirdPartyLibsDialogOpened &&nextProp.isUploadProgressDialogOpened ===prevProp.isUploadProgressDialogOpened &&+ nextProp.isImportKanBanDialogOpened ===+ prevProp.isImportKanBanDialogOpened &&JSON.stringify(nextProp.selectedEntries) ===JSON.stringify(prevProp.selectedEntries) &&JSON.stringify(nextProp.openedFiles) === JSON.stringify(prevProp.openedFiles);diff --git a/app/reducers/app.ts b/app/reducers/app.tsindex be5a6a592..813efe4b1 100644--- a/app/reducers/app.ts+++ b/app/reducers/app.ts@@ -113,6 +113,8 @@ export const types = {TOGGLE_CREATE_FILE_DIALOG: 'APP/TOGGLE_CREATE_FILE_DIALOG',TOGGLE_DELETE_MULTIPLE_ENTRIES_DIALOG:'APP/TOGGLE_DELETE_MULTIPLE_ENTRIES_DIALOG',+ TOGGLE_IMPORT_KANBAN_DIALOG:+ 'APP/TOGGLE_IMPORT_KANBAN_DIALOG',TOGGLE_UPLOAD_DIALOG: 'APP/TOGGLE_UPLOAD_DIALOG',CLEAR_UPLOAD_DIALOG: 'APP/CLEAR_UPLOAD_DIALOG',TOGGLE_PROGRESS_DIALOG: 'APP/TOGGLE_PROGRESS_DIALOG',@@ -217,6 +219,7 @@ export const initialState = {thirdPartyLibsDialogOpened: false,settingsDialogOpened: false,createDirectoryDialogOpened: false,+ importKanBanDialogOpened: false,// lastSelectedEntry: null,selectedEntries: [],isEntryInFullWidth: false,@@ -407,6 +410,12 @@ export default (state: any = initialState, action: any) => {deleteMultipleEntriesDialogOpened: !state.deleteMultipleEntriesDialogOpened};}+ case types.TOGGLE_IMPORT_KANBAN_DIALOG: {+ return {+ ...state,+ importKanBanDialogOpened: !state.importKanBanDialogOpened+ };+ }case types.TOGGLE_LICENSE_DIALOG: {return { ...state, licenseDialogOpened: !state.licenseDialogOpened };}@@ -938,6 +947,9 @@ export const actions = {toggleDeleteMultipleEntriesDialog: () => ({type: types.TOGGLE_DELETE_MULTIPLE_ENTRIES_DIALOG}),+ toggleImportKanBanDialog: () => ({+ type: types.TOGGLE_IMPORT_KANBAN_DIALOG+ }),toggleUploadDialog: () => ({type: types.TOGGLE_UPLOAD_DIALOG}),@@ -2455,6 +2467,8 @@ export const isCreateFileDialogOpened = (state: any) =>state.app.createFileDialogOpened;export const isDeleteMultipleEntriesDialogOpened = (state: any) =>state.app.deleteMultipleEntriesDialogOpened;+export const isImportKanBanDialogOpened = (state: any) =>+ state.app.importKanBanDialogOpened;export const isUploadDialogOpened = (state: any) =>state.app.uploadDialogOpened;export const isOpenLinkDialogOpened = (state: any) =>diff --git a/app/tagspaces.namespace.d.ts b/app/tagspaces.namespace.d.tsindex e6e97a125..cbb4706a0 100644--- a/app/tagspaces.namespace.d.ts+++ b/app/tagspaces.namespace.d.ts@@ -113,7 +113,7 @@ export namespace TS {name: string;isFile: boolean;isNewFile?: boolean;- extension: string;+ extension?: string;thumbPath?: string;color?: string;perspective?: string;