diff --git a/package.json b/package.json index d44fdee..3edbcad 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,7 @@ "react-i18next": "^11.8.11", "react-redux": "^7.2.2", "react-router-dom": "^5.2.0", + "react-router-hash-link": "^2.4.0", "react-timeago": "^5.2.0", "react-world-flags": "^1.4.0", "redux": "^4.0.5", @@ -105,6 +106,7 @@ "@types/react-dom": "^17.0.2", "@types/react-redux": "^7.1.16", "@types/react-router-dom": "^5.1.7", + "@types/react-router-hash-link": "^1.2.1", "@types/react-timeago": "^4.1.2", "@types/semver": "^7.3.4", "@types/shallowequal": "^1.1.1", diff --git a/public/locales/en.json b/public/locales/en.json index e185dad..204ee61 100644 --- a/public/locales/en.json +++ b/public/locales/en.json @@ -421,6 +421,16 @@ "buildTime": "Build time", "variant": "Build variant", "license": "License" + }, + + "privacyTitle": "Privacy", + "privacy": { + "kristServer": "Krist Server", + "kristServerDesc": "The only PII that the <1>Krist Server1> stores is your IP address, User-Agent and Origin, as part of the webserver logs. This information is automatically purged after 30 days.", + "kristweb": "KristWeb", + "kristwebDesc1": "KristWeb uses a self-hosted <1>Sentry1> server for automatic error reporting. This system stores your IP address, User-Agent, Origin, breadcrumbs, and the details for any errors that get automatically reported. This information is automatically purged after 30 days.", + "kristwebDesc2": "If you have an ad-blocking or tracker-blocking extension such as <1>uBlock Origin1> (recommended), our Sentry system is already blocked by the built-in lists, so you do not have to worry about your privacy. You can also opt-out of error reporting in the <4>settings page4>. That said, if you’d like to help us by providing more detailed error reports, then please consider making an exception for KristWeb in your tracker blocker software. This site does not serve ads.", + "kristwebDesc3": "If you have any questions or concerns, please contact the developers." } }, @@ -468,6 +478,7 @@ "tableHotkeys": "Enable table navigation hotkeys (left and right arrows)", "subMenuPrivacy": "Privacy", + "privacyInfo": "Privacy information", "errorReporting": "Enable automatic error reporting (requires refresh)", "messageOnErrorReport": "Show a notification when an error is automatically reported (requires refresh)", diff --git a/src/global/ErrorBoundary.tsx b/src/global/ErrorBoundary.tsx index 66f079c..5b916e0 100644 --- a/src/global/ErrorBoundary.tsx +++ b/src/global/ErrorBoundary.tsx @@ -7,6 +7,7 @@ import { useTFns } from "@utils/i18n"; import * as Sentry from "@sentry/react"; +import { errorReporting } from "@utils"; interface Props { name: string; @@ -37,8 +38,11 @@ description={<>
{tStr("description")}
- {/* TODO: Hide this if Sentry is disabled */} -{tStr("sentryNote")}
+ {/* If Sentry error reporting is enabled, add a message saying the error + * was automatically reported. */} + {errorReporting && ( +{tStr("sentryNote")}
+ )} >} />; } diff --git a/src/pages/credits/CreditsPage.less b/src/pages/credits/CreditsPage.less index c3e248b..642071e 100644 --- a/src/pages/credits/CreditsPage.less +++ b/src/pages/credits/CreditsPage.less @@ -20,4 +20,11 @@ text-align: left; } + + .credits-privacy { + max-width: 840px; + margin: 0 auto; + + text-align: left; + } } diff --git a/src/pages/credits/CreditsPage.tsx b/src/pages/credits/CreditsPage.tsx index 136f39d..05ee64b 100644 --- a/src/pages/credits/CreditsPage.tsx +++ b/src/pages/credits/CreditsPage.tsx @@ -5,8 +5,11 @@ import { useTranslation, Trans } from "react-i18next"; import { PageLayout } from "@layout/PageLayout"; + import { Supporters } from "./Supporters"; import { Translators } from "./Translators"; +import { Privacy } from "./Privacy"; + import { DateTime } from "@comp/DateTime"; import { getAuthorInfo, useHostInfo } from "@utils"; @@ -98,6 +101,10 @@{tStr("kristwebDesc3")}
+