Skip to content

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

create tab for links (#2215)

Stanimir5d020601e243
diff --git a/package-lock.json b/package-lock.json
index fc2972719..64f61b08b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -19,10 +19,10 @@
"@mui/lab": "6.0.0-beta.14",
"@mui/material": "^6.1.6",
"@mui/x-date-pickers": "^7.22.1",
- "@tagspaces/tagspaces-common": "4.5.40",
- "@tagspaces/tagspaces-common-aws3": "4.5.40",
- "@tagspaces/tagspaces-common-cordova": "4.5.40",
- "@tagspaces/tagspaces-indexer": "4.5.40",
+ "@tagspaces/tagspaces-common": "4.5.43",
+ "@tagspaces/tagspaces-common-aws3": "4.5.43",
+ "@tagspaces/tagspaces-common-cordova": "4.5.43",
+ "@tagspaces/tagspaces-indexer": "4.5.43",
"@tagspaces/tagspaces-md": "4.5.38",
"aws-amplify": "^4.3.8",
"classnames": "^2.3.1",
@@ -15597,9 +15597,9 @@
}
},
"node_modules/@tagspaces/tagspaces-common": {
- "version": "4.5.40",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.5.40.tgz",
- "integrity": "sha512-Efa+7DE/NMrHJqb24lndn5RF2RUWutGiENyVmzskHBb2N74Tkzh594+9yg7F2MlPjOHfJtPTNsb7eozDemBjLA==",
+ "version": "4.5.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.5.43.tgz",
+ "integrity": "sha512-rP/o6UUajKXqHfYs0Bg/xOsEEq7V7HproXQQSY6ON4NTF70KwsfSKnb2n2/xpkAm8FwPmZ+PTyMmGAKYBq/RUw==",
"license": "MIT",
"dependencies": {
"dompurify": "^3.2.0",
@@ -15612,25 +15612,25 @@
}
},
"node_modules/@tagspaces/tagspaces-common-aws3": {
- "version": "4.5.40",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-aws3/-/tagspaces-common-aws3-4.5.40.tgz",
- "integrity": "sha512-PVvTs0om606IockiP9wq3c/evn8XPifSHF3UffCpNf9Ur0UarukcigTRZW5iLp9pEv2ltACU1SlmtArqe6eCCA==",
+ "version": "4.5.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-aws3/-/tagspaces-common-aws3-4.5.43.tgz",
+ "integrity": "sha512-92bvNjQwyYwSuEx54JUPjif2vokGt4c76iwOuv/R53xi00UJIIMQVBmtNMziVXP6STikpu54CZR1XXJ/dlvHvQ==",
"license": "MIT",
"dependencies": {
"@aws-sdk/client-s3": "^3.665.0",
"@aws-sdk/lib-storage": "^3.665.0",
"@aws-sdk/s3-request-presigner": "^3.665.0",
- "@tagspaces/tagspaces-common": "^4.5.40",
+ "@tagspaces/tagspaces-common": "^4.5.43",
"crypto-js": "^4.2.0"
}
},
"node_modules/@tagspaces/tagspaces-common-cordova": {
- "version": "4.5.40",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-cordova/-/tagspaces-common-cordova-4.5.40.tgz",
- "integrity": "sha512-cZwRYUPMIduu1mmFo4Tk+RXJdoyHM0fTKI/pDU+w+fInIGCI8TR6RB3P8OwYLgfLvsKkJwhGbxQE1xeroItKiw==",
+ "version": "4.5.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-cordova/-/tagspaces-common-cordova-4.5.43.tgz",
+ "integrity": "sha512-7EbMZH6I8sQppJac8lYwOa7c6adAtnMkySoeTOwGlbcDgcgxBHB9/RVO4wJnmW2wXvNLiNCQczJ+G6N69ltL+w==",
"license": "MIT",
"dependencies": {
- "@tagspaces/tagspaces-common": "^4.5.40"
+ "@tagspaces/tagspaces-common": "^4.5.43"
}
},
"node_modules/@tagspaces/tagspaces-common/node_modules/agent-base": {
@@ -15833,12 +15833,12 @@
}
},
"node_modules/@tagspaces/tagspaces-indexer": {
- "version": "4.5.40",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.5.40.tgz",
- "integrity": "sha512-z5YaP9x97xIrwsJmuyc3vtT95NhH2k40D7j+8j17XV0dcbRh8Yx8l2cmYGZQapGaAtbquMDM3z82pM930MVc/w==",
+ "version": "4.5.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.5.43.tgz",
+ "integrity": "sha512-xUg1o67w3zUWVQvBUrCn0Dm0C+lIk4fgoqudUtO2jfMjCrqvDuNI7IQ2/0gn1BKzlS05dXjAYh5DII6Oe1uRFA==",
"license": "MIT",
"dependencies": {
- "@tagspaces/tagspaces-common": "^4.5.40"
+ "@tagspaces/tagspaces-common": "^4.5.43"
}
},
"node_modules/@tagspaces/tagspaces-md": {
diff --git a/package.json b/package.json
index 787e78837..b59f87fd6 100644
--- a/package.json
+++ b/package.json
@@ -166,10 +166,10 @@
"@mui/lab": "6.0.0-beta.14",
"@mui/material": "^6.1.6",
"@mui/x-date-pickers": "^7.22.1",
- "@tagspaces/tagspaces-common": "4.5.40",
- "@tagspaces/tagspaces-common-aws3": "4.5.40",
- "@tagspaces/tagspaces-common-cordova": "4.5.40",
- "@tagspaces/tagspaces-indexer": "4.5.40",
+ "@tagspaces/tagspaces-common": "4.5.43",
+ "@tagspaces/tagspaces-common-aws3": "4.5.43",
+ "@tagspaces/tagspaces-common-cordova": "4.5.43",
+ "@tagspaces/tagspaces-indexer": "4.5.43",
"@tagspaces/tagspaces-md": "4.5.38",
"aws-amplify": "^4.3.8",
"classnames": "^2.3.1",
diff --git a/release/app/package-lock.json b/release/app/package-lock.json
index 729613c26..1472740ea 100644
--- a/release/app/package-lock.json
+++ b/release/app/package-lock.json
@@ -12,8 +12,8 @@
"dependencies": {
"@elife/pm2": "3.6.1",
"@tagspaces/extensions": "1.0.146",
- "@tagspaces/tagspaces-common-node": "4.5.40",
- "@tagspaces/tagspaces-ws": "4.5.40",
+ "@tagspaces/tagspaces-common-node": "4.5.43",
+ "@tagspaces/tagspaces-ws": "4.5.43",
"sharp": "0.32.6",
"ws": "8.16.0"
},
@@ -43,9 +43,9 @@
}
},
"node_modules/@tagspaces/tagspaces-common": {
- "version": "4.5.40",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.5.40.tgz",
- "integrity": "sha512-Efa+7DE/NMrHJqb24lndn5RF2RUWutGiENyVmzskHBb2N74Tkzh594+9yg7F2MlPjOHfJtPTNsb7eozDemBjLA==",
+ "version": "4.5.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.5.43.tgz",
+ "integrity": "sha512-rP/o6UUajKXqHfYs0Bg/xOsEEq7V7HproXQQSY6ON4NTF70KwsfSKnb2n2/xpkAm8FwPmZ+PTyMmGAKYBq/RUw==",
"dependencies": {
"dompurify": "^3.2.0",
"dotenv": "^16.0.2",
@@ -57,22 +57,22 @@
}
},
"node_modules/@tagspaces/tagspaces-common-node": {
- "version": "4.5.40",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-node/-/tagspaces-common-node-4.5.40.tgz",
- "integrity": "sha512-GYQ+WJI9Nx/x7rUo0lIukupFox80Nb8c1zbScEnrO+Hh4eL9KQYYTgB7kU7Ume/1Rn0QIYiV7eURjog4R71UTQ==",
+ "version": "4.5.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-node/-/tagspaces-common-node-4.5.43.tgz",
+ "integrity": "sha512-bUwOM7ERUEw99A+rs2TxPzU1nliB9JO0H6kRfTbQCIej1JtXOa245Sp2xFPdJ3/vNd4BpR8aMzEPlb6bVHVTNA==",
"dependencies": {
- "@tagspaces/tagspaces-common": "^4.5.40",
+ "@tagspaces/tagspaces-common": "^4.5.43",
"adm-zip": "0.5.10",
"fs-extra": "^10.0.0",
"klaw": "^4.1.0"
}
},
"node_modules/@tagspaces/tagspaces-indexer": {
- "version": "4.5.40",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.5.40.tgz",
- "integrity": "sha512-z5YaP9x97xIrwsJmuyc3vtT95NhH2k40D7j+8j17XV0dcbRh8Yx8l2cmYGZQapGaAtbquMDM3z82pM930MVc/w==",
+ "version": "4.5.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.5.43.tgz",
+ "integrity": "sha512-xUg1o67w3zUWVQvBUrCn0Dm0C+lIk4fgoqudUtO2jfMjCrqvDuNI7IQ2/0gn1BKzlS05dXjAYh5DII6Oe1uRFA==",
"dependencies": {
- "@tagspaces/tagspaces-common": "^4.5.40"
+ "@tagspaces/tagspaces-common": "^4.5.43"
}
},
"node_modules/@tagspaces/tagspaces-pdf-extraction": {
@@ -93,25 +93,25 @@
}
},
"node_modules/@tagspaces/tagspaces-workers": {
- "version": "4.5.40",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-workers/-/tagspaces-workers-4.5.40.tgz",
- "integrity": "sha512-RG42iHoPB8G/7YFQl8x32f862RlWf7X2PSl2IE/95sqQjUJ6M8YEy3xqWWkqgeh3/1fR6VT9tEagxsmfA9QRsA==",
+ "version": "4.5.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-workers/-/tagspaces-workers-4.5.43.tgz",
+ "integrity": "sha512-QgSGdOkWffWAFPjVbj2sQwDswHQvxYzkNLrT21tbdQgOCLs3g79W9KSApMwN4be3quCJn49N5SdRAN92N6aWEA==",
"dependencies": {
- "@tagspaces/tagspaces-common": "^4.5.40",
- "@tagspaces/tagspaces-common-node": "^4.5.40",
+ "@tagspaces/tagspaces-common": "^4.5.43",
+ "@tagspaces/tagspaces-common-node": "^4.5.43",
"@tagspaces/tagspaces-pdf-extraction": "^4.5.27",
"@tagspaces/tagspaces-thumbgen-image": "^4.2.3",
"fswin": "^3.24.829"
}
},
"node_modules/@tagspaces/tagspaces-ws": {
- "version": "4.5.40",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-ws/-/tagspaces-ws-4.5.40.tgz",
- "integrity": "sha512-qzb4kj5GeN5Yf0HKl0vklzzZKav+ASGz2gyOEMpgq7NKjmphEwHH9Is72UTQ4JSXhqI2W2ZCy0DLksXkrtPQpw==",
+ "version": "4.5.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-ws/-/tagspaces-ws-4.5.43.tgz",
+ "integrity": "sha512-hGkeYRFmRyKLR/U+T45vGUEw21lZemCyh2QRvdV8OpA4MI2COm3g1wTFwabMtk2ysQsf8Ww00Qo9Is3vaycA/w==",
"dependencies": {
- "@tagspaces/tagspaces-indexer": "^4.5.40",
+ "@tagspaces/tagspaces-indexer": "^4.5.43",
"@tagspaces/tagspaces-pdf-extraction": "^4.5.27",
- "@tagspaces/tagspaces-workers": "^4.5.40",
+ "@tagspaces/tagspaces-workers": "^4.5.43",
"find-free-ports": "^3.1.1",
"jsonwebtoken": "^8.5.1",
"ws": "^8.15.1"
@@ -145,12 +145,9 @@
}
},
"node_modules/agent-base": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz",
- "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==",
- "dependencies": {
- "debug": "^4.3.4"
- },
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz",
+ "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw==",
"engines": {
"node": ">= 14"
}
@@ -372,9 +369,9 @@
}
},
"node_modules/debug": {
- "version": "4.3.7",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
- "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
+ "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
"dependencies": {
"ms": "^2.1.3"
},
@@ -431,9 +428,9 @@
}
},
"node_modules/dompurify": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.2.tgz",
- "integrity": "sha512-YMM+erhdZ2nkZ4fTNRTSI94mb7VG7uVF5vj5Zde7tImgnhZE3R6YW/IACGIHb2ux+QkEXMhe591N+5jWOmL4Zw==",
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.3.tgz",
+ "integrity": "sha512-U1U5Hzc2MO0oW3DF+G9qYN0aT7atAou4AgI0XjWz061nyBPbdxkfdhfy5uMgGn6+oLFCfn44ZGbdDqCzVmlOWA==",
"optionalDependencies": {
"@types/trusted-types": "^2.0.7"
}
@@ -611,11 +608,11 @@
}
},
"node_modules/https-proxy-agent": {
- "version": "7.0.5",
- "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz",
- "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==",
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
+ "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
"dependencies": {
- "agent-base": "^7.0.2",
+ "agent-base": "^7.1.2",
"debug": "4"
},
"engines": {
@@ -1413,20 +1410,20 @@
"integrity": "sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ=="
},
"node_modules/tldts": {
- "version": "6.1.65",
- "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.65.tgz",
- "integrity": "sha512-xU9gLTfAGsADQ2PcWee6Hg8RFAv0DnjMGVJmDnUmI8a9+nYmapMQix4afwrdaCtT+AqP4MaxEzu7cCrYmBPbzQ==",
+ "version": "6.1.66",
+ "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.66.tgz",
+ "integrity": "sha512-l3ciXsYFel/jSRfESbyKYud1nOw7WfhrBEF9I3UiarYk/qEaOOwu3qXNECHw4fHGHGTEOuhf/VdKgoDX5M/dhQ==",
"dependencies": {
- "tldts-core": "^6.1.65"
+ "tldts-core": "^6.1.66"
},
"bin": {
"tldts": "bin/cli.js"
}
},
"node_modules/tldts-core": {
- "version": "6.1.65",
- "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.65.tgz",
- "integrity": "sha512-Uq5t0N0Oj4nQSbU8wFN1YYENvMthvwU13MQrMJRspYCGLSAZjAfoBOJki5IQpnBM/WFskxxC/gIOTwaedmHaSg=="
+ "version": "6.1.66",
+ "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.66.tgz",
+ "integrity": "sha512-s07jJruSwndD2X8bVjwioPfqpIc1pDTzszPe9pL1Skbh4bjytL85KNQ3tolqLbCvpQHawIsGfFi9dgerWjqW4g=="
},
"node_modules/tough-cookie": {
"version": "5.0.0",
@@ -1590,9 +1587,9 @@
}
},
"@tagspaces/tagspaces-common": {
- "version": "4.5.40",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.5.40.tgz",
- "integrity": "sha512-Efa+7DE/NMrHJqb24lndn5RF2RUWutGiENyVmzskHBb2N74Tkzh594+9yg7F2MlPjOHfJtPTNsb7eozDemBjLA==",
+ "version": "4.5.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.5.43.tgz",
+ "integrity": "sha512-rP/o6UUajKXqHfYs0Bg/xOsEEq7V7HproXQQSY6ON4NTF70KwsfSKnb2n2/xpkAm8FwPmZ+PTyMmGAKYBq/RUw==",
"requires": {
"dompurify": "^3.2.0",
"dotenv": "^16.0.2",
@@ -1604,22 +1601,22 @@
}
},
"@tagspaces/tagspaces-common-node": {
- "version": "4.5.40",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-node/-/tagspaces-common-node-4.5.40.tgz",
- "integrity": "sha512-GYQ+WJI9Nx/x7rUo0lIukupFox80Nb8c1zbScEnrO+Hh4eL9KQYYTgB7kU7Ume/1Rn0QIYiV7eURjog4R71UTQ==",
+ "version": "4.5.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-node/-/tagspaces-common-node-4.5.43.tgz",
+ "integrity": "sha512-bUwOM7ERUEw99A+rs2TxPzU1nliB9JO0H6kRfTbQCIej1JtXOa245Sp2xFPdJ3/vNd4BpR8aMzEPlb6bVHVTNA==",
"requires": {
- "@tagspaces/tagspaces-common": "^4.5.40",
+ "@tagspaces/tagspaces-common": "^4.5.43",
"adm-zip": "0.5.10",
"fs-extra": "^10.0.0",
"klaw": "^4.1.0"
}
},
"@tagspaces/tagspaces-indexer": {
- "version": "4.5.40",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.5.40.tgz",
- "integrity": "sha512-z5YaP9x97xIrwsJmuyc3vtT95NhH2k40D7j+8j17XV0dcbRh8Yx8l2cmYGZQapGaAtbquMDM3z82pM930MVc/w==",
+ "version": "4.5.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.5.43.tgz",
+ "integrity": "sha512-xUg1o67w3zUWVQvBUrCn0Dm0C+lIk4fgoqudUtO2jfMjCrqvDuNI7IQ2/0gn1BKzlS05dXjAYh5DII6Oe1uRFA==",
"requires": {
- "@tagspaces/tagspaces-common": "^4.5.40"
+ "@tagspaces/tagspaces-common": "^4.5.43"
}
},
"@tagspaces/tagspaces-pdf-extraction": {
@@ -1640,25 +1637,25 @@
}
},
"@tagspaces/tagspaces-workers": {
- "version": "4.5.40",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-workers/-/tagspaces-workers-4.5.40.tgz",
- "integrity": "sha512-RG42iHoPB8G/7YFQl8x32f862RlWf7X2PSl2IE/95sqQjUJ6M8YEy3xqWWkqgeh3/1fR6VT9tEagxsmfA9QRsA==",
+ "version": "4.5.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-workers/-/tagspaces-workers-4.5.43.tgz",
+ "integrity": "sha512-QgSGdOkWffWAFPjVbj2sQwDswHQvxYzkNLrT21tbdQgOCLs3g79W9KSApMwN4be3quCJn49N5SdRAN92N6aWEA==",
"requires": {
- "@tagspaces/tagspaces-common": "^4.5.40",
- "@tagspaces/tagspaces-common-node": "^4.5.40",
+ "@tagspaces/tagspaces-common": "^4.5.43",
+ "@tagspaces/tagspaces-common-node": "^4.5.43",
"@tagspaces/tagspaces-pdf-extraction": "^4.5.27",
"@tagspaces/tagspaces-thumbgen-image": "^4.2.3",
"fswin": "^3.24.829"
}
},
"@tagspaces/tagspaces-ws": {
- "version": "4.5.40",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-ws/-/tagspaces-ws-4.5.40.tgz",
- "integrity": "sha512-qzb4kj5GeN5Yf0HKl0vklzzZKav+ASGz2gyOEMpgq7NKjmphEwHH9Is72UTQ4JSXhqI2W2ZCy0DLksXkrtPQpw==",
+ "version": "4.5.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-ws/-/tagspaces-ws-4.5.43.tgz",
+ "integrity": "sha512-hGkeYRFmRyKLR/U+T45vGUEw21lZemCyh2QRvdV8OpA4MI2COm3g1wTFwabMtk2ysQsf8Ww00Qo9Is3vaycA/w==",
"requires": {
- "@tagspaces/tagspaces-indexer": "^4.5.40",
+ "@tagspaces/tagspaces-indexer": "^4.5.43",
"@tagspaces/tagspaces-pdf-extraction": "^4.5.27",
- "@tagspaces/tagspaces-workers": "^4.5.40",
+ "@tagspaces/tagspaces-workers": "^4.5.43",
"find-free-ports": "^3.1.1",
"jsonwebtoken": "^8.5.1",
"ws": "^8.15.1"
@@ -1682,12 +1679,9 @@
"integrity": "sha512-x0HvcHqVJNTPk/Bw8JbLWlWoo6Wwnsug0fnYYro1HBrjxZ3G7/AZk7Ahv8JwDe1uIcz8eBqvu86FuF1POiG7vQ=="
},
"agent-base": {
- "version": "7.1.1",
- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz",
- "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==",
- "requires": {
- "debug": "^4.3.4"
- }
+ "version": "7.1.3",
+ "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.3.tgz",
+ "integrity": "sha512-jRR5wdylq8CkOe6hei19GGZnxM6rBGwFl3Bg0YItGDimvjGtAvdZk4Pu6Cl4u4Igsws4a1fd1Vq3ezrhn4KmFw=="
},
"ansi-regex": {
"version": "5.0.1",
@@ -1860,9 +1854,9 @@
}
},
"debug": {
- "version": "4.3.7",
- "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
- "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz",
+ "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==",
"requires": {
"ms": "^2.1.3"
}
@@ -1896,9 +1890,9 @@
"integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw=="
},
"dompurify": {
- "version": "3.2.2",
- "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.2.tgz",
- "integrity": "sha512-YMM+erhdZ2nkZ4fTNRTSI94mb7VG7uVF5vj5Zde7tImgnhZE3R6YW/IACGIHb2ux+QkEXMhe591N+5jWOmL4Zw==",
+ "version": "3.2.3",
+ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.2.3.tgz",
+ "integrity": "sha512-U1U5Hzc2MO0oW3DF+G9qYN0aT7atAou4AgI0XjWz061nyBPbdxkfdhfy5uMgGn6+oLFCfn44ZGbdDqCzVmlOWA==",
"requires": {
"@types/trusted-types": "^2.0.7"
}
@@ -2033,11 +2027,11 @@
}
},
"https-proxy-agent": {
- "version": "7.0.5",
- "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz",
- "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==",
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz",
+ "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==",
"requires": {
- "agent-base": "^7.0.2",
+ "agent-base": "^7.1.2",
"debug": "4"
}
},
@@ -2606,17 +2600,17 @@
"integrity": "sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ=="
},
"tldts": {
- "version": "6.1.65",
- "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.65.tgz",
- "integrity": "sha512-xU9gLTfAGsADQ2PcWee6Hg8RFAv0DnjMGVJmDnUmI8a9+nYmapMQix4afwrdaCtT+AqP4MaxEzu7cCrYmBPbzQ==",
+ "version": "6.1.66",
+ "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.66.tgz",
+ "integrity": "sha512-l3ciXsYFel/jSRfESbyKYud1nOw7WfhrBEF9I3UiarYk/qEaOOwu3qXNECHw4fHGHGTEOuhf/VdKgoDX5M/dhQ==",
"requires": {
- "tldts-core": "^6.1.65"
+ "tldts-core": "^6.1.66"
}
},
"tldts-core": {
- "version": "6.1.65",
- "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.65.tgz",
- "integrity": "sha512-Uq5t0N0Oj4nQSbU8wFN1YYENvMthvwU13MQrMJRspYCGLSAZjAfoBOJki5IQpnBM/WFskxxC/gIOTwaedmHaSg=="
+ "version": "6.1.66",
+ "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.66.tgz",
+ "integrity": "sha512-s07jJruSwndD2X8bVjwioPfqpIc1pDTzszPe9pL1Skbh4bjytL85KNQ3tolqLbCvpQHawIsGfFi9dgerWjqW4g=="
},
"tough-cookie": {
"version": "5.0.0",
diff --git a/release/app/package.json b/release/app/package.json
index cce3762cd..e115d8593 100644
--- a/release/app/package.json
+++ b/release/app/package.json
@@ -19,8 +19,8 @@
"dependencies": {
"@elife/pm2": "3.6.1",
"@tagspaces/extensions": "1.0.146",
- "@tagspaces/tagspaces-common-node": "4.5.40",
- "@tagspaces/tagspaces-ws": "4.5.40",
+ "@tagspaces/tagspaces-common-node": "4.5.43",
+ "@tagspaces/tagspaces-ws": "4.5.43",
"sharp": "0.32.6",
"ws": "8.16.0"
},
diff --git a/src/main/mainEvents.ts b/src/main/mainEvents.ts
index 5c26f77cd..490d76d95 100644
--- a/src/main/mainEvents.ts
+++ b/src/main/mainEvents.ts
@@ -223,8 +223,8 @@ export default function loadMainEvents() {
const result = await listMetaDirectoryPromise(path);
return result;
});
- ipcMain.handle('getPropertiesPromise', async (event, path) => {
- const result = await getPropertiesPromise(path);
+ ipcMain.handle('getPropertiesPromise', async (event, path, extractLinks) => {
+ const result = await getPropertiesPromise({ path, extractLinks });
return result;
});
ipcMain.handle('checkDirExist', async (event, dir) => {
diff --git a/src/renderer/components/EntryContainerTabs.tsx b/src/renderer/components/EntryContainerTabs.tsx
index 66a47ff00..713e6752d 100644
--- a/src/renderer/components/EntryContainerTabs.tsx
+++ b/src/renderer/components/EntryContainerTabs.tsx
@@ -115,6 +115,9 @@ const TabContent3 = React.lazy(
const TabContent4 = React.lazy(
() => import(/* webpackChunkName: "AiPropertiesTab" */ './AiPropertiesTab'),
);
+const TabContent5 = React.lazy(
+ () => import(/* webpackChunkName: "AiPropertiesTab" */ './LinksTab'),
+);
interface EntryContainerTabsProps {
openPanel: () => void;
@@ -132,22 +135,15 @@ function EntryContainerTabs(props: EntryContainerTabsProps) {
//const { findLocation } = useCurrentLocationContext();
const { getTabsArray } = useEntryPropsTabsContext();
const { openedEntry } = useOpenedEntryContext();
- //const { isEditMode } = useFilePropertiesContext();
const theme = useTheme();
const devMode: boolean = useSelector(isDevMode);
const tabIndex = useSelector(getEntryContainerTab);
const tileServer = useSelector(getMapTileServer);
const tabsArray = useRef<TabItem[]>([]);
- //const selectedTabIndex = useRef<number>(initSelectedTabIndex(tabIndex));
const dispatch: AppDispatch = useDispatch();
const [ignored, forceUpdate] = useReducer((x) => x + 1, 0, undefined);
const isTinyMode = useMediaQuery(theme.breakpoints.down('sm'));
- /* useEffect(() => {
- selectedTabIndex.current = tabIndex;
- forceUpdate();
- }, [tabIndex]);*/
-
useEffect(() => {
getTabsArray(openedEntry).then((tabs) => {
tabsArray.current = tabs;
@@ -204,6 +200,8 @@ function EntryContainerTabs(props: EntryContainerTabsProps) {
return <TabContent3 />;
} else if (tabName === TabNames.aiTab) {
return <TabContent4 />;
+ } else if (tabName === TabNames.linksTab) {
+ return <TabContent5 />;
}
}
if (tabsArray.current.length === 0) {
diff --git a/src/renderer/components/LinksTab.tsx b/src/renderer/components/LinksTab.tsx
new file mode 100644
index 000000000..61dd35e4d
--- /dev/null
+++ b/src/renderer/components/LinksTab.tsx
@@ -0,0 +1,178 @@
+/**
+ * TagSpaces - universal file and folder organizer
+ * Copyright (C) 2024-present TagSpaces GmbH
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License (version 3) as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
+ */
+
+import { LinkIcon } from '-/components/CommonIcons';
+import TsButton from '-/components/TsButton';
+import { TabNames } from '-/hooks/EntryPropsTabsContextProvider';
+import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';
+import { useEntryPropsTabsContext } from '-/hooks/useEntryPropsTabsContext';
+import { useLocationIndexContext } from '-/hooks/useLocationIndexContext';
+import { useOpenedEntryContext } from '-/hooks/useOpenedEntryContext';
+import { getEntryContainerTab } from '-/reducers/settings';
+import { TS } from '-/tagspaces.namespace';
+import { Box } from '@mui/material';
+import { extractLinks } from '@tagspaces/tagspaces-common/misc';
+import { useEffect, useReducer, useRef } from 'react';
+import { useTranslation } from 'react-i18next';
+import { useSelector } from 'react-redux';
+
+interface Props {}
+
+function LinksTab(props: Props) {
+ const { t } = useTranslation();
+ const { findLocation } = useCurrentLocationContext();
+ const { openedEntry, sharingLink, openLink } = useOpenedEntryContext();
+ const { isTabOpened } = useEntryPropsTabsContext();
+ const { findLinks, checkIndexExist, isIndexing, createLocationIndex } =
+ useLocationIndexContext();
+ const selectedTabIndex = useSelector(getEntryContainerTab);
+ const links = useRef<TS.Link[]>([]);
+ const inboundLinks = useRef<TS.FileSystemEntry[]>([]);
+ const indexExist = useRef<boolean>(false);
+ const [ignored, forceUpdate] = useReducer((x) => x + 1, 0, undefined);
+
+ const location = findLocation(openedEntry.locationID);
+
+ useEffect(() => {
+ isTabOpened(TabNames.linksTab, openedEntry, selectedTabIndex).then(
+ (linksTabOpened) => {
+ if (linksTabOpened) {
+ links.current = [];
+ inboundLinks.current = [];
+ indexExist.current = false;
+ // links from description
+ if (openedEntry.meta?.description) {
+ const descriptionLinks = extractLinks(openedEntry.meta.description);
+ if (descriptionLinks && descriptionLinks.length > 0) {
+ links.current = descriptionLinks;
+ }
+ }
+ forceUpdate();
+
+ // links from file content
+ location
+ .checkFileEncryptedPromise(openedEntry.path)
+ .then((encrypted) => {
+ location
+ .getPropertiesPromise(openedEntry.path, encrypted, true)
+ .then((entryProps: TS.FileSystemEntry) => {
+ if (entryProps.links && entryProps.links.length > 0) {
+ links.current = [...links.current, ...entryProps.links];
+ forceUpdate();
+ }
+ });
+ });
+
+ // external (inbound) links
+ checkIndexExist(location.uuid).then((exist) => {
+ indexExist.current = exist;
+ if (exist) {
+ setInboundLinks();
+ }
+ });
+ }
+ },
+ );
+ }, [openedEntry, selectedTabIndex]);
+
+ function refreshInboundLinks() {
+ createLocationIndex(location).then(() => setInboundLinks());
+ }
+
+ function setInboundLinks() {
+ findLinks(sharingLink, location.uuid).then((entries) => {
+ inboundLinks.current = entries;
+ indexExist.current = true;
+ forceUpdate();
+ });
+ }
+
+ const linkButton = (link: TS.Link) => (
+ <TsButton
+ data-tid={'linkTID' + link.href}
+ tooltip={link.type}
+ onClick={() => openLink(link.href)}
+ startIcon={<LinkIcon />}
+ style={{
+ // @ts-ignore
+ WebkitAppRegion: 'no-drag',
+ marginRight: 5,
+ whiteSpace: 'nowrap',
+ overflow: 'hidden',
+ }}
+ >
+ {link.value ? link.value : link.href}
+ </TsButton>
+ );
+
+ const findInboundButton = (title) => (
+ <TsButton
+ loading={isIndexing !== undefined}
+ data-tid={'generateInboundTID'}
+ onClick={() =>
+ title === 'reGenerateInbound'
+ ? refreshInboundLinks()
+ : setInboundLinks()
+ }
+ style={{
+ // @ts-ignore
+ WebkitAppRegion: 'no-drag',
+ marginRight: 5,
+ whiteSpace: 'nowrap',
+ overflow: 'hidden',
+ }}
+ >
+ {t('core:' + title)}
+ </TsButton>
+ );
+
+ return (
+ <Box display="block">
+ {links.current && links.current.length > 0 && (
+ <>
+ Outbound links:
+ <br />
+ {links.current.map((link) => linkButton(link))}
+ </>
+ )}
+ {location.fullTextIndex && (
+ <Box display="block">
+ Inbound links:
+ <br />
+ {indexExist.current ? (
+ <>
+ {inboundLinks.current &&
+ inboundLinks.current.length > 0 &&
+ inboundLinks.current.map((entry) => (
+ <div>
+ {entry.name}: {entry.links.map((link) => linkButton(link))}
+ <br />
+ </div>
+ ))}{' '}
+ {findInboundButton('reGenerateInbound')}
+ </>
+ ) : (
+ findInboundButton('generateInbound')
+ )}
+ </Box>
+ )}
+ </Box>
+ );
+}
+
+export default LinksTab;
diff --git a/src/renderer/hooks/ChatProvider.tsx b/src/renderer/hooks/ChatProvider.tsx
index 752a84462..0e00bbd9a 100644
--- a/src/renderer/hooks/ChatProvider.tsx
+++ b/src/renderer/hooks/ChatProvider.tsx
@@ -507,7 +507,7 @@ export const ChatContextProvider = ({ children }: ChatContextProviderProps) => {
};
saveFilePromise(
{ path: getHistoryFilePath() },
- JSON.stringify(model),
+ JSON.stringify(model, null, 2),
true,
)
.then((fsEntry: TS.FileSystemEntry) => {
diff --git a/src/renderer/hooks/DirectoryContentContextProvider.tsx b/src/renderer/hooks/DirectoryContentContextProvider.tsx
index 4766de668..ac273ee53 100644
--- a/src/renderer/hooks/DirectoryContentContextProvider.tsx
+++ b/src/renderer/hooks/DirectoryContentContextProvider.tsx
@@ -844,7 +844,7 @@ export const DirectoryContentContextProvider = ({
const promise = location
.listDirectoryPromise(
directoryPath,
- [],
+ location.fullTextIndex ? ['extractTextContent'] : [],
currentLocation ? currentLocation.ignorePatternPaths : [],
resultsLimit,
)
diff --git a/src/renderer/hooks/EntryPropsTabsContextProvider.tsx b/src/renderer/hooks/EntryPropsTabsContextProvider.tsx
index a389f7f1d..fc116de8a 100644
--- a/src/renderer/hooks/EntryPropsTabsContextProvider.tsx
+++ b/src/renderer/hooks/EntryPropsTabsContextProvider.tsx
@@ -24,6 +24,7 @@ import {
FolderPropertiesIcon,
RevisionIcon,
} from '-/components/CommonIcons';
+import LinkIcon from '@mui/icons-material/Link';
import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';
import { Pro } from '-/pro';
import { AppDispatch } from '-/reducers/app';
@@ -47,6 +48,7 @@ export const TabNames = {
descriptionTab: 'descriptionTab',
revisionsTab: 'revisionsTab',
aiTab: 'aiTab',
+ linksTab: 'linksTab',
};
type EntryPropsTabsContextData = {
@@ -56,12 +58,18 @@ type EntryPropsTabsContextData = {
tabName: (typeof TabNames)[keyof typeof TabNames],
openedEntry: TS.OpenedEntry,
) => Promise<number>;
+ isTabOpened: (
+ tabName: (typeof TabNames)[keyof typeof TabNames],
+ openedEntry: TS.OpenedEntry,
+ selectedTabIndex: number,
+ ) => Promise<boolean>;
};
export const EntryPropsTabsContext = createContext<EntryPropsTabsContextData>({
getTabsArray: undefined,
isEditable: undefined,
setOpenedTab: undefined,
+ isTabOpened: undefined,
});
export type EntryPropsTabsContextProviderProps = {
@@ -74,10 +82,7 @@ export const EntryPropsTabsContextProvider = ({
const { t } = useTranslation();
const { findLocation, readOnlyMode } = useCurrentLocationContext();
-
- // const { isEditMode } = useFilePropertiesContext();
const dispatch: AppDispatch = useDispatch();
-
const devMode: boolean = useSelector(isDevMode);
//const haveRevisions = useRef<boolean>(isEditable());
@@ -85,7 +90,6 @@ export const EntryPropsTabsContextProvider = ({
//const [ignored, forceUpdate] = React.useReducer((x) => x + 1, 0, undefined);
function haveRevisions(openedEntry: TS.OpenedEntry): Promise<boolean> {
- //selectedTabIndex.current = initSelectedTabIndex(tabIndex);
if (isEditable(openedEntry)) {
const location: CommonLocation = findLocation(openedEntry.locationID);
const backupFilePath = getBackupFileDir(
@@ -114,6 +118,7 @@ export const EntryPropsTabsContextProvider = ({
}
async function getTabsArray(oEntry: TS.OpenedEntry): Promise<TabItem[]> {
+ //const location: CommonLocation = findLocation(oEntry.locationID);
const tab1: TabItem = {
icon: <FolderPropertiesIcon />,
title: t('core:details'),
@@ -155,6 +160,12 @@ export const EntryPropsTabsContextProvider = ({
tabsArray.push(tab4);
}
}
+ const tab5: TabItem = {
+ icon: <LinkIcon />,
+ title: t('core:links'),
+ name: TabNames.linksTab,
+ };
+ tabsArray.push(tab5);
return tabsArray;
}
@@ -177,11 +188,25 @@ export const EntryPropsTabsContextProvider = ({
return tabIndex;
}
+ async function isTabOpened(
+ tabName: (typeof TabNames)[keyof typeof TabNames],
+ openedEntry: TS.OpenedEntry,
+ selectedTabIndex: number,
+ ): Promise<boolean> {
+ const allTabs = await getTabsArray(openedEntry);
+ const tabIndex = allTabs.findIndex((tab) => tab.name === tabName);
+ const maxTabIndex = allTabs.length - 1;
+ const currentOpenedTab =
+ selectedTabIndex > maxTabIndex ? maxTabIndex : selectedTabIndex;
+ return tabIndex !== -1 && tabIndex === currentOpenedTab;
+ }
+
const context = useMemo(() => {
return {
getTabsArray,
isEditable,
setOpenedTab,
+ isTabOpened,
};
}, []);
diff --git a/src/renderer/hooks/LocationIndexContextProvider.tsx b/src/renderer/hooks/LocationIndexContextProvider.tsx
index 8be45a3a0..0d09a490f 100644
--- a/src/renderer/hooks/LocationIndexContextProvider.tsx
+++ b/src/renderer/hooks/LocationIndexContextProvider.tsx
@@ -66,6 +66,11 @@ type LocationIndexContextData = {
setIndex: (i: TS.FileSystemEntry[], location?: CommonLocation) => void;
//indexUpdateSidecarTags: (path: string, tags: Array<TS.Tag>) => void;
reflectUpdateSidecarMeta: (path: string, entryMeta: Object) => void;
+ findLinks: (
+ link: string,
+ locationId: string,
+ ) => Promise<TS.FileSystemEntry[]>;
+ checkIndexExist: (locationId: string) => Promise<boolean>;
};
export const LocationIndexContext = createContext<LocationIndexContextData>({
@@ -80,7 +85,8 @@ export const LocationIndexContext = createContext<LocationIndexContextData>({
searchLocationIndex: () => {},
searchAllLocations: () => {},
setIndex: () => {},
- //indexUpdateSidecarTags: () => {},
+ findLinks: undefined,
+ checkIndexExist: undefined,
reflectUpdateSidecarMeta: () => {},
});
@@ -166,6 +172,53 @@ export const LocationIndexContextProvider = ({
return index.current;
}
+ function indexExpired() {
+ const currentTime = new Date().getTime();
+ const indexAge = indexLoadedOn.current
+ ? currentTime - indexLoadedOn.current
+ : 0;
+
+ return indexAge > maxIndexAge.current;
+ }
+
+ async function checkIndexExist(locationId: string): Promise<boolean> {
+ if (index.current === undefined || indexExpired()) {
+ const location = findLocation(locationId);
+ const locationPath = await getLocationPath(location);
+ const directoryIndex = await loadIndexFromDisk(
+ locationPath,
+ location.uuid,
+ );
+ if (directoryIndex) {
+ // index is up to date
+ setIndex(directoryIndex, location);
+ return true;
+ }
+ }
+ return Promise.resolve(index.current !== undefined);
+ }
+
+ async function getLastIndex(
+ locationId: string,
+ ): Promise<TS.FileSystemEntry[]> {
+ if (!index.current || index.current.length < 1 || indexExpired()) {
+ const location = findLocation(locationId);
+ const locationPath = await getLocationPath(location);
+ const directoryIndex = await loadIndexFromDisk(
+ locationPath,
+ location.uuid,
+ );
+ if (directoryIndex) {
+ // index is up to date
+ setIndex(directoryIndex, location);
+ } else {
+ await createLocationIndex(location);
+ }
+ }
+
+ return index.current;
+ }
+
function reflectDeleteEntry(path: string) {
if (!index.current || index.current.length < 1) {
return;
@@ -210,6 +263,19 @@ export const LocationIndexContextProvider = ({
}
}
+ async function findLinks(
+ link: string,
+ locationId: string,
+ ): Promise<TS.FileSystemEntry[]> {
+ const lastIndex = await getLastIndex(locationId);
+ if (!lastIndex || lastIndex.length < 1) {
+ return undefined;
+ }
+ return lastIndex.filter(
+ (i) => i.links && i.links.some((l) => l.href === link),
+ );
+ }
+
/*function indexUpdateSidecarTags(path: string, tags: Array<TS.Tag>) {
if (!index.current || index.current.length < 1) {
return;
@@ -302,6 +368,7 @@ export const LocationIndexContextProvider = ({
const mode = ['extractThumbPath'];
if (extractText) {
mode.push('extractTextContent');
+ mode.push('extractLinks');
}
return createIndex(
{
@@ -421,7 +488,7 @@ export const LocationIndexContextProvider = ({
function clearDirectoryIndex(persist = false) {
isIndexing.current = undefined;
- setIndex([], persist ? currentLocation : undefined);
+ setIndex(undefined, persist ? currentLocation : undefined);
forceUpdate();
}
@@ -812,6 +879,8 @@ export const LocationIndexContextProvider = ({
setIndex,
getIndex,
reflectUpdateSidecarMeta,
+ findLinks,
+ checkIndexExist,
};
return (
diff --git a/src/renderer/hooks/OpenedEntryContextProvider.tsx b/src/renderer/hooks/OpenedEntryContextProvider.tsx
index 2643741b1..f166a7cd1 100644
--- a/src/renderer/hooks/OpenedEntryContextProvider.tsx
+++ b/src/renderer/hooks/OpenedEntryContextProvider.tsx
@@ -542,6 +542,9 @@ export const OpenedEntryContextProvider = ({
fsEntry: TS.FileSystemEntry,
tabSelected = undefined,
): Promise<boolean> {
+ /**
+ * used for encryption check
+ */
return getAllPropertiesPromise(fsEntry.path, fsEntry.locationID)
.then((entry: TS.FileSystemEntry) => {
if (entry) {
diff --git a/src/renderer/locales/en/core.json b/src/renderer/locales/en/core.json
index 09a31a65d..0ba71d503 100644
--- a/src/renderer/locales/en/core.json
+++ b/src/renderer/locales/en/core.json
@@ -906,6 +906,9 @@
"engineName": "AI Engine Name",
"maxCollectedTag": "Max Collected Tag",
"aiChatTab": "AI Chat",
+ "links": "Links",
+ "generateInbound": "Find Inbound Links",
+ "reGenerateInbound": "Refresh Inbound Links",
"startDownload": "Start download",
"-": "-"
}
diff --git a/src/renderer/perspectives/common/CellView.tsx b/src/renderer/perspectives/common/CellView.tsx
index b96c0a195..607d19834 100644
--- a/src/renderer/perspectives/common/CellView.tsx
+++ b/src/renderer/perspectives/common/CellView.tsx
@@ -44,6 +44,8 @@ import { useDirectoryContentContext } from '-/hooks/useDirectoryContentContext';
import { useNotificationContext } from '-/hooks/useNotificationContext';
import { useEntryExistDialogContext } from '-/components/dialogs/hooks/useEntryExistDialogContext';
import i18n from '-/services/i18n';
+import { useEntryPropsTabsContext } from '-/hooks/useEntryPropsTabsContext';
+import { TabNames } from '-/hooks/EntryPropsTabsContextProvider';
interface Props {
fsEntry: TS.FileSystemEntry;
@@ -78,6 +80,7 @@ function CellView(props: Props) {
usePerspectiveSettingsContext();
const theme = useTheme();
const { openEntryInternal, openedEntry } = useOpenedEntryContext();
+ const { isTabOpened } = useEntryPropsTabsContext();
const { openDirectory } = useDirectoryContentContext();
const { moveFiles, openFileNatively } = useIOActionsContext();
const { readOnlyMode, currentLocation } = useCurrentLocationContext();
@@ -89,7 +92,7 @@ function CellView(props: Props) {
const { showNotification } = useNotificationContext();
const desktopMode = useSelector(getDesktopMode);
- const tabIndex = useSelector(getEntryContainerTab);
+ const selectedTabIndex = useSelector(getEntryContainerTab);
// const fileSourceRef = useRef<HTMLDivElement | null>(null);
/*useEffect(() => {
@@ -246,9 +249,17 @@ function CellView(props: Props) {
setSelectedEntries([fsEntry]);
if (fsEntry.isFile) {
if (singleClickAction === 'openInternal') {
- if (tabIndex !== 3 || !openedEntry) {
- // dont open file if chat mode is enabled
+ if (!openedEntry) {
openEntryInternal(fsEntry);
+ } else {
+ isTabOpened(TabNames.aiTab, openedEntry, selectedTabIndex).then(
+ (aiTabOpened) => {
+ // dont open file if chat mode is enabled
+ if (!aiTabOpened) {
+ openEntryInternal(fsEntry);
+ }
+ },
+ );
}
} else if (singleClickAction === 'openExternal') {
openFileNatively(fsEntry.path);
diff --git a/src/renderer/tagspaces.namespace.d.ts b/src/renderer/tagspaces.namespace.d.ts
index 8c9c34862..189dd94c5 100644
--- a/src/renderer/tagspaces.namespace.d.ts
+++ b/src/renderer/tagspaces.namespace.d.ts
@@ -198,6 +198,24 @@ export namespace TS {
path: string;
url?: string;
meta?: FileSystemEntryMeta;
+ links?: Link[];
+ }
+
+ type LinkType = 'url' | 'email' | 'tslink' | 'hashtag' | 'mention';
+
+ interface Link {
+ /**
+ * The type of entity found.
+ */
+ type: LinkType;
+ /**
+ * Should be the value of this links `href` attribute.
+ */
+ href: string;
+ /**
+ * The original entity substring.
+ */
+ value?: string;
}
interface FileSystemEntryMeta {
diff --git a/src/renderer/utils/CommonLocation.ts b/src/renderer/utils/CommonLocation.ts
index ca12c923f..653518505 100644
--- a/src/renderer/utils/CommonLocation.ts
+++ b/src/renderer/utils/CommonLocation.ts
@@ -315,6 +315,7 @@ export class CommonLocation implements TS.Location {
getPropertiesPromise = (
path: string,
useEncryption: boolean = true,
+ extractLinks: boolean = false,
): Promise<any> => {
if (this.ioAPI) {
if (this.haveObjectStoreSupport()) {
@@ -328,7 +329,11 @@ export class CommonLocation implements TS.Location {
}
return this.ioAPI.getPropertiesPromise(path);
} else if (AppConfig.isElectron) {
- return window.electronIO.ipcRenderer.invoke('getPropertiesPromise', path);
+ return window.electronIO.ipcRenderer.invoke(
+ 'getPropertiesPromise',
+ path,
+ extractLinks,
+ );
}
return Promise.reject(new Error('getPropertiesPromise: not implemented'));
};