show Max Storage Amount notice on login if set to lower than 20GB

email-send-options-from-account
Moe 2021-10-27 16:18:52 -07:00
parent 339fc6a425
commit 1215ec4fff
2 changed files with 18 additions and 0 deletions

View File

@ -1246,5 +1246,6 @@
"Backup": "Backup",
"Close All Monitors": "Close All Monitors",
"Daily Events": "Daily Events",
"setMaxStorageAmountText": "You should set your Max Storage Amount in your Account Settings located on the left. Find the option under the Profile section. It is currently set to 10 GB.",
"Cloud": "Cloud"
}

View File

@ -99,6 +99,22 @@ function drawAddStorageIndicators(){
}
})
}
function showLoginNotices(){
$.each([
{
isValid: !$user.details.size || parseInt($user.details.size) < 20000,
PNotify: {
type:'warning',
title: lang['Max Storage Amount'],
text: lang.setMaxStorageAmountText,
}
}
],function(n,notice){
if(notice.isValid){
new PNotify(notice.PNotify)
}
})
}
$('body')
.one('click',function(){
window.hadFocus = true
@ -197,6 +213,7 @@ $(document).ready(function(){
loadLocalStorageInputValues()
loadBoxWrappers()
drawAddStorageIndicators()
showLoginNotices()
// set onFullScreenChange
document.addEventListener("fullscreenchange", onFullScreenChange, false);
document.addEventListener("webkitfullscreenchange", onFullScreenChange, false);