mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 04:59:21 +03:00
Improvements for issue #136
This commit is contained in:
parent
9cf83eb62a
commit
3756264669
7 changed files with 175 additions and 151 deletions
|
|
@ -57,13 +57,6 @@ export class PackagesAdminSettings {
|
|||
|
||||
requestHelper(packageToRequest, install) {
|
||||
return (iError, data) => {
|
||||
if (iError) {
|
||||
this.packagesError(
|
||||
getNotification(install ? Notification.CantInstallPackage : Notification.CantDeletePackage)
|
||||
// ':\n' + getNotification(iError);
|
||||
);
|
||||
}
|
||||
|
||||
PackageAdminStore.forEach(item => {
|
||||
if (item && packageToRequest && item.loading && item.loading() && packageToRequest.file === item.file) {
|
||||
packageToRequest.loading(false);
|
||||
|
|
@ -71,7 +64,12 @@ export class PackagesAdminSettings {
|
|||
}
|
||||
});
|
||||
|
||||
if (!iError && data.Result.Reload) {
|
||||
if (iError) {
|
||||
this.packagesError(
|
||||
getNotification(install ? Notification.CantInstallPackage : Notification.CantDeletePackage)
|
||||
+ (data.ErrorMessage ? ':\n' + data.ErrorMessage : '')
|
||||
);
|
||||
} else if (data.Result.Reload) {
|
||||
location.reload();
|
||||
} else {
|
||||
PackageAdminStore.fetch();
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ PackageAdminStore.real = ko.observable(true);
|
|||
|
||||
PackageAdminStore.loading = ko.observable(false);
|
||||
|
||||
//PackageAdminStore.error = ko.observable('');
|
||||
PackageAdminStore.error = ko.observable('');
|
||||
|
||||
PackageAdminStore.fetch = () => {
|
||||
PackageAdminStore.loading(true);
|
||||
|
|
@ -18,6 +18,7 @@ PackageAdminStore.fetch = () => {
|
|||
PackageAdminStore.real(false);
|
||||
} else {
|
||||
PackageAdminStore.real(!!data.Result.Real);
|
||||
PackageAdminStore.error(data.Result.Error);
|
||||
|
||||
const loading = {};
|
||||
PackageAdminStore.forEach(item => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue