Small fixes

This commit is contained in:
RainLoop 2017-10-01 20:54:50 +03:00
parent d76fde37df
commit 71718db8f0
13 changed files with 101 additions and 177 deletions

View file

@ -44,6 +44,8 @@ class GeneralAdminSettings
this.weakPassword = AppAdminStore.weakPassword;
this.newMoveToFolder = AppAdminStore.newMoveToFolder;
this.dataFolderAccess = AppAdminStore.dataFolderAccess;
this.mainAttachmentLimit = ko.observable(pInt(settingsGet('AttachmentLimit')) / (Magics.BitLength1024 * Magics.BitLength1024)).extend({posInterer: 25});
this.uploadData = settingsGet('PhpUploadSizes');

View file

@ -13,6 +13,8 @@ class AppAdminStore extends AbstractAppStore
this.weakPassword = ko.observable(false);
this.useLocalProxyForExternalImages = ko.observable(false);
this.dataFolderAccess = ko.observable(false);
}
populate() {
@ -23,6 +25,14 @@ class AppAdminStore extends AbstractAppStore
this.weakPassword(!!settingsGet('WeakPassword'));
this.useLocalProxyForExternalImages(!!settingsGet('UseLocalProxyForExternalImages'));
if (settingsGet('Auth')) {
this.checkDataFolder();
}
}
checkDataFolder() {
$.get('./data/VERSION?' + window.Math.random()).then((value) => this.dataFolderAccess(true));
}
}