Add privacy policy
This commit is contained in:
parent
fa82faade7
commit
852d569994
6 changed files with 38 additions and 3 deletions
|
@ -21,6 +21,7 @@ import Loc from "../../Models/Loc";
|
||||||
import Toggle from "../Input/Toggle";
|
import Toggle from "../Input/Toggle";
|
||||||
import {OsmConnection} from "../../Logic/Osm/OsmConnection";
|
import {OsmConnection} from "../../Logic/Osm/OsmConnection";
|
||||||
import Constants from "../../Models/Constants";
|
import Constants from "../../Models/Constants";
|
||||||
|
import PrivacyPolicy from "./PrivacyPolicy";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attribution panel shown on mobile
|
* The attribution panel shown on mobile
|
||||||
|
@ -143,7 +144,8 @@ export default class CopyrightPanel extends Combine {
|
||||||
})),
|
})),
|
||||||
CopyrightPanel.CodeContributors(),
|
CopyrightPanel.CodeContributors(),
|
||||||
new Title(t.iconAttribution.title, 3),
|
new Title(t.iconAttribution.title, 3),
|
||||||
...iconAttributions
|
...iconAttributions,
|
||||||
|
new PrivacyPolicy()
|
||||||
].map(e => e?.SetClass("mt-4")));
|
].map(e => e?.SetClass("mt-4")));
|
||||||
this.SetClass("flex flex-col link-underline overflow-hidden")
|
this.SetClass("flex flex-col link-underline overflow-hidden")
|
||||||
this.SetStyle("max-width: calc(100vw - 3em); width: 40rem; margin-left: 0.75rem; margin-right: 0.5rem")
|
this.SetStyle("max-width: calc(100vw - 3em); width: 40rem; margin-left: 0.75rem; margin-right: 0.5rem")
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
import Combine from "../Base/Combine";
|
||||||
|
import Translations from "../i18n/Translations";
|
||||||
|
import Title from "../Base/Title";
|
||||||
|
|
||||||
|
export default class PrivacyPolicy extends Combine {
|
||||||
|
constructor() {
|
||||||
|
const t = Translations.t.privacy
|
||||||
|
super([
|
||||||
|
new Title(t.title, 2),
|
||||||
|
t.intro,
|
||||||
|
|
||||||
|
new Title(t.trackingTitle),
|
||||||
|
t.tracking,
|
||||||
|
new Title(t.geodataTitle),
|
||||||
|
t.geodata,
|
||||||
|
new Title(t.editingTitle),
|
||||||
|
t.editing,
|
||||||
|
new Title(t.miscCookiesTitle),
|
||||||
|
t.miscCookies,
|
||||||
|
new Title(t.whileYoureHere),
|
||||||
|
t.surveillance,
|
||||||
|
|
||||||
|
]);
|
||||||
|
this.SetClass("link-underline")
|
||||||
|
}
|
||||||
|
}
|
|
@ -188,7 +188,7 @@ class LayerOverviewUtils {
|
||||||
allTranslations
|
allTranslations
|
||||||
.filter(t => t.tr.translations[neededLanguage] === undefined && t.tr.translations["*"] === undefined)
|
.filter(t => t.tr.translations[neededLanguage] === undefined && t.tr.translations["*"] === undefined)
|
||||||
.forEach(missing => {
|
.forEach(missing => {
|
||||||
themeErrorCount.push("The theme " + theme.id + " should be translation-complete for " + neededLanguage + ", but it lacks a translation for " + missing.context+".\n\tThe full translation is "+missing.tr.translations)
|
themeErrorCount.push("The theme " + theme.id + " should be translation-complete for " + neededLanguage + ", but it lacks a translation for " + missing.context+".\n\tThe english translation is "+missing.tr.textFor('en'))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -208,10 +208,15 @@ function compileTranslationsFromWeblate() {
|
||||||
const allTranslations = new TranslationPart()
|
const allTranslations = new TranslationPart()
|
||||||
|
|
||||||
for (const translationFile of translations) {
|
for (const translationFile of translations) {
|
||||||
|
try{
|
||||||
|
|
||||||
const contents = JSON.parse(readFileSync(translationFile, "utf-8"));
|
const contents = JSON.parse(readFileSync(translationFile, "utf-8"));
|
||||||
let language = translationFile.substring(translationFile.lastIndexOf("/") + 1)
|
let language = translationFile.substring(translationFile.lastIndexOf("/") + 1)
|
||||||
language = language.substring(0, language.length - 5)
|
language = language.substring(0, language.length - 5)
|
||||||
allTranslations.add(language, contents)
|
allTranslations.add(language, contents)
|
||||||
|
}catch (e) {
|
||||||
|
throw "Could not read file "+ translationFile+" due to "+e
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
writeFileSync("./assets/generated/translations.json", JSON.stringify(JSON.parse(allTranslations.toJson()), null, " "))
|
writeFileSync("./assets/generated/translations.json", JSON.stringify(JSON.parse(allTranslations.toJson()), null, " "))
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
<div id="extradiv">'extradiv' not attached</div>
|
<div id="extradiv">'extradiv' not attached</div>
|
||||||
|
|
||||||
<script src="./test.ts"></script>
|
<script src="./test.ts"></script>
|
||||||
<iframe src="https://staging.anyways.eu/mechelen-reroute/#map=13.70/4.47874/51.02723&route=bicycle.commute" width="100%" height="100%" style="min-width: 250px; min-height: 250px" title="Routeplanner"></iframe>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
3
test.ts
3
test.ts
|
@ -0,0 +1,3 @@
|
||||||
|
import PrivacyPolicy from "./UI/BigComponents/PrivacyPolicy";
|
||||||
|
|
||||||
|
new PrivacyPolicy().AttachTo("maindiv")
|
Loading…
Reference in a new issue