TagSpaces is an offline, open source, document manager with tagging support
chore: added linkifyjs, fixing small ui glitches
Ilian Sapundshiev339e1f58facc
diff --git a/package-lock.json b/package-lock.jsonindex 90a6f7601..6f852e68b 100644--- a/package-lock.json+++ b/package-lock.json@@ -48,6 +48,7 @@"i18next": "^23.4.6","i18next-http-backend": "^2.2.2","leaflet": "^1.9.4",+ "linkifyjs": "^4.1.3","mgrs": "^1.0.0","open-location-code": "^1.0.3","open-location-code-typescript": "^1.5.0",@@ -197,7 +198,7 @@"yarn": "please-use-npm"},"optionalDependencies": {- "@tagspacespro/tagspacespro": "5.0.83"+ "@tagspacespro/tagspacespro": "5.0.90"}},"node_modules/@adobe/css-tools": {@@ -17229,9 +17230,9 @@}},"node_modules/@tagspacespro/tagspacespro": {- "version": "5.0.83",- "resolved": "https://npm.pkg.github.com/download/@tagspacespro/tagspacespro/5.0.83/4396965eead210aa36f582506298d09631a73140",- "integrity": "sha512-fOSdNvSI5wHwzTOI9Wjf/+XqBY11E5nABjQSY+7FLWzNIb6yO7berm+afF+5baR6i+5CnUkdT+4Y29K8Qas6HQ==",+ "version": "5.0.90",+ "resolved": "https://npm.pkg.github.com/download/@tagspacespro/tagspacespro/5.0.90/75d24b2e899a0c40bd141f95d333efedc4eceb58",+ "integrity": "sha512-YlV5FgAQyoMUKFVrEVl7CA3qknf7tHL6IYJ8DHfJ5HKlM1i7L0JOZdzmZzshVXUj5y0P0uUfBwPqM01oqSnyqg==","license": "Proprietary","optional": true},@@ -33045,6 +33046,12 @@"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz","integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="},+ "node_modules/linkifyjs": {+ "version": "4.1.3",+ "resolved": "https://registry.npmjs.org/linkifyjs/-/linkifyjs-4.1.3.tgz",+ "integrity": "sha512-auMesunaJ8yfkHvK4gfg1K0SaKX/6Wn9g2Aac/NwX+l5VdmFZzo/hdPGxEOETj+ryRa4/fiOPjeeKURSAJx1sg==",+ "license": "MIT"+ },"node_modules/lint-staged": {"version": "8.2.1","resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-8.2.1.tgz",diff --git a/package.json b/package.jsonindex 3069b9bdd..164651579 100644--- a/package.json+++ b/package.json@@ -195,6 +195,7 @@"i18next": "^23.4.6","i18next-http-backend": "^2.2.2","leaflet": "^1.9.4",+ "linkifyjs": "^4.1.3","mgrs": "^1.0.0","open-location-code": "^1.0.3","open-location-code-typescript": "^1.5.0",diff --git a/src/renderer/components/dialogs/FilePreviewDialog.tsx b/src/renderer/components/dialogs/FilePreviewDialog.tsxindex 8f178e22d..b9eca0725 100644--- a/src/renderer/components/dialogs/FilePreviewDialog.tsx+++ b/src/renderer/components/dialogs/FilePreviewDialog.tsx@@ -16,24 +16,25 @@**/-import React, { MutableRefObject, useRef } from 'react';-import useMediaQuery from '@mui/material/useMediaQuery';-import { useTheme } from '@mui/material/styles';-import { getUuid } from '@tagspaces/tagspaces-common/utils-io';-import DialogContent from '@mui/material/DialogContent';-import TsDialogTitle from '-/components/dialogs/components/TsDialogTitle';-import Dialog from '@mui/material/Dialog';-import { extractContainingDirectoryPath } from '@tagspaces/tagspaces-common/paths';+import AppConfig from '-/AppConfig';import DraggablePaper from '-/components/DraggablePaper';-import { TS } from '-/tagspaces.namespace';-import { getCurrentTheme } from '-/reducers/settings';-import { useSelector } from 'react-redux';import FileView from '-/components/FileView';-import useEventListener from '-/utils/useEventListener';-import AppConfig from '-/AppConfig';+import TsDialogTitle from '-/components/dialogs/components/TsDialogTitle';import { useCurrentLocationContext } from '-/hooks/useCurrentLocationContext';-import { useOpenedEntryContext } from '-/hooks/useOpenedEntryContext';import { useFilePropertiesContext } from '-/hooks/useFilePropertiesContext';+import { useOpenedEntryContext } from '-/hooks/useOpenedEntryContext';+import { getCurrentTheme } from '-/reducers/settings';+import { TS } from '-/tagspaces.namespace';+import useEventListener from '-/utils/useEventListener';+import { Typography } from '@mui/material';+import Dialog from '@mui/material/Dialog';+import DialogContent from '@mui/material/DialogContent';+import { useTheme } from '@mui/material/styles';+import useMediaQuery from '@mui/material/useMediaQuery';+import { extractContainingDirectoryPath } from '@tagspaces/tagspaces-common/paths';+import { getUuid } from '@tagspaces/tagspaces-common/utils-io';+import { MutableRefObject, useRef } from 'react';+import { useSelector } from 'react-redux';interface Props {open: boolean;@@ -172,7 +173,7 @@ function FilePreviewDialog(props: Props) {slotProps={{ backdrop: { style: { backgroundColor: 'transparent' } } }}><TsDialogTitle- dialogTitle=""+ dialogTitle="Preview"closeButtonTestId="closeFilePreviewTID"onClose={onClose}/>@@ -181,11 +182,17 @@ function FilePreviewDialog(props: Props) {marginLeft: 'auto',marginRight: 'auto',overflowY: 'hidden',- width: '90%',+ padding: smallScreen ? '0' : 'inherited',flexGrow: 1,}}>- <p>{fsEntry.path}</p>+ <Typography+ variant="body2"+ gutterBottom+ style={{ wordBreak: 'break-all', margin: 10 }}+ >+ {fsEntry.path}+ </Typography><FileViewkey="FileViewPreviewID"fileViewer={fileViewer}