Skip to content

TagSpaces is an offline, open source, document manager with tagging support

chore: removing cordova branches from the project

Ilian Sapundshievcab71f7b6790
diff --git a/.erb/configs/webpack.config.base.ts b/.erb/configs/webpack.config.base.ts
index 8f214ecbd..8a15c0079 100644
--- a/.erb/configs/webpack.config.base.ts
+++ b/.erb/configs/webpack.config.base.ts
@@ -44,7 +44,7 @@ const configuration: webpack.Configuration = {
// resolution otherwise fails them (broke build:dll and the prod renderer
// build). Lives in the base config so every config that merges it —
// renderer dev/prod, main, and the DLL (which borrows renderer.dev's
- // merged module) — inherits the fix. (cordova/capacitor/web carry their
+ // merged module) — inherits the fix. (capacitor/web carry their
// own equivalent copy.)
{
test: /\.m?js/,
diff --git a/.erb/configs/webpack.config.cordova.dev.ts b/.erb/configs/webpack.config.cordova.dev.ts
deleted file mode 100644
index 8ac2ad70a..000000000
--- a/.erb/configs/webpack.config.cordova.dev.ts
+++ /dev/null
@@ -1,149 +0,0 @@
-/**
- * Build config for cordova development
- */
-
-import HtmlWebpackPlugin from 'html-webpack-plugin';
-import MiniCssExtractPlugin from 'mini-css-extract-plugin';
-import path from 'path';
-import webpack from 'webpack';
-import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
-import merge from 'webpack-merge';
-import baseConfig from './webpack.config.base';
-import webpackPaths from './webpack.paths';
-
-const configuration: webpack.Configuration = {
- cache: false,
- devtool: 'inline-source-map',
- mode: 'development',
- target: 'web',
- entry: path.join(webpackPaths.srcRendererPath, 'index.tsx'),
-
- output: {
- libraryTarget: 'window', // 'window', // 'commonjs2',
- path: path.join(__dirname, '../../cordova/www/dist'),
- publicPath: './dist/',
- filename: 'bundle.js',
- sourceMapFilename: '[file].map',
- },
-
- module: {
- rules: [
- {
- test: /\.css$/,
- use: ['style-loader', 'css-loader'],
- exclude: /\.module\.s?(c|a)ss$/,
- },
- // Extract all .global.css to style.css as is
- // {
- // test: /\.global\.css$/,
- // use: [
- // {
- // loader: MiniCssExtractPlugin.loader,
- // options: {
- // publicPath: './',
- // },
- // },
- // {
- // loader: 'css-loader',
- // options: {
- // sourceMap: true,
- // },
- // },
- // ],
- // },
- // Pipe other styles through css modules and append to style.css
- // {
- // test: /^((?!\.global).)*\.css$/,
- // use: [
- // {
- // loader: MiniCssExtractPlugin.loader,
- // },
- // {
- // loader: 'css-loader',
- // options: {
- // modules: {
- // localIdentName: '[name]__[local]__[hash:base64:5]',
- // },
- // sourceMap: true,
- // },
- // },
- // ],
- // },
- // WOFF Font
- {
- test: /\.(woff|woff2|eot|ttf|otf)$/i,
- type: 'asset/resource',
- generator: {
- filename: 'fonts/[hash][ext][query]',
- },
- },
- // Common Image Formats
- {
- test: /\.(?:ico|gif|png|jpg|jpeg|webp|avif|mp4|webm)$/,
- type: 'asset/resource',
- },
- {
- test: /\.m?js/,
- resolve: {
- fullySpecified: false,
- },
- },
- // Text files
- {
- test: /\.(txt)$/,
- use: 'raw-loader',
- type: 'javascript/auto',
- },
- // SVG
- {
- test: /\.svg$/,
- use: [
- {
- loader: '@svgr/webpack',
- options: {
- prettier: false,
- svgo: false,
- svgoConfig: {
- plugins: [{ removeViewBox: false }],
- },
- titleProp: true,
- ref: true,
- },
- },
- 'file-loader',
- ],
- },
- ],
- },
-
- plugins: [
- new MiniCssExtractPlugin({
- filename: 'style.css',
- }),
-
- new HtmlWebpackPlugin({
- filename: path.join('index.html'),
- template: path.join(webpackPaths.srcRendererPath, 'index.ejs'),
- templateParameters: {
- csp: "connect-src files: *; frame-src 'self' tsfile: *; default-src 'self' ; object-src 'none' ; font-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline' data: blob: ; media-src * blob: ; img-src tsfile: * blob: data: content:;",
- },
- minify: {
- collapseWhitespace: true,
- removeAttributeQuotes: true,
- removeComments: true,
- },
- isBrowser: false,
- env: process.env.NODE_ENV,
- isDevelopment: process.env.NODE_ENV !== 'production',
- nodeModules: webpackPaths.appNodeModulesPath,
- }),
-
- new BundleAnalyzerPlugin({
- analyzerMode:
- process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
- openAnalyzer: process.env.OPEN_ANALYZER === 'true',
- }),
- ],
-};
-
-export default merge(baseConfig, configuration);
diff --git a/.erb/configs/webpack.config.cordova.prod.ts b/.erb/configs/webpack.config.cordova.prod.ts
deleted file mode 100644
index 4a913c4ad..000000000
--- a/.erb/configs/webpack.config.cordova.prod.ts
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- * Build config for cordova production
- */
-
-import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
-import HtmlWebpackPlugin from 'html-webpack-plugin';
-import MiniCssExtractPlugin from 'mini-css-extract-plugin';
-import path from 'path';
-import webpack from 'webpack';
-import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
-import merge from 'webpack-merge';
-import deleteSourceMaps from '../scripts/delete-source-maps';
-import baseConfig from './webpack.config.base';
-import webpackPaths from './webpack.paths';
-
-deleteSourceMaps();
-
-const configuration: webpack.Configuration = {
- devtool: 'source-map',
- mode: 'production',
- target: 'web',
- entry: path.join(webpackPaths.srcRendererPath, 'index.tsx'),
-
- output: {
- libraryTarget: 'window', // 'window', // 'commonjs2',
- path: path.join(__dirname, '../../cordova/www/dist'),
- publicPath: './dist/',
- filename: 'bundle.js',
- },
-
- module: {
- rules: [
- {
- test: /\.css$/,
- use: [MiniCssExtractPlugin.loader, 'css-loader'],
- exclude: /\.module\.s?(c|a)ss$/,
- },
- // Extract all .global.css to style.css as is
- // {
- // test: /\.global\.css$/,
- // use: [
- // {
- // loader: MiniCssExtractPlugin.loader,
- // options: {
- // publicPath: './',
- // },
- // },
- // {
- // loader: 'css-loader',
- // options: {
- // sourceMap: true,
- // },
- // },
- // ],
- // },
- // Pipe other styles through css modules and append to style.css
- // {
- // test: /^((?!\.global).)*\.css$/,
- // use: [
- // {
- // loader: MiniCssExtractPlugin.loader,
- // },
- // {
- // loader: 'css-loader',
- // options: {
- // modules: {
- // localIdentName: '[name]__[local]__[hash:base64:5]',
- // },
- // sourceMap: true,
- // },
- // },
- // ],
- // },
- // WOFF Font
- {
- test: /\.(woff|woff2|eot|ttf|otf)$/i,
- type: 'asset/resource',
- generator: {
- filename: 'fonts/[hash][ext][query]',
- },
- },
- // Common Image Formats
- {
- test: /\.(?:ico|gif|png|jpg|jpeg|webp|avif|mp4|webm)$/,
- type: 'asset/resource',
- },
- {
- test: /\.m?js/,
- resolve: {
- fullySpecified: false,
- },
- },
- // Text files
- {
- test: /\.(txt)$/,
- use: 'raw-loader',
- type: 'javascript/auto',
- },
- // SVG
- {
- test: /\.svg$/,
- use: [
- {
- loader: '@svgr/webpack',
- options: {
- prettier: false,
- svgo: false,
- svgoConfig: {
- plugins: [{ removeViewBox: false }],
- },
- titleProp: true,
- ref: true,
- },
- },
- 'file-loader',
- ],
- },
- ],
- },
-
- optimization: {
- minimizer: process.env.E2E_BUILD
- ? []
- : [
- // For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line
- `...`,
- new CssMinimizerPlugin(),
- ],
- },
-
- plugins: [
- new MiniCssExtractPlugin({
- filename: 'style.css',
- }),
-
- new HtmlWebpackPlugin({
- filename: path.join('index.html'),
- template: path.join(webpackPaths.srcRendererPath, 'index.ejs'),
- templateParameters: {
- csp: "connect-src files: *; frame-src 'self' tsfile: *; default-src 'self' ; object-src 'none' ; font-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline' data: blob: ; media-src * blob: ; img-src tsfile: * blob: data: content:;",
- },
- minify: {
- collapseWhitespace: true,
- removeAttributeQuotes: true,
- removeComments: true,
- },
- isBrowser: false,
- env: process.env.NODE_ENV,
- isDevelopment: process.env.NODE_ENV !== 'production',
- nodeModules: webpackPaths.appNodeModulesPath,
- }),
-
- new BundleAnalyzerPlugin({
- analyzerMode:
- process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
- openAnalyzer: process.env.OPEN_ANALYZER === 'true',
- }),
- ],
-};
-
-export default merge(baseConfig, configuration);
diff --git a/.eslintignore b/.eslintignore
index 4a2fe475b..90356edfc 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -31,7 +31,6 @@ npm-debug.log.*
__snapshots__
extensions
-cordova
capacitor
web
diff --git a/.gitignore b/.gitignore
index 5c9781f18..0094f8939 100644
--- a/.gitignore
+++ b/.gitignore
@@ -48,17 +48,6 @@ main.js.map
.vscode
npm-debug.log.*
-# Cordova files
-cordova/node_modules/*
-cordova/www/*
-!cordova/www/index.html
-
-cordova/platforms/android/.gradle/*
-cordova/platforms/android/CordovaLib/build/*
-cordova/platforms/android/assets/www/*
-cordova/platforms/android/app/src/main/assets/www/*
-cordova/plugins/**/*
-
extensions
test/file-structure
@@ -119,8 +108,6 @@ web/sw-con
/src/renderer/aws-exports.js
/src/renderer/graphql/*
/src/renderer/models/*
-cordova/platforms/ios/www/yarn.lock
-cordova/platforms/ios/www/package.json
junit.xml
test-reports/*
test-results/*
diff --git a/.prettierignore b/.prettierignore
index 0586829a5..ec2486f63 100755
--- a/.prettierignore
+++ b/.prettierignore
@@ -2,7 +2,6 @@ node_modules
public/modules
builds
dll
-cordova
web
web/files
release/app/node_modules
diff --git a/CLAUDE.md b/CLAUDE.md
index 5c6e899b7..8acb67f24 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -112,7 +112,7 @@ tagspaces-common-node (Node.js fs implementation, injected as IO provider)
- **Core logic** lives in `tagspaces-common`. See [../tagspaces-common/CLAUDE.md](../tagspaces-common/CLAUDE.md) for the indexing format (tsi.json + tsft.jsonl), CJK tokenization, PDF extraction details, etc.
- **Renderer integration**: `src/renderer/hooks/LocationIndexContextProvider.tsx` — orchestrates create/load/search. Two code paths:
- **Worker path**: Electron-only. Renderer → IPC → Electron main → HTTP POST to local WS server (pm2-managed). Used when `isWorkerAvailable() && enableWS && !objectStore && !webdav && !nativeMobile`.
- - **Non-worker path** (`createNotWorkerIndex`): Everything else — S3, WebDAV, Cordova, Capacitor, web app, and Electron with WS disabled. Runs in renderer thread.
+ - **Non-worker path** (`createNotWorkerIndex`): Everything else — S3, WebDAV, Capacitor, web app, and Electron with WS disabled. Runs in renderer thread.
- **Search logic** lives in `@tagspaces/tagspaces-search` (pure JS, works on all platforms). The renderer's `src/renderer/services/search.ts` is a thin wrapper.
### Renderer gotchas
@@ -262,11 +262,11 @@ npx playwright test --project=electron-s3 folder.pw.e2e.js
### Structure
-- **Capacitor project**: `capacitor/` (parallel to `cordova/`, both can coexist)
+- **Capacitor project**: `capacitor/` (sole native-mobile target; the legacy `cordova/` build was removed)
- **IO module**: `src/renderer/services/io-capacitor.ts` (was external `@tagspaces/tagspaces-common-capacitor`; moved in-tree to drop the cross-repo symlink dance — single consumer, no other tool depends on it). Has `@ts-nocheck` for now; incremental typing is a future cleanup.
- **Webpack configs**: `.erb/configs/webpack.config.capacitor.prod.ts` / `.dev.ts`
- **Custom plugins**: `capacitor/android/app/src/main/java/org/tagspaces/plugins/` (StoragePermission, IntentHandler)
-- **Platform detection**: `AppConfig.isCapacitor`, `AppConfig.isCapacitorAndroid`, `AppConfig.isCapacitoriOS`, `AppConfig.isNativeMobile` (unified Cordova+Capacitor flag)
+- **Platform detection**: `AppConfig.isCapacitor`, `AppConfig.isCapacitorAndroid`, `AppConfig.isCapacitoriOS`, `AppConfig.isNativeMobile` (Capacitor native-mobile flag)
### Build & Run
diff --git a/README.md b/README.md
index 1f2fa0fbc..09076e1dc 100644
--- a/README.md
+++ b/README.md
@@ -57,7 +57,7 @@ src/
locales/ # Language translation files
node_modules/ # TagSpaces extension modules
-cordova/ # Deprecated Android build
+capacitor/ # Mobile (Android/iOS) build
dll/ # Live reload support for development
docker/ # Docker container setup
internals/ # Flow and ESLint configurations
@@ -131,12 +131,13 @@ The commands will create packages for Windows, Linux, Mac OS and Mac OS with the
> ⚠️ Run npm run build before packaging.
-### 📱 Android Build (Deprecated)
+### 📱 Mobile Build (Capacitor)
+
+Build and run the Android or iOS app via Capacitor:
```bash
-npm run version-meta
-npm run prepare-cordova
-npm run package-android
+npm run run-android-cap
+npm run run-ios-cap
```
### 🌐 Web Version
diff --git a/capacitor/scripts/generate-assets.sh b/capacitor/scripts/generate-assets.sh
index e2226c139..158496d7d 100755
--- a/capacitor/scripts/generate-assets.sh
+++ b/capacitor/scripts/generate-assets.sh
@@ -243,37 +243,6 @@ cat > "$IOS_SPLASH_DIR/Contents.json" << 'SPLASHJSON'
}
SPLASHJSON
-# ============================================================
-# Cordova: Update icons too (if directory exists)
-# ============================================================
-echo ""
-echo "=== Cordova: Icons ==="
-
-CORDOVA_ANDROID="$PROJECT_DIR/../cordova/res/icon/android"
-CORDOVA_IOS="$PROJECT_DIR/../cordova/res/icon/ios"
-
-if [ -d "$CORDOVA_ANDROID" ]; then
- for density_size in mdpi:48 hdpi:72 xhdpi:96 xxhdpi:144 xxxhdpi:192; do
- density="${density_size%%:*}"
- size="${density_size##*:}"
- mkdir -p "$CORDOVA_ANDROID/mipmap-$density"
- $CONVERT "$TMPDIR/icon-1024.png" -resize "${size}x${size}" "$CORDOVA_ANDROID/mipmap-$density/ic_launcher.png"
- done
- echo " Updated Cordova Android icons"
-else
- echo " Skipped (cordova/res not found)"
-fi
-
-if [ -d "$CORDOVA_IOS" ]; then
- $CONVERT "$TMPDIR/icon-1024.png" -resize 57x57 "$CORDOVA_IOS/icon-57.png"
- $CONVERT "$TMPDIR/icon-1024.png" -resize 114x114 "$CORDOVA_IOS/icon-57-2x.png"
- $CONVERT "$TMPDIR/icon-1024.png" -resize 72x72 "$CORDOVA_IOS/icon-72.png"
- $CONVERT "$TMPDIR/icon-1024.png" -resize 144x144 "$CORDOVA_IOS/icon-72-2x.png"
- echo " Updated Cordova iOS icons"
-else
- echo " Skipped (cordova/res not found)"
-fi
-
# ============================================================
echo ""
echo "=== Done! ==="
diff --git a/package.json b/package.json
index 54fd98def..9de731734 100644
--- a/package.json
+++ b/package.json
@@ -35,8 +35,6 @@
"assets:capacitor": "cd capacitor && ./scripts/generate-assets.sh",
"build:capacitor": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.capacitor.prod.ts",
"build:capacitor:dev": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.capacitor.dev.ts",
- "build:cordova": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.cordova.prod.ts",
- "build:cordova:dev": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.cordova.dev.ts",
"build:dll": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.renderer.dev.dll.ts",
"build:main": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.main.prod.ts",
"build:renderer": "cross-env NODE_ENV=production TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.renderer.prod.ts",
@@ -44,17 +42,11 @@
"build:web:dev": "rimraf web/dist && cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.web.dev.ts",
"bump-version": "npm run third-party && cd release/app && yarn version && cd .. && npm run version-meta",
"clean": "npx rimraf node_modules && npx rimraf src/renderer/dist",
- "clean-maps": "npx rimraf --glob release/app/dist/**/*.map && npx rimraf --glob web/dist/*.map && npx rimraf --glob cordova/www/dist/*.map",
+ "clean-maps": "npx rimraf --glob release/app/dist/**/*.map && npx rimraf --glob web/dist/*.map",
"clean-pro-ext": "npx rimraf release/app/node_modules/@tagspacespro",
"copy-web": "npm run install-ext-web-check && rimraf web/modules && shx mkdir -p web/modules/@tagspaces/extensions && shx cp -rL release/app/node_modules/@tagspaces/extensions/* web/modules/@tagspaces/extensions/",
"copy-web-extensions": "shx mkdir -p web/modules/@tagspaces/extensions/arithmetic-player && shx cp -rL web/third-party/extensions/@tagspacesarithmetic-player_1.0.0/* web/modules/@tagspaces/extensions/arithmetic-player/",
"copy-web-pro": "npm run copy-web && npm run prepare-web-pro-ext && shx cp node_modules/@tagspacespro/tagspacespro/EULA.txt web",
- "cordova-add-android": "cd cordova && cordova platform add [email protected] && cd ..",
- "cordova-add-ios": "cd cordova && cordova platform add ios && cd ..",
- "cordova-create-app": "cordova create ./cordova org.tagspaces.iosn TagSpaces",
- "cordova-list-emulators": "cd cordova && cordova run --list --emulator && cd ..",
- "cordova-remove-android": "cd cordova && cordova platform remove android && cd ..",
- "cordova-remove-ios": "cd cordova && cordova platform remove ios && cd ..",
"create-icns": "icnsify -i assets/icon.png -o assets/icon.icns && icnsify -i tagspacespro/resources/iconpro.png -o tagspacespro/resources/iconpro.icns",
"dev": "npm run prepare-node && npm run generate-extensions && npm run link-ext && npm run start",
"dev-open-file": "git apply run-with-args.patch && npm run dev",
@@ -74,7 +66,6 @@
"lint-styles-fix": "npm run --silent lint-styles --fix; exit 0",
"linux-fix-sandbox": "sudo chown root:root node_modules/electron/dist/chrome-sandbox && sudo chmod 4755 node_modules/electron/dist/chrome-sandbox",
"package": "ts-node ./.erb/scripts/clean.js && npm run build && electron-builder build --publish never && npm run build:dll",
- "package-android": "npm run build:cordova && npm run clean-maps && cd cordova && npm install && cordova build --release android",
"package-ci": "npm run postinstall && npm run build && electron-builder --publish always",
"package-linux": "npm run install-ext-node && npm run clean-pro-ext && npm run generate-extensions && ts-node ./.erb/scripts/clean.js && npm run build && npm run clean-maps && electron-builder --linux --config resources/builder.json",
"package-linux-arm64": "npm run install-ext-node && npm run clean-pro-ext && npm run generate-extensions && ts-node ./.erb/scripts/clean.js && npm run build && npm run clean-maps && electron-builder --linux --arm64 --config resources/builder.json",
@@ -105,8 +96,6 @@
"prestart": "cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --config ./.erb/configs/webpack.config.main.dev.ts",
"prepare": "husky install",
"prepare-capacitor": "npm run install-ext-web-check && npm run version-meta && rimraf capacitor/www/dist && rimraf capacitor/www/node_modules && shx cp -rL release/app/node_modules capacitor/www && node scripts/strip-capacitor-natives.js && shx cp LICENSE.txt capacitor/www",
- "prepare-cordova": "npm run install-ext-web-check && rimraf cordova/www/dist && rimraf cordova/www/node_modules && shx cp -rL release/app/node_modules cordova/www && shx cp LICENSE.txt cordova/www",
- "prepare-cordova-pro": "npm run install-ext-web-check && rimraf cordova/www/dist && rimraf cordova/www/node_modules && shx cp -rL release/app/node_modules cordova/www && shx cp node_modules/@tagspacespro/tagspacespro/EULA.txt cordova/www",
"prepare-node": "npm run install-ext-node-check",
"prepare-web": "npm run copy-web && shx cp LICENSE.txt web && npm run build:web && node scripts/genswconf.js && npm run clean-maps",
"prepare-web-pro": "npm run copy-web-pro && npm run build:web && node scripts/genswconf.js && npm run clean-maps",
@@ -115,14 +104,11 @@
"prettier-check": "prettier --check --ignore-path=.prettierignore \"**/*.{js,jsx,json,ts,tsx,yml}\"",
"prettier-format": "prettier --ignore-path=.prettierignore --write \"**/*.{js,jsx,json,ts,tsx,yml}\"",
"rebuild": "electron-rebuild --parallel --types prod,dev,optional --module-dir release/app",
- "run-android": "npm run prepare-cordova && npm run build:cordova && cd cordova && cordova run android && cd ..",
"run-android-cap": "npm run prepare-capacitor && npm run build:capacitor && cd capacitor && npx cap sync android && npx cap run android && cd ..",
"run-android-cap-dev": "npm run prepare-capacitor && npm run build:capacitor:dev && cd capacitor && npx cap sync android && npx cap run android && cd ..",
- "run-android-dev": "npm run prepare-cordova && npm run build:cordova:dev && cd cordova && cordova run android && cd ..",
"run-electron": "npx electron ./release/app/dist/main/main.js",
"run-ios-cap": "npm run prepare-capacitor && npm run build:capacitor && cd capacitor && npx cap sync ios && npx cap run ios && cd ..",
"run-ios-cap-dev": "npm run prepare-capacitor && npm run build:capacitor:dev && cd capacitor && npx cap sync ios && npx cap run ios && cd ..",
- "run-ios-dev": "npm run prepare-cordova && npm run build:cordova:dev && cd cordova && cordova run ios && cd ..",
"run-web": "npm run prepare-web-pro && node scripts/webserver.js",
"run-web-aws": "npm run prepare-web-pro && node scripts/webserver.js",
"run-web-dev": "npm run prepare-web-pro-dev && node scripts/webserver.js",
@@ -134,9 +120,8 @@
"sign-mac-app": "codesign --force --deep --sign - /Applications/TagSpaces.app",
"skip:husky:pre-commit": "node -e \"require('fs').rename('./.git/hooks/pre-commit', './.git/hooks/pre-commit.disabled', function(err) { if (err) console.log(err); console.log('File successfully renamed!') })\"",
"sort-package-json": "npx sort-package-json",
- "source-map": "npm run source-map-app && npm run source-map-web && npm run source-map-cordova",
+ "source-map": "npm run source-map-app && npm run source-map-web",
"source-map-app": "npx source-map-explorer release/app/dist/renderer/*.* --html reports/source-map-app.html",
- "source-map-cordova": "npx source-map-explorer cordova/www/dist/*.* --html reports/source-map-cordova.html",
"source-map-web": "npx source-map-explorer web/dist/*.* --html reports/source-map-web.html",
"start": "ts-node ./.erb/scripts/check-port-in-use.js && npm run prestart && npm run start:renderer",
"start:main": "concurrently -k \"cross-env NODE_ENV=development TS_NODE_TRANSPILE_ONLY=true webpack --watch --config ./.erb/configs/webpack.config.main.dev.ts\" \"electronmon .\"",
@@ -193,7 +178,6 @@
"@mui/x-date-pickers": "9.0.4",
"@tagspaces/tagspaces-common": "4.8.7",
"@tagspaces/tagspaces-common-aws3": "4.8.7",
- "@tagspaces/tagspaces-common-cordova": "4.8.7",
"@tagspaces/tagspaces-indexer": "4.8.7",
"@tagspaces/tagspaces-search": "4.8.7",
"capacitor-plugin-cdv-purchase": "13.17.1",
diff --git a/src/renderer/components/FileView.tsx b/src/renderer/components/FileView.tsx
index ddbf2204f..040c0011e 100644
--- a/src/renderer/components/FileView.tsx
+++ b/src/renderer/components/FileView.tsx
@@ -223,8 +223,7 @@ function FileView(props: Props) {
// stale inset after exit). When fullscreen there, turn the container into a
// fixed, full-viewport overlay above the app chrome instead of relying on the
// :fullscreen pseudo-class. Other platforms use the real Fullscreen API.
- const cssFullscreen =
- isFullscreen && (AppConfig.isCapacitoriOS || AppConfig.isCordovaiOS);
+ const cssFullscreen = isFullscreen && AppConfig.isCapacitoriOS;
// `position: fixed` is contained — not viewport-relative — by any ancestor
// with `contain`/`transform`/`filter`/`perspective`/`will-change` (the
diff --git a/src/renderer/components/dialogs/AboutDialog.tsx b/src/renderer/components/dialogs/AboutDialog.tsx
index 5948f58f4..abfa3beb2 100644
--- a/src/renderer/components/dialogs/AboutDialog.tsx
+++ b/src/renderer/components/dialogs/AboutDialog.tsx
@@ -75,9 +75,9 @@ function AboutDialog(props: Props) {
if (updateAvailable) {
// On mobile the app is updated through the store, so route there
// instead of the desktop downloads page.
- if (AppConfig.isCapacitoriOS || AppConfig.isCordovaiOS) {
+ if (AppConfig.isCapacitoriOS) {
openURLExternally(Links.links.appStoreApp, true);
- } else if (AppConfig.isCapacitorAndroid || AppConfig.isCordovaAndroid) {
+ } else if (AppConfig.isCapacitorAndroid) {
openURLExternally(Links.links.playStoreApp, true);
} else {
openURLExternally(Links.links.downloadURL, true);
diff --git a/src/renderer/components/dialogs/components/LocalForm.tsx b/src/renderer/components/dialogs/components/LocalForm.tsx
index 01646c445..f506f8caa 100644
--- a/src/renderer/components/dialogs/components/LocalForm.tsx
+++ b/src/renderer/components/dialogs/components/LocalForm.tsx
@@ -138,7 +138,7 @@ function LocalForm(props: Props) {
}}
label={t('core:createLocationPath') + ' *'}
/>
- {(AppConfig.isCordovaAndroid || AppConfig.isCapacitorAndroid) && (
+ {AppConfig.isCapacitorAndroid && (
<FormHelperText>
Examples: sdcard/DCIM, sdcard/Downloads or /storage/899D-1617 for
ext. sd-card
diff --git a/src/renderer/hooks/FullScreenContextProvider.tsx b/src/renderer/hooks/FullScreenContextProvider.tsx
index cd1334c70..01b7683d6 100644
--- a/src/renderer/hooks/FullScreenContextProvider.tsx
+++ b/src/renderer/hooks/FullScreenContextProvider.tsx
@@ -42,7 +42,7 @@ export const FullScreenContextProvider = ({
// at all: we just flip `isFullscreen` and FileView styles its container as a
// fixed, full-viewport overlay (CSS fullscreen). No native frame change → no
// inset bug. Everywhere else keeps the real Fullscreen API via fscreen.
- const useCssFullscreen = AppConfig.isCapacitoriOS || AppConfig.isCordovaiOS;
+ const useCssFullscreen = AppConfig.isCapacitoriOS;
const toggleFullScreen = useCallback(
(element: HTMLDivElement) => {
diff --git a/src/renderer/hooks/IOActionsContextProvider.tsx b/src/renderer/hooks/IOActionsContextProvider.tsx
index c844e6055..acb91c326 100644
--- a/src/renderer/hooks/IOActionsContextProvider.tsx
+++ b/src/renderer/hooks/IOActionsContextProvider.tsx
@@ -1325,13 +1325,13 @@ export const IOActionsContextProvider = ({
}
// Path-based upload only works where the platform attaches a real native
// path to each browser File object: Electron sets it via
- // `ipcRenderer.getPathForFile`, and the Cordova file plugin populates it.
+ // `ipcRenderer.getPathForFile`.
// Capacitor's `<input type="file">` returns standard browser File objects
// with `file.path === undefined`, so it must take the FileReader →
// ArrayBuffer → saveBinaryFilePromise path below (which uses Uint8Array
// — make sure `blobToBase64` in io-capacitor.ts handles ArrayBuffer.isView,
// otherwise the writes silently produce garbage).
- if (AppConfig.isElectron || AppConfig.isCordovaiOS) {
+ if (AppConfig.isElectron) {
return uploadFiles(
files.map((f) => f.path),
targetPath,
diff --git a/src/renderer/hooks/LocationIndexContextProvider.tsx b/src/renderer/hooks/LocationIndexContextProvider.tsx
index 6eb187966..3879ace66 100644
--- a/src/renderer/hooks/LocationIndexContextProvider.tsx
+++ b/src/renderer/hooks/LocationIndexContextProvider.tsx
@@ -1101,7 +1101,7 @@ export const LocationIndexContextProvider = ({
}
/**
- * persistIndex based on location - used for S3 and cordova only
+ * persistIndex based on location - used for S3 and Capacitor only
* for native used common-platform/indexer.js -> persistIndex instead
* @param param
* @param directoryIndex
diff --git a/src/renderer/perspectives/grid/components/GridCell.tsx b/src/renderer/perspectives/grid/components/GridCell.tsx
index 3b2fac97e..fc8af8099 100644
--- a/src/renderer/perspectives/grid/components/GridCell.tsx
+++ b/src/renderer/perspectives/grid/components/GridCell.tsx
@@ -388,7 +388,7 @@ function GridCell(props: Props) {
const handleCellClick = useCallback(
(event: React.MouseEvent) => {
event.stopPropagation();
- AppConfig.isCordovaiOS || AppConfig.isCapacitoriOS
+ AppConfig.isCapacitoriOS
? handleGridCellDblClick(event, fsEntry)
: handleGridCellClick(event, fsEntry);
},
diff --git a/src/renderer/perspectives/list/components/RowCell.tsx b/src/renderer/perspectives/list/components/RowCell.tsx
index eca037383..08e0cb815 100644
--- a/src/renderer/perspectives/list/components/RowCell.tsx
+++ b/src/renderer/perspectives/list/components/RowCell.tsx
@@ -279,7 +279,7 @@ function RowCell(props: Props) {
const handlePaperClick = useCallback(
(event: React.MouseEvent) => {
event.stopPropagation();
- AppConfig.isCordovaiOS || AppConfig.isCapacitoriOS
+ AppConfig.isCapacitoriOS
? handleGridCellDblClick(event, fsEntry)
: handleGridCellClick(event, fsEntry);
},
diff --git a/src/renderer/services/iosScrollGuard.ts b/src/renderer/services/iosScrollGuard.ts
index ec6db2179..da8715e43 100644
--- a/src/renderer/services/iosScrollGuard.ts
+++ b/src/renderer/services/iosScrollGuard.ts
@@ -30,10 +30,10 @@ import AppConfig from '-/AppConfig';
*
* This snaps the document back to the top whenever it drifts, but deliberately
* NOT while a field is being edited, so we don't fight iOS scrolling a focused
- * input into view. iOS-only (Capacitor or Cordova); a no-op everywhere else.
+ * input into view. iOS-only (Capacitor); a no-op everywhere else.
*/
export function installIosScrollGuard(): void {
- if (!(AppConfig.isCapacitoriOS || AppConfig.isCordovaiOS)) return;
+ if (!AppConfig.isCapacitoriOS) return;
const isEditing = (): boolean => {
const el = document.activeElement as HTMLElement | null;
diff --git a/src/renderer/services/thumbsgenerator.ts b/src/renderer/services/thumbsgenerator.ts
index 5ee01a6c7..93b172ad1 100644
--- a/src/renderer/services/thumbsgenerator.ts
+++ b/src/renderer/services/thumbsgenerator.ts
@@ -439,7 +439,7 @@ export async function generateImageThumbnail(
// --- STANDARD IMAGE LOGIC ---
if (AppConfig.isNativeMobile) {
- objectURL = await cordovaCreateObjectURL(blob);
+ objectURL = await mobileCreateObjectURL(blob);
} else {
objectURL = URL.createObjectURL(blob);
}
@@ -468,7 +468,7 @@ export async function generateImageThumbnail(
}
}
-function cordovaCreateObjectURL(blob): Promise<string> {
+function mobileCreateObjectURL(blob): Promise<string> {
return new Promise((resolve) => {
const reader = new FileReader();
reader.onload = function (event) {
diff --git a/src/renderer/services/utils-io.ts b/src/renderer/services/utils-io.ts
index 1e3320a95..98bc19851 100644
--- a/src/renderer/services/utils-io.ts
+++ b/src/renderer/services/utils-io.ts
@@ -486,9 +486,9 @@ export function getLastVersionPromise(signal?: AbortSignal): Promise<string> {
// descriptor and Android to the Linux one (the isAndroid branch was dead).
if (AppConfig.isWeb) {
versionFile = 'tagspaces-pro-web.json';
- } else if (AppConfig.isCapacitoriOS || AppConfig.isCordovaiOS) {
+ } else if (AppConfig.isCapacitoriOS) {
versionFile = 'tagspaces-' + proText + 'ios.json';
- } else if (AppConfig.isCapacitorAndroid || AppConfig.isCordovaAndroid) {
+ } else if (AppConfig.isCapacitorAndroid) {
versionFile = 'tagspaces-' + proText + 'android.json';
} else if (AppConfig.isWin) {
versionFile =
@@ -926,7 +926,7 @@ export function openUrl(url: string): void {
const ioAPI = require('-/services/io-capacitor');
ioAPI.openUrl(url);
} else {
- // web or cordova
+ // web
openUrlForWeb(url);
}
}
@@ -1187,9 +1187,6 @@ export function getDevicePaths(): Promise<any> {
} else if (AppConfig.isCapacitor) {
const ioAPI = require('-/services/io-capacitor');
return ioAPI.getDevicePaths();
- } else if (AppConfig.isCordova) {
- const ioAPI = require('@tagspaces/tagspaces-common-cordova');
- return ioAPI.getDevicePaths();
} else {
console.log('getDevicePaths not supported');
return Promise.resolve(undefined);
@@ -1283,74 +1280,32 @@ export function downloadFile(
return ioAPI.downloadFile(fileName, fileUrl);
}
- if (AppConfig.isNativeMobile) {
- if (fileUrl) {
- const downloadCordova = (uri, filename) => {
- const { Downloader } = window.plugins;
-
- const downloadSuccessCallback = (result) => {
- // result is an object
- /* {
- path: "file:///storage/sdcard0/documents/My Pdf.pdf", // Returns full file path
- file: "My Pdf.pdf", // Returns Filename
- folder: "documents" // Returns folder name
- } */
- console.log(result.file); // My Pdf.pdf
- };
-
- const downloadErrorCallback = (error) => {
- console.log(error);
- };
-
- const options = {
- title: 'Downloading File:' + filename, // Download Notification Title
- url: uri, // File Url
- path: filename, // The File Name with extension
- description: 'The file is downloading', // Download description Notification String
- visible: true, // This download is visible and shows in the notifications while in progress and after completion.
- folder: 'documents', // Folder to save the downloaded file, if not exist it will be created
- };
-
- Downloader.download(
- options,
- downloadSuccessCallback,
- downloadErrorCallback,
- );
- };
- downloadCordova(fileUrl, entryName);
+ const downloadLink = document.getElementById('downloadFile');
+ if (downloadLink) {
+ if (AppConfig.isWeb) {
+ // eslint-disable-next-line no-restricted-globals
+ const { protocol } = location;
+ // eslint-disable-next-line no-restricted-globals
+ const { hostname } = location;
+ // eslint-disable-next-line no-restricted-globals
+ const { port } = location;
+ const link = `${protocol}//${hostname}${
+ port !== '' ? `:${port}` : ''
+ }/${filePath}`;
+ downloadLink.setAttribute('href', link);
} else {
- console.log('Can only download HTTP/HTTPS URIs');
- return -1;
- //showNotification(t('core:cantDownloadLocalFile'));
+ downloadLink.setAttribute('href', `file:///${filePath}`);
}
- } else {
- const downloadLink = document.getElementById('downloadFile');
- if (downloadLink) {
- if (AppConfig.isWeb) {
- // eslint-disable-next-line no-restricted-globals
- const { protocol } = location;
- // eslint-disable-next-line no-restricted-globals
- const { hostname } = location;
- // eslint-disable-next-line no-restricted-globals
- const { port } = location;
- const link = `${protocol}//${hostname}${
- port !== '' ? `:${port}` : ''
- }/${filePath}`;
- downloadLink.setAttribute('href', link);
- } else {
- downloadLink.setAttribute('href', `file:///${filePath}`);
- }
-
- if (fileUrl) {
- // mostly the s3 case
- downloadLink.setAttribute('target', '_blank');
- downloadLink.setAttribute('href', fileUrl);
- }
- downloadLink.setAttribute('download', fileName); // works only for same origin
- downloadLink.click();
- return 0;
+ if (fileUrl) {
+ // mostly the s3 case
+ downloadLink.setAttribute('target', '_blank');
+ downloadLink.setAttribute('href', fileUrl);
}
+
+ downloadLink.setAttribute('download', fileName); // works only for same origin
+ downloadLink.click();
+ return 0;
}
return 1;
}
@@ -1361,9 +1316,6 @@ export function selectDirectoryDialog(): Promise<any> {
} else if (AppConfig.isCapacitor) {
const ioAPI = require('-/services/io-capacitor');
return ioAPI.selectDirectoryDialog();
- } else if (AppConfig.isCordova) {
- const ioAPI = require('@tagspaces/tagspaces-common-cordova');
- return ioAPI.selectDirectoryDialog();
}
return Promise.reject(new Error('selectDirectoryDialog: not implemented'));
}
diff --git a/src/renderer/tagspaces.d.ts b/src/renderer/tagspaces.d.ts
index 92be67d90..d1657f765 100644
--- a/src/renderer/tagspaces.d.ts
+++ b/src/renderer/tagspaces.d.ts
@@ -70,9 +70,6 @@ declare interface Window {
ExtAutoSaveEnabled?: boolean;
ExtAI?: ExternalAI;
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: any;
- plugins?: any; // needed for Cordova
- resolveLocalFileSystemURL?: any; // needed for Cordova
- device?: any; // needed for Cordova
ExtSupportedFileTypes?: Array<any>;
ExtExtensionsFound?: Array<any>;
ExtSearchTypeGroups?: any;
diff --git a/src/renderer/utils/CommonLocation.ts b/src/renderer/utils/CommonLocation.ts
index 9136cc900..8e7b8bb17 100644
--- a/src/renderer/utils/CommonLocation.ts
+++ b/src/renderer/utils/CommonLocation.ts
@@ -18,7 +18,6 @@ import { getUuid, loadJSONString } from '@tagspaces/tagspaces-common/utils-io';
import { getFulfilledResults, getMimeType } from '-/services/utils-io';
import { TS } from '-/tagspaces.namespace';
import { offlineRejectionIfRemote } from '-/utils/OfflineError';
-import * as cordovaIO from '@tagspaces/tagspaces-common-cordova';
import * as capacitorIO from '-/services/io-capacitor';
/**
@@ -121,8 +120,6 @@ export class CommonLocation implements TS.Location {
// TODO impl
} else if (AppConfig.isCapacitor) {
this.ioAPI = capacitorIO;
- } else if (AppConfig.isCordova) {
- this.ioAPI = cordovaIO;
}
}
@@ -1009,10 +1006,8 @@ export class CommonLocation implements TS.Location {
shareFiles = (files: Array<string>): void => {
if (AppConfig.isCapacitor) {
capacitorIO.shareFiles(files);
- } else if (AppConfig.isCordova) {
- cordovaIO.shareFiles(files);
} else {
- console.log('shareFiles is implemented in Cordova/Capacitor only.');
+ console.log('shareFiles is implemented in Capacitor only.');
}
};