Introduce Aptabase tracking preference

- Add an option to enable or disable Aptabase tracking for users, in the app menu.

- Also give users a prompt on the app's first launch to choose their preference.
This commit is contained in:
Agampreet Singh
2024-07-22 14:04:26 +05:30
parent c4e72a6e47
commit 9a9af15e2e
3 changed files with 56 additions and 7 deletions

View File

@@ -326,6 +326,35 @@ const commonPreferencesSubmenu = [
},
checked: getValue("discordrpcstatus") === "true",
},
{
label: "Enable Aptabase Tracking",
type: "checkbox",
click: () => {
if (getValue("aptabaseTracking") === true) {
setValue("aptabaseTracking", false);
dialog.showMessageBoxSync({
type: "info",
title: "Aptabase Tracking",
message: "Aptabase Tracking has been disabled.",
buttons: ["OK"],
});
return;
} else if (
getValue("aptabaseTracking") === false ||
getValue("aptabaseTracking") === undefined
) {
setValue("aptabaseTracking", true);
dialog.showMessageBoxSync({
type: "info",
title: "Aptabase Tracking",
message: "Aptabase Tracking has been enabled.",
buttons: ["OK"],
});
return;
}
},
checked: getValue("aptabaseTracking") === true,
},
{
label: "Enable Auto Updates",
type: "checkbox",