update system plugins feature

This commit is contained in:
Vikulov Dmitry
2023-05-06 13:07:31 +03:00
parent b8c6da3d54
commit 99c00da403

View File

@ -684,7 +684,7 @@ function createPluginDiv(plugin, bInstalled) {
let bHasUpdate = false;
let bRemoved = (installed && installed.removed);
if (bCheckUpdate && installed && installed.canRemoved && plugin) {
if (bCheckUpdate && installed && plugin) {
const installedV = getPluginVersion(installed.obj.version);
const lastV = getPluginVersion(plugin.version);
if (lastV > installedV) {
@ -727,7 +727,7 @@ function onClickInstall(target, event) {
// click install button
event.stopImmediatePropagation();
// click install button
// we should do that because we have some problem when desctop is loading plugin
// we should do that because we have some problem when desktop is loading plugin
if (isDesktop) {
toogleLoader(true, 'Installation');
} else {
@ -743,7 +743,7 @@ function onClickInstall(target, event) {
guid : guid,
config : (installed ? installed.obj : plugin)
};
// we should do that because we have some problem when desctop is loading plugin
// we should do that because we have some problem when desktop is loading plugin
if (isDesktop) {
setTimeout(function(){
sendMessage(message);
@ -755,9 +755,9 @@ function onClickInstall(target, event) {
function onClickUpdate(target) {
// click update button
// we should do that because we have some problem when desctop is loading plugin
// we should do that because we have some problem when desktop is loading plugin
if (isDesktop) {
toogleLoader(true, 'Installation');
toogleLoader(true, 'Updating');
} else {
clearTimeout(timeout);
timeout = setTimeout(toogleLoader, 200, true, "Updating");
@ -771,7 +771,7 @@ function onClickUpdate(target) {
guid : guid,
config : plugin
};
// we should do that because we have some problem when desctop is loading plugin
// we should do that because we have some problem when desktop is loading plugin
if (isDesktop) {
setTimeout(function(){
sendMessage(message);
@ -784,8 +784,12 @@ function onClickUpdate(target) {
function onClickRemove(target, event) {
event.stopImmediatePropagation();
// click remove button
clearTimeout(timeout);
timeout = setTimeout(toogleLoader, 200, true, "Removal");
if (isDesktop) {
toogleLoader(true, 'Removal');
} else {
clearTimeout(timeout);
timeout = setTimeout(toogleLoader, 200, true, "Removal");
}
let guid = target.parentNode.parentNode.getAttribute('data-guid');
let message = {
type : 'remove',