TagSpaces is an offline, open source, document manager with tagging support
Tsn26x - WebDav re-integration (#1572)
Stanimirfaca8990f63a
diff --git a/app/package.json b/app/package.jsonindex 118f29e03..3f0c8d07d 100644--- a/app/package.json+++ b/app/package.json@@ -13,8 +13,6 @@"license": "AGPL-3.0","scripts": {},"dependencies": {- "@tagspaces/tagspaces-ws": "1.2.1",- "@tagspaces/extensions": "1.0.14",- "sharp": "^0.29.3"+ "@tagspaces/extensions": "1.0.14"}}diff --git a/app/reducers/app.ts b/app/reducers/app.tsindex f5bee484d..e99a3ac09 100644--- a/app/reducers/app.ts+++ b/app/reducers/app.ts@@ -934,6 +934,11 @@ export const actions = {getState(),getState().app.currentLocationId);+ /* PlatformIO.enableWebdavSupport({ TODO use this to enable webdav support for location the same like objectstore+ username: 'webdav',+ password: '1234',+ port: 8080+ }); */PlatformIO.listDirectoryPromise(directoryPath,['extractThumbPath', 'extractThumbURL'],diff --git a/app/services/platform-facade.ts b/app/services/platform-facade.tsindex 7d401be58..a3fac236f 100644--- a/app/services/platform-facade.ts+++ b/app/services/platform-facade.ts@@ -22,6 +22,8 @@ import {platformGetDirSeparator,platformEnableObjectStoreSupport,platformDisableObjectStoreSupport,+ platformEnableWebdavSupport,+ platformDisableWebdavSupport,platformWatchDirectory,platformSetLanguage,platformIsWorkerAvailable,@@ -70,6 +72,11 @@ export default class PlatformFacade {static disableObjectStoreSupport = (): void =>platformDisableObjectStoreSupport();+ static enableWebdavSupport = (webDavConfig: any): void =>+ platformEnableWebdavSupport(webDavConfig);++ static disableWebdavSupport = (): void => platformDisableWebdavSupport();+static haveObjectStoreSupport = (): boolean =>platformHaveObjectStoreSupport();diff --git a/app/tagspaces.namespace.d.ts b/app/tagspaces.namespace.d.tsindex 9213bff6d..b65ac64a6 100644--- a/app/tagspaces.namespace.d.ts+++ b/app/tagspaces.namespace.d.ts@@ -21,7 +21,7 @@ export namespace TS {uuid: string;newuuid?: string;name: string;- type: string;+ type: string; // 0 - local; 1 - S3; 2 - amplify; 3 - webdavaccessKeyId?: string;secretAccessKey?: string;sessionToken?: string;diff --git a/app/utils/misc.ts b/app/utils/misc.tsindex 0bee68034..cd6850817 100644--- a/app/utils/misc.ts+++ b/app/utils/misc.ts@@ -23,7 +23,8 @@ import { TS } from '-/tagspaces.namespace';export const locationType = {TYPE_LOCAL: '0',TYPE_CLOUD: '1',- TYPE_AMPLIFY: '2'+ TYPE_AMPLIFY: '2',+ TYPE_WEBDAV: '3'};export function prepareTagGroupForExport(tagGroup: TS.TagGroup): TS.TagGroup {diff --git a/package.json b/package.jsonindex e31253444..ef3b9c7e3 100644--- a/package.json+++ b/package.json@@ -148,7 +148,7 @@"@material-ui/icons": "^4.11.2","@material-ui/lab": "^4.0.0-alpha.60","@material-ui/pickers": "^3.3.10",- "@tagspaces/tagspaces-platforms": "1.2.20",+ "@tagspaces/tagspaces-platforms": "1.3.7","aws-amplify": "^4.3.8","aws-sdk": "^2.1036.0","babel-polyfill": "^6.26.0",diff --git a/scripts/postinstall.js b/scripts/postinstall.jsindex 03e90c4a2..212e17175 100644--- a/scripts/postinstall.js+++ b/scripts/postinstall.js@@ -37,6 +37,10 @@ if (process.env.PD_PLATFORM === 'electron') {if (!isInstalled('@tagspaces/tagspaces-common-aws')) {install = true;}+} else if (process.env.PD_PLATFORM === 'webdav') {+ if (!isInstalled('@tagspaces/tagspaces-common-webdav')) {+ install = true;+ }} else if (process.env.PD_PLATFORM === 'cordova') {if (!isInstalled('@tagspaces-common-cordova')) {install = true;diff --git a/yarn.lock b/yarn.lockindex 771f43377..86ab161a2 100644--- a/yarn.lock+++ b/yarn.lock@@ -4328,10 +4328,10 @@dependencies:defer-to-connect "^1.0.1"-"@tagspaces/[email protected]":- version "1.2.20"- resolved "https://registry.yarnpkg.com/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-1.2.20.tgz#4e481b80a3fbaefcef242a27ce7c3541bd5a7053"- integrity sha512-puOlY3oYdw5ylBSx6qqovTZs7aIGMPT3lEuCfQZ4715+jILU/Ng+kAqgc7QvJ9L10c8LewF4dw5WV6QcqizuTA==+"@tagspaces/[email protected]":+ version "1.3.7"+ resolved "https://registry.yarnpkg.com/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-1.3.7.tgz#e8726f6a1b4cbc88fc9a45e0d0ba34f267251f05"+ integrity sha512-oscSSlKTyGHugtCZm63OVsXV8N+8Ns76AeT8GlxfG/NZRJU3zriCYDTchH1AIVcTrTr9dfddToDwtDdklibE+Q=="@testim/chrome-version@^1.0.7":version "1.0.7"