Skip to content

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

feat: imprint url in extconfig

Ilian Sapundshiev9198438a99ea
diff --git a/app/components/dialogs/AboutDialog.tsx b/app/components/dialogs/AboutDialog.tsx
index 517898b13..4b075b9f7 100644
--- a/app/components/dialogs/AboutDialog.tsx
+++ b/app/components/dialogs/AboutDialog.tsx
@@ -114,6 +114,14 @@ function AboutDialog(props: Props) {
privacyURL = window.ExtPrivacyURL;
}
+ let imprintURL = Links.links.imprintURL;
+ if (AppConfig.isWeb) {
+ imprintURL = '';
+ }
+ if (window.ExtImprintURL) {
+ imprintURL = window.ExtImprintURL;
+ }
+
const theme = useTheme();
const fullScreen = useMediaQuery(theme.breakpoints.down('md'));
return (
@@ -184,15 +192,17 @@ function AboutDialog(props: Props) {
for more details.
<br />
<br />
- <Button
- size="small"
- color="primary"
- onClick={() => {
- props.openURLExternally(Links.links.imprintURL, true);
- }}
- >
- Imprint
- </Button>
+ {imprintURL && (
+ <Button
+ size="small"
+ color="primary"
+ onClick={() => {
+ props.openURLExternally(imprintURL, true);
+ }}
+ >
+ Imprint
+ </Button>
+ )}
{privacyURL && (
<Button
size="small"
diff --git a/app/tagspaces.d.ts b/app/tagspaces.d.ts
index 0c5c9fa1a..d23ad94f5 100644
--- a/app/tagspaces.d.ts
+++ b/app/tagspaces.d.ts
@@ -55,6 +55,7 @@ declare interface Window {
ExtGeoTaggingFormat?: string;
ExtDemoUser?: any;
ExtPrivacyURL?: string;
+ ExtImprintURL?: string;
ExtCheckForUpdatesOnStartup?: boolean;
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?: any;
plugins?: any; // needed for Cordova