mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Update config name for notifications
This commit is contained in:
parent
edd53929be
commit
8f308d9adc
|
@ -101,7 +101,7 @@ const configDefaultSettings =
|
||||||
"enable_auto_retry" : "False", \
|
"enable_auto_retry" : "False", \
|
||||||
"tx_delay" : 0, \
|
"tx_delay" : 0, \
|
||||||
"auto_start": 0, \
|
"auto_start": 0, \
|
||||||
"notification": 1 \
|
"enable_sys_notification": 1 \
|
||||||
}';
|
}';
|
||||||
|
|
||||||
if (!fs.existsSync(configPath)) {
|
if (!fs.existsSync(configPath)) {
|
||||||
|
|
|
@ -2843,7 +2843,7 @@ function clearUnreadMessages(dxcall) {
|
||||||
//Have the operating system show a notification popup
|
//Have the operating system show a notification popup
|
||||||
function showOsPopUp(title, message)
|
function showOsPopUp(title, message)
|
||||||
{
|
{
|
||||||
if (config.notification == 0) return;
|
if (config.enable_sys_notification == 0) return;
|
||||||
const NOTIFICATION_TITLE = title;
|
const NOTIFICATION_TITLE = title;
|
||||||
const NOTIFICATION_BODY = message;
|
const NOTIFICATION_BODY = message;
|
||||||
new Notification(NOTIFICATION_TITLE, { body: NOTIFICATION_BODY });
|
new Notification(NOTIFICATION_TITLE, { body: NOTIFICATION_BODY });
|
||||||
|
|
|
@ -390,7 +390,7 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||||
document.getElementById("AutoStartSwitch").checked = false;
|
document.getElementById("AutoStartSwitch").checked = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.notification == 1) {
|
if (config.enable_sys_notification == 1) {
|
||||||
document.getElementById("NotificationSwitch").checked = true;
|
document.getElementById("NotificationSwitch").checked = true;
|
||||||
} else {
|
} else {
|
||||||
document.getElementById("NotificationSwitch").checked = false;
|
document.getElementById("NotificationSwitch").checked = false;
|
||||||
|
@ -1222,9 +1222,9 @@ window.addEventListener("DOMContentLoaded", () => {
|
||||||
//Handle change of Notification settings
|
//Handle change of Notification settings
|
||||||
document.getElementById("NotificationSwitch").addEventListener("click", () => {
|
document.getElementById("NotificationSwitch").addEventListener("click", () => {
|
||||||
if (document.getElementById("NotificationSwitch").checked == true) {
|
if (document.getElementById("NotificationSwitch").checked == true) {
|
||||||
config.notification = 1;
|
config.enable_sys_notification = 1;
|
||||||
} else {
|
} else {
|
||||||
config.notification = 0;
|
config.enable_sys_notification = 0;
|
||||||
}
|
}
|
||||||
//fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
//fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
||||||
FD.saveConfig(config, configPath);
|
FD.saveConfig(config, configPath);
|
||||||
|
@ -3806,7 +3806,7 @@ function autostart_tnc() {
|
||||||
//Have the operating system show a notification popup
|
//Have the operating system show a notification popup
|
||||||
function showOsPopUp(title, message)
|
function showOsPopUp(title, message)
|
||||||
{
|
{
|
||||||
if (config.notification == 0) return;
|
if (config.enable_sys_notification == 0) return;
|
||||||
const NOTIFICATION_TITLE = title;
|
const NOTIFICATION_TITLE = title;
|
||||||
const NOTIFICATION_BODY = message;
|
const NOTIFICATION_BODY = message;
|
||||||
new Notification(NOTIFICATION_TITLE, { body: NOTIFICATION_BODY });
|
new Notification(NOTIFICATION_TITLE, { body: NOTIFICATION_BODY });
|
||||||
|
|
Loading…
Reference in a new issue