Skip to content

Commit

Permalink
web: do not disable telemetry toggle if DNT=true
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed Jan 17, 2023
1 parent 2da32e2 commit a7369bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions apps/web/src/utils/telemetry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
7 changes: 1 addition & 6 deletions apps/web/src/views/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a7369bf

Please sign in to comment.