TagSpaces is an offline, open source, document manager with tagging support
cordova fixes
sytolk3709a009240c
diff --git a/app/services/thumbsgenerator.ts b/app/services/thumbsgenerator.tsindex c1797e5c0..55cd7d186 100644--- a/app/services/thumbsgenerator.ts+++ b/app/services/thumbsgenerator.ts@@ -32,7 +32,7 @@ import { Pro } from '../pro';const maxSize = AppConfig.maxThumbSize;const bgColor = AppConfig.thumbBgColor;-const supportedImgs = [+export const supportedImgs = ['jpg','jpeg','jif',diff --git a/app/services/utils-io.ts b/app/services/utils-io.tsindex 0b5218e64..b6f6e6209 100644--- a/app/services/utils-io.ts+++ b/app/services/utils-io.ts@@ -49,6 +49,7 @@ import { locationType, prepareTagForExport } from '-/utils/misc';import {getThumbnailURLPromise,supportedContainers,+ supportedImgs,supportedText,supportedVideos} from '-/services/thumbsgenerator';@@ -112,6 +113,7 @@ export function enhanceDirectoryContent(// !isPDF) {tmbGenerationList.push(enhancedEntry.path);} else if (+ supportedImgs.includes(enhancedEntry.extension) ||supportedContainers.includes(enhancedEntry.extension) ||supportedText.includes(enhancedEntry.extension) ||supportedVideos.includes(enhancedEntry.extension)@@ -446,7 +448,7 @@ export function createDirectoryIndex(let locationID;if (typeof param === 'object' && param !== null) {directoryPath = param.path;- ({locationID} = param);+ ({ locationID } = param);} else {directoryPath = param;}diff --git a/package.json b/package.jsonindex e0a3b4912..1c895644e 100644--- a/package.json+++ b/package.json@@ -56,13 +56,15 @@"package-web-pro": "yarn prepare-web-pro && yarn clean-maps && yarn build-web && zip -r ../builds/tagspaces-pro-web.zip web -xi web/files/**\\* ","prepare-node": "yarn install-ext-node && yarn postinstall-node-check","prepare-web-pro": "yarn version-meta && yarn install-ext-web && yarn postinstall-web-check && rimraf web/node_modules && shx cp -rL app/node_modules/ web && shx cp extensions/tagspacespro/EULA.txt web && node scripts/genswconf.js",- "prepare-cordova": "yarn install-ext-web && yarn postinstall-web-check && rimraf cordova/www/dist && rimraf cordova/www/node_modules && shx cp -rL app/node_modules cordova/www && shx cp LICENSE.txt cordova/www",+ "prepare-cordova": "yarn install-ext-web && yarn postinstall-cordova-check && rimraf cordova/www/dist && rimraf cordova/www/node_modules && shx cp -rL app/node_modules cordova/www && shx cp LICENSE.txt cordova/www","paste-android-linux": "adb shell input text '$(xclip -selection c -o)'","paste-android-macos": "adb shell input text \"'$(pbpaste)'\"","postinstall-node-check": "cross-env PD_PLATFORM=node node scripts/postinstall.js","postinstall-node": "cross-env PD_PLATFORM=node yarn add @tagspaces/tagspaces-platforms","postinstall-web-check": "cross-env PD_PLATFORM=web node scripts/postinstall.js","postinstall-web": "cross-env PD_PLATFORM=web yarn add @tagspaces/tagspaces-platforms",+ "postinstall-cordova-check": "cross-env PD_PLATFORM=cordova node scripts/postinstall.js",+ "postinstall-cordova": "cross-env PD_PLATFORM=cordova yarn add @tagspaces/tagspaces-platforms","clean": "rimraf node_modules && rimraf app/dist","clean-pro": "yarn clean-maps","clean-maps": "rimraf app/dist/**/*.map && rimraf web/dist/**/*.map",@@ -285,7 +287,7 @@"@material-ui/icons": "^4.11.2","@material-ui/lab": "^4.0.0-alpha.57","@material-ui/pickers": "^3.2.10",- "@tagspaces/tagspaces-platforms": "^1.0.11",+ "@tagspaces/tagspaces-platforms": "^1.0.22","aws-amplify": "^3.3.27","aws-sdk": "^2.984.0","babel-polyfill": "^6.26.0",diff --git a/scripts/postinstall.js b/scripts/postinstall.jsindex 29e6dcb8f..c75a7aeb2 100644--- a/scripts/postinstall.js+++ b/scripts/postinstall.js@@ -53,4 +53,21 @@ if (process.env.PD_PLATFORM === 'node') {});});}+} else if (process.env.PD_PLATFORM === 'cordova') {+ if (!isInstalled('@tagspaces-common-cordova')) {+ npm.load(er => {+ if (er) {+ console.log('err:', er);+ return;+ }+ npm.commands.run(['postinstall-cordova'], err => {+ if (err) {+ console.log('err:', err);+ }+ });+ npm.on('log', message => {+ console.log('npm:' + message);+ });+ });+ }}diff --git a/yarn.lock b/yarn.lockindex d257e02b4..4194d15a4 100644--- a/yarn.lock+++ b/yarn.lock@@ -3362,10 +3362,10 @@dependencies:defer-to-connect "^1.0.1"-"@tagspaces/tagspaces-platforms@^1.0.11":- version "1.0.11"- resolved "https://registry.yarnpkg.com/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-1.0.11.tgz#ffeda1694f69c8a9350b336341243f6fedee174f"- integrity sha512-6pI6fhjPfqBHbxQ2LBLGHjvZOWQ4QJF8Sxef8NdjwqkmOKDFOgxs9YqrUG1lDfT5iZhse0hkJZF06yOV9w0SIg==+"@tagspaces/tagspaces-platforms@^1.0.22":+ version "1.0.22"+ resolved "https://registry.yarnpkg.com/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-1.0.22.tgz#111897819144821a6166d1fb3e337d5796ce5c8d"+ integrity sha512-6SuTNQ1eFPEh48u80Vpv7mWOxmOLczp21wM2nIwiqjN1yY0lLrklPXGIimpXeoCTp5S5Bk1DAIGfNqXWvi21Ug=="@testim/chrome-version@^1.0.7":version "1.0.7"