2020-02-18 11:32:17 +00:00
|
|
|
mailSettings = {}
|
|
|
|
|
|
|
|
fetch('/config/get/mail', {
|
|
|
|
headers: {
|
|
|
|
"content-type": "application/json",
|
|
|
|
"token": webpass
|
|
|
|
}})
|
|
|
|
.then((resp) => resp.json())
|
|
|
|
.then(function(settings) {
|
|
|
|
mailSettings = settings || {}
|
|
|
|
if (mailSettings.default_forward_secrecy === false){
|
|
|
|
document.getElementById('forwardSecrecySetting').checked = false
|
|
|
|
}
|
2020-02-19 07:57:56 +00:00
|
|
|
if (mailSettings.use_padding === false){
|
2020-02-24 10:45:29 +00:00
|
|
|
document.getElementById('messagePaddingSetting').checked = false
|
|
|
|
}
|
|
|
|
if (mailSettings.notificationSetting === false){
|
|
|
|
document.getElementById('notificationSetting').checked = false
|
2020-02-19 07:57:56 +00:00
|
|
|
}
|
2020-04-06 04:21:21 +00:00
|
|
|
if (mailSettings.notificationSound === false){
|
|
|
|
document.getElementById('notificationSound').checked = false
|
|
|
|
}
|
2020-03-23 03:04:20 +00:00
|
|
|
if (typeof mailSettings.signature != undefined && mailSettings.signature != null && mailSettings.signature != ""){
|
2020-03-04 10:45:27 +00:00
|
|
|
document.getElementById('mailSignatureSetting').value = mailSettings.signature
|
|
|
|
}
|
2020-04-06 04:21:21 +00:00
|
|
|
if (mailSettings.strangersNotification == false){
|
|
|
|
document.getElementById('strangersNotification').checked = false
|
|
|
|
}
|
2020-02-18 11:32:17 +00:00
|
|
|
})
|