Skip to content

Commit

Permalink
Fix Hoot non-Pro warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jwbonner committed Sep 20, 2024
1 parent 36671f7 commit 099ce92
Showing 1 changed file with 20 additions and 18 deletions.
38 changes: 20 additions & 18 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,24 +268,26 @@ async function handleHubMessage(window: BrowserWindow, message: NamedMessage) {
uuid: uuid
});
if (hasHootNonPro) {
dialog
.showMessageBox(window, {
type: "info",
title: "Alert",
message: "Limited Signals Available",
detail:
"This log file includes a limited number of signals from Phoenix devices. Check the Phoenix documentation for details.",
checkboxLabel: "Don't Show Again",
icon: WINDOW_ICON
})
.then((response) => {
if (response.checkboxChecked) {
let prefs: Preferences = jsonfile.readFileSync(PREFS_FILENAME);
prefs.skipHootNonProWarning = true;
jsonfile.writeFileSync(PREFS_FILENAME, prefs);
sendAllPreferences();
}
});
let prefs: Preferences = jsonfile.readFileSync(PREFS_FILENAME);
if (!prefs.skipHootNonProWarning) {
dialog
.showMessageBox(window, {
type: "info",
title: "Alert",
message: "Limited Signals Available",
detail:
"This log file includes a limited number of signals from Phoenix devices. Check the Phoenix documentation for details.",
checkboxLabel: "Don't Show Again",
icon: WINDOW_ICON
})
.then((response) => {
if (response.checkboxChecked) {
prefs.skipHootNonProWarning = true;
jsonfile.writeFileSync(PREFS_FILENAME, prefs);
sendAllPreferences();
}
});
}
}
}
};
Expand Down

0 comments on commit 099ce92

Please sign in to comment.