Changed: StorageResultType to error result code

This commit is contained in:
djmaze 2021-03-16 09:46:23 +01:00
parent be3ef15f8e
commit 4a8d516123
33 changed files with 257 additions and 302 deletions

View file

@ -1,6 +1,6 @@
import ko from 'ko';
import { StorageResultType, Notification } from 'Common/Enums';
import { Notification } from 'Common/Enums';
import { SettingsGet } from 'Common/Globals';
import { getNotification } from 'Common/Translator';
@ -53,14 +53,14 @@ export class PluginsAdminSettings {
PluginAdminStore.fetch();
}
onPluginLoadRequest(result, data) {
if (StorageResultType.Success === result && data && data.Result) {
onPluginLoadRequest(iError, data) {
if (!iError && data && data.Result) {
showScreenPopup(PluginPopupView, [data.Result]);
}
}
onPluginDisableRequest(result, data) {
if (StorageResultType.Success === result && data) {
onPluginDisableRequest(iError, data) {
if (!iError && data) {
if (!data.Result && data.ErrorCode) {
if (Notification.UnsupportedPluginPackage === data.ErrorCode && data.ErrorMessage && data.ErrorMessage) {
PluginAdminStore.error(data.ErrorMessage);