Add an optionally-displayable "Terms and Conditions" link.

This commit is contained in:
gluap 2023-03-11 16:49:42 +01:00
parent e7b02b170e
commit 9e80113089
No known key found for this signature in database
7 changed files with 17 additions and 4 deletions

View file

@ -19,6 +19,7 @@ FRONTEND_DIR = None
FRONTEND_CONFIG = { FRONTEND_CONFIG = {
"imprintUrl": "https://example.com/imprint", "imprintUrl": "https://example.com/imprint",
"privacyPolicyUrl": "https://example.com/privacy", "privacyPolicyUrl": "https://example.com/privacy",
# "termsUrl": "https://example.com/terms", # Link is only shown when set
"mapHome": {"zoom": 6, "longitude": 10.2, "latitude": 51.3}, "mapHome": {"zoom": 6, "longitude": 10.2, "latitude": 51.3},
# "banner": {"text": "This is a development installation.", "style": "info"}, # "banner": {"text": "This is a development installation.", "style": "info"},
} }

View file

@ -44,6 +44,7 @@ FRONTEND_DIR = "../frontend/build/"
FRONTEND_CONFIG = { FRONTEND_CONFIG = {
"imprintUrl": "https://example.com/imprint", "imprintUrl": "https://example.com/imprint",
"privacyPolicyUrl": "https://example.com/privacy", "privacyPolicyUrl": "https://example.com/privacy",
# "termsUrl": "https://example.com/user_terms_and_conditions", # Link is only shown when set
"mapHome": {"zoom": 6, "longitude": 10.2, "latitude": 51.3}, "mapHome": {"zoom": 6, "longitude": 10.2, "latitude": 51.3},
"banner": {"text": "This is a test installation.", "style": "warning"}, "banner": {"text": "This is a test installation.", "style": "warning"},
} }

View file

@ -219,6 +219,13 @@ const App = connect((state) => ({login: state.login}))(function App({login}) {
{t('App.footer.imprint')} {t('App.footer.imprint')}
</a> </a>
</List.Item> </List.Item>
{ config?.termsUrl &&
<List.Item>
<a href={config?.termsUrl} target="_blank" rel="noreferrer">
{t('App.footer.terms')}
</a>
</List.Item>
}
<List.Item> <List.Item>
<a <a
href={`https://github.com/openbikesensor/portal${ href={`https://github.com/openbikesensor/portal${

View file

@ -17,6 +17,7 @@ export interface Config {
obsMapSource?: MapSource; obsMapSource?: MapSource;
imprintUrl?: string; imprintUrl?: string;
privacyPolicyUrl?: string; privacyPolicyUrl?: string;
termsUrl?: string;
banner?: { banner?: {
text: string; text: string;
style?: "warning" | "info"; style?: "warning" | "info";

View file

@ -29,6 +29,7 @@ App:
thisInstallation: Diese Installation thisInstallation: Diese Installation
privacyPolicy: Datenschutz privacyPolicy: Datenschutz
terms: Nutzungsbedingungen
imprint: Impressum imprint: Impressum
version: Version v{{apiVersion}} version: Version v{{apiVersion}}
versionLoading: Version lädt... versionLoading: Version lädt...

View file

@ -34,6 +34,7 @@ App:
thisInstallation: This installation thisInstallation: This installation
privacyPolicy: Privacy policy privacyPolicy: Privacy policy
terms: Terms and Conditions
imprint: Imprint imprint: Imprint
version: Version v{{apiVersion}} version: Version v{{apiVersion}}
versionLoading: Fetching version... versionLoading: Fetching version...

View file

@ -34,6 +34,7 @@ App:
thisInstallation: Cette installation thisInstallation: Cette installation
privacyPolicy: Politique de confidentialité privacyPolicy: Politique de confidentialité
terms: Modalités d'utilisation
imprint: Impression imprint: Impression
version: Version v{{apiVersion}} version: Version v{{apiVersion}}
versionLoading: Téléchargement de la version... versionLoading: Téléchargement de la version...