mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-01 19:49:54 +02:00
web: do not disable telemetry toggle if DNT=true
This commit is contained in:
committed by
Abdullah Atta
parent
2da32e27ff
commit
a7369bf869
@@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
import Config from "./config";
|
||||
|
||||
export function isTelemetryEnabled() {
|
||||
return !doNotTrack() && Config.get("telemetry", true);
|
||||
export function isTelemetryEnabled(ignoreDNT = false) {
|
||||
return (ignoreDNT || !doNotTrack()) && Config.get("telemetry", true);
|
||||
}
|
||||
|
||||
export function setTelemetry(state: boolean) {
|
||||
|
||||
@@ -823,16 +823,11 @@ function Settings() {
|
||||
<Toggle
|
||||
title="Enable telemetry"
|
||||
onTip="Usage data & crash reports will be sent to us (no 3rd party involved) for analytics. All data is anonymous as mentioned in our privacy policy."
|
||||
offTip={
|
||||
isTelemetryDisabled
|
||||
? "All telemetry is disabled because of Do Not Track being enabled in your browser."
|
||||
: "Do not collect any data or crash reports"
|
||||
}
|
||||
offTip={"Do not collect any data or crash reports"}
|
||||
onToggled={() => {
|
||||
setEnableTelemetry(!enableTelemetry);
|
||||
}}
|
||||
isToggled={enableTelemetry}
|
||||
disabled={isTelemetryDisabled}
|
||||
/>
|
||||
<Button variant="list" onClick={showTrackingDetailsDialog}>
|
||||
<Tip
|
||||
|
||||
Reference in New Issue
Block a user