don't check for plugin updates automatically on pane open

This commit is contained in:
Andrew Dolgov 2021-03-05 10:25:32 +03:00
parent b649d2240f
commit 98c75a9e43
2 changed files with 16 additions and 11 deletions

View File

@ -938,12 +938,6 @@ class Pref_Prefs extends Handler_Protected {
} }
</script> </script>
<?php if (Config::get(Config::CHECK_FOR_UPDATES) && Config::get(Config::CHECK_FOR_PLUGIN_UPDATES) && $_SESSION["access_level"] >= 10) { ?>
<script type="dojo/method" event="onShow" args="evt">
Helpers.Plugins.checkForUpdate();
</script>
<?php } ?>
<?= \Controls\hidden_tag("op", "pref-prefs") ?> <?= \Controls\hidden_tag("op", "pref-prefs") ?>
<?= \Controls\hidden_tag("method", "setplugins") ?> <?= \Controls\hidden_tag("method", "setplugins") ?>
@ -987,13 +981,21 @@ class Pref_Prefs extends Handler_Protected {
<i class='material-icons'>help</i> <?= __("More info...") ?> <i class='material-icons'>help</i> <?= __("More info...") ?>
</button> </button>
<button dojoType='dijit.form.Button' class='alt-primary' type='submit'> <button dojoType='dijit.form.Button' class='alt-primary' type='submit'>
<?= __("Enable selected plugins") ?> <?= __("Enable selected") ?>
</button> </button>
<?php if ($_SESSION["access_level"] >= 10) { ?> <?php if ($_SESSION["access_level"] >= 10) { ?>
<button class="update-all-plugins-btn alt-warning" style="display : none" dojoType='dijit.form.Button' onclick="Helpers.Plugins.update()"> <?php if (Config::get(Config::CHECK_FOR_UPDATES) && Config::get(Config::CHECK_FOR_PLUGIN_UPDATES)) { ?>
<?= \Controls\icon("update") ?>
<?= __("Update local plugins") ?> <button dojoType='dijit.form.Button' onclick="Helpers.Plugins.checkForUpdate()">
</button> <?= \Controls\icon("update") ?>
<?= __("Check for updates") ?>
</button>
<button class="update-all-plugins-btn alt-warning" style="display : none" dojoType='dijit.form.Button' onclick="Helpers.Plugins.update()">
<?= \Controls\icon("update") ?>
<?= __("Update plugins") ?>
</button>
<?php } ?>
<?php if (Config::get(Config::ENABLE_PLUGIN_INSTALLER)) { ?> <?php if (Config::get(Config::ENABLE_PLUGIN_INSTALLER)) { ?>
<button dojoType='dijit.form.Button' onclick="Helpers.Plugins.install()"> <button dojoType='dijit.form.Button' onclick="Helpers.Plugins.install()">

View File

@ -339,6 +339,9 @@ const Helpers = {
if (plugins_with_updates > 0) if (plugins_with_updates > 0)
App.find(".update-all-plugins-btn").show(); App.find(".update-all-plugins-btn").show();
else
Notify.info("All local plugins are up-to-date.");
} else { } else {
Notify.error("Unable to check for plugin updates."); Notify.error("Unable to check for plugin updates.");
} }