TagSpaces is an offline, open source, document manager with tagging support
feat: added configurable privacy policy URL
Ilian Sapundshiev381f20443d65
diff --git a/app/components/dialogs/AboutDialog.tsx b/app/components/dialogs/AboutDialog.tsxindex 1c79152a6..517898b13 100644--- a/app/components/dialogs/AboutDialog.tsx+++ b/app/components/dialogs/AboutDialog.tsx@@ -36,6 +36,7 @@ import DialogCloseButton from '-/components/dialogs/DialogCloseButton';import Links from '-/content/links';import useMediaQuery from '@mui/material/useMediaQuery';import useTheme from '@mui/styles/useTheme';+import AppConfig from '-/AppConfig';interface Props {open: boolean;@@ -105,6 +106,14 @@ function AboutDialog(props: Props) {}}+ let privacyURL = Links.links.privacyURL;+ if (AppConfig.isWeb) {+ privacyURL = '';+ }+ if (window.ExtPrivacyURL) {+ privacyURL = window.ExtPrivacyURL;+ }+const theme = useTheme();const fullScreen = useMediaQuery(theme.breakpoints.down('md'));return (@@ -184,15 +193,17 @@ function AboutDialog(props: Props) {>Imprint</Button>- <Button- size="small"- color="primary"- onClick={() => {- props.openURLExternally(Links.links.privacyURL, true);- }}- >- Privacy Policy- </Button>+ {privacyURL && (+ <Button+ size="small"+ color="primary"+ onClick={() => {+ props.openURLExternally(privacyURL, true);+ }}+ >+ Privacy Policy+ </Button>+ )}<Buttonsize="small"color="primary"diff --git a/app/tagspaces.d.ts b/app/tagspaces.d.tsindex f42a5b30b..0c5c9fa1a 100644--- a/app/tagspaces.d.ts+++ b/app/tagspaces.d.ts@@ -54,6 +54,7 @@ declare interface Window {ExtUseGenerateThumbnails?: boolean;ExtGeoTaggingFormat?: string;ExtDemoUser?: any;+ ExtPrivacyURL?: string;ExtCheckForUpdatesOnStartup?: boolean;__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: any;plugins?: any; // needed for Cordova