TagSpaces is an offline, open source, document manager with tagging support
KanBan perspective
stanimirda8beb24b7b7
diff --git a/app/components/FolderContainer.tsx b/app/components/FolderContainer.tsxindex a4b731832..ea4d36a7e 100644--- a/app/components/FolderContainer.tsx+++ b/app/components/FolderContainer.tsx@@ -94,6 +94,16 @@ const TreeVizPerspectiveAsync = props => (</React.Suspense>);+let KanBanPerspective = React.Fragment;+if (Pro && Pro.Perspectives && Pro.Perspectives.KanBanPerspective) {+ KanBanPerspective = Pro.Perspectives.KanBanPerspective;+}+const KanBanPerspectiveAsync = props => (+ <React.Suspense fallback={<LoadingLazy />}>+ <KanBanPerspective {...props} />+ </React.Suspense>+);+const WelcomePanel = React.lazy(() =>import(/* webpackChunkName: "WelcomePanel" */ './WelcomePanel'));@@ -350,6 +360,16 @@ class FolderContainer extends React.Component<Props, State> {/>);}+ if (this.state.currentPerspective === 'kanban') {+ return (+ <KanBanPerspectiveAsync+ directoryContent={this.props.directoryContent}+ currentDirectoryPath={this.props.currentDirectoryPath}+ windowWidth={this.props.windowWidth}+ switchPerspective={this.switchPerspective}+ />+ );+ }// else if (this.state.currentPerspective === 'default') {return (<GridPerspectiveAsyncdiff --git a/app/components/menus/DirectoryMenu.tsx b/app/components/menus/DirectoryMenu.tsxindex 3f0a31665..014eb913e 100644--- a/app/components/menus/DirectoryMenu.tsx+++ b/app/components/menus/DirectoryMenu.tsx@@ -35,6 +35,7 @@ import DefaultPerspectiveIcon from '@material-ui/icons/GridOn';import GalleryPerspectiveIcon from '@material-ui/icons/Camera';import MapiquePerspectiveIcon from '@material-ui/icons/Map';// import TreeVizPerspectiveIcon from '@material-ui/icons/AccountTree';+import KanBanPerspectiveIcon from '@material-ui/icons/AccountTree';import NewFileIcon from '@material-ui/icons/InsertDriveFile';import NewFolderIcon from '@material-ui/icons/CreateNewFolder';import RenameFolderIcon from '@material-ui/icons/FormatTextdirectionLToR';@@ -523,6 +524,12 @@ const DirectoryMenu = (props: Props) => {</ListItemIcon><ListItemText primary="TreeViz Perspective" /></MenuItem> */}+ <MenuItem data-tid="openTreeVizPerspective" onClick={() => switchPerspective('kanban')} title="Switch to kanban visualization perspective">+ <ListItemIcon>+ <KanBanPerspectiveIcon />+ </ListItemIcon>+ <ListItemText primary="KanBan Perspective" />+ </MenuItem><Divider /></div>)}diff --git a/app/services/utils-io.ts b/app/services/utils-io.tsindex afb16d816..b73d31181 100644--- a/app/services/utils-io.ts+++ b/app/services/utils-io.ts@@ -539,14 +539,16 @@ export function findColorForFileEntry(return AppConfig.defaultFolderColor;}let color = AppConfig.defaultFileColor;- supportedFileTypes.map(fileType => {- if (fileType.type.toLowerCase() === fileExtension.toLowerCase()) {- if (fileType.color) {- color = fileType.color;+ if (fileExtension !== undefined) {+ supportedFileTypes.map(fileType => {+ if (fileType.type.toLowerCase() === fileExtension.toLowerCase()) {+ if (fileType.color) {+ color = fileType.color;+ }}- }- return true;- });+ return true;+ });+ }return color;}diff --git a/package.json b/package.jsonindex 8ac78411d..067880d34 100644--- a/package.json+++ b/package.json@@ -260,6 +260,7 @@"pdfjs-dist": "^2.4.456","rc-table": "^7.8.0","react": "^16.13.1",+ "react-beautiful-dnd": "^13.0.0","react-color": "^2.17.3","react-d3-tree": "^1.15.3","react-dnd": "^11.1.3",diff --git a/yarn.lock b/yarn.lockindex bd8badc28..dde0f16c9 100644--- a/yarn.lock+++ b/yarn.lock@@ -4498,6 +4498,13 @@ crypto-random-string@^2.0.0:resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-2.0.0.tgz#ef2a7a966ec11083388369baa02ebead229b30d5"integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA==+css-box-model@^1.2.0:+ version "1.2.1"+ resolved "https://registry.yarnpkg.com/css-box-model/-/css-box-model-1.2.1.tgz#59951d3b81fd6b2074a62d49444415b0d2b4d7c1"+ integrity sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw==+ dependencies:+ tiny-invariant "^1.0.6"+[email protected], css-color-names@^0.0.4:version "0.0.4"resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0"@@ -10097,7 +10104,7 @@ mem@^4.0.0:mimic-fn "^2.0.0"p-is-promise "^2.0.0"-memoize-one@^5.0.0:+memoize-one@^5.0.0, memoize-one@^5.1.1:version "5.1.1"resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.1.1.tgz#047b6e3199b508eaec03504de71229b8eb1d75c0"integrity sha512-HKeeBpWvqiVJD57ZUAsJNm71eHTykffzcLZVYWiVfQeI1rJtuEaS7hQiEpWfVVk18donPwJEcFKIkCmPJNOhHA==@@ -12425,6 +12432,11 @@ quick-lru@^5.1.1:resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932"integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==+raf-schd@^4.0.2:+ version "4.0.2"+ resolved "https://registry.yarnpkg.com/raf-schd/-/raf-schd-4.0.2.tgz#bd44c708188f2e84c810bf55fcea9231bcaed8a0"+ integrity sha512-VhlMZmGy6A6hrkJWHLNTGl5gtgMUm+xfGza6wbwnE914yeQ5Ybm18vgM734RZhMgfw4tacUrWseGZlpUrrakEQ==+raf@^3.4.1:version "3.4.1"resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39"@@ -12515,6 +12527,19 @@ react-addons-test-utils@^15.5.1:resolved "https://registry.yarnpkg.com/react-addons-test-utils/-/react-addons-test-utils-15.6.2.tgz#c12b6efdc2247c10da7b8770d185080a7b047156"integrity sha1-wStu/cIkfBDae4dw0YUICnsEcVY=+react-beautiful-dnd@^13.0.0:+ version "13.0.0"+ resolved "https://registry.yarnpkg.com/react-beautiful-dnd/-/react-beautiful-dnd-13.0.0.tgz#f70cc8ff82b84bc718f8af157c9f95757a6c3b40"+ integrity sha512-87It8sN0ineoC3nBW0SbQuTFXM6bUqM62uJGY4BtTf0yzPl8/3+bHMWkgIe0Z6m8e+gJgjWxefGRVfpE3VcdEg==+ dependencies:+ "@babel/runtime" "^7.8.4"+ css-box-model "^1.2.0"+ memoize-one "^5.1.1"+ raf-schd "^4.0.2"+ react-redux "^7.1.1"+ redux "^4.0.4"+ use-memo-one "^1.1.1"+react-color@^2.17.3:version "2.18.1"resolved "https://registry.yarnpkg.com/react-color/-/react-color-2.18.1.tgz#2cda8cc8e06a9e2c52ad391a30ddad31972472f4"@@ -12629,7 +12654,7 @@ react-image-gallery@^1.0.7:react-swipeable "^5.2.0"resize-observer-polyfill "^1.5.0"-react-is@^16.12.0, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.0, react-is@^16.8.1, react-is@^16.8.6:+react-is@^16.12.0, react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.0, react-is@^16.8.1, react-is@^16.8.6, react-is@^16.9.0:version "16.13.1"resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==@@ -12683,6 +12708,17 @@ react-redux@^5.0.7:react-is "^16.6.0"react-lifecycles-compat "^3.0.0"+react-redux@^7.1.1:+ version "7.2.1"+ resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.1.tgz#8dedf784901014db2feca1ab633864dee68ad985"+ integrity sha512-T+VfD/bvgGTUA74iW9d2i5THrDQWbweXP0AVNI8tNd1Rk5ch1rnMiJkDD67ejw7YBKM4+REvcvqRuWJb7BLuEg==+ dependencies:+ "@babel/runtime" "^7.5.5"+ hoist-non-react-statics "^3.3.0"+ loose-envify "^1.4.0"+ prop-types "^15.7.2"+ react-is "^16.9.0"+react-router-dom@^4.3.1:version "4.3.1"resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-4.3.1.tgz#4c2619fc24c4fa87c9fd18f4fb4a43fe63fbd5c6"@@ -15107,7 +15143,7 @@ timsort@^0.3.0:resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4"integrity sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=-tiny-invariant@^1.0.2:+tiny-invariant@^1.0.2, tiny-invariant@^1.0.6:version "1.1.0"resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.1.0.tgz#634c5f8efdc27714b7f386c35e6760991d230875"integrity sha512-ytxQvrb1cPc9WBEI/HSeYYoGD0kWnGEOR8RY6KomWLBVhqz0RgTwVO9dLrGz7dC+nN9llyI7OKAgRq8Vq4ZBSw==@@ -15708,6 +15744,11 @@ url@^0.11.0:punycode "1.3.2"querystring "0.2.0"+use-memo-one@^1.1.1:+ version "1.1.1"+ resolved "https://registry.yarnpkg.com/use-memo-one/-/use-memo-one-1.1.1.tgz#39e6f08fe27e422a7d7b234b5f9056af313bd22c"+ integrity sha512-oFfsyun+bP7RX8X2AskHNTxu+R3QdE/RC5IefMbqptmACAA/gfol1KDD5KRzPsGMa62sWxGZw+Ui43u6x4ddoQ==+use@^3.1.0:version "3.1.1"resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"