From f398fea414cc3a2598a0486aa7997f6655d02c0a Mon Sep 17 00:00:00 2001 From: Andrew Dolgov <noreply@fakecake.org> Date: Thu, 4 Mar 2021 16:44:21 +0300 Subject: [PATCH] shorten plugin list action buttons --- classes/pref/prefs.php | 56 +++++++++++++++++++++------------------- themes/compact.css | 2 +- themes/compact_night.css | 2 +- themes/light.css | 2 +- themes/light/prefs.less | 2 +- themes/night.css | 2 +- themes/night_blue.css | 2 +- 7 files changed, 36 insertions(+), 32 deletions(-) diff --git a/classes/pref/prefs.php b/classes/pref/prefs.php index 5419b42dc..277334ac9 100644 --- a/classes/pref/prefs.php +++ b/classes/pref/prefs.php @@ -808,26 +808,32 @@ class Pref_Prefs extends Handler_Protected { <input disabled='1' dojoType='dijit.form.CheckBox' <?= $is_checked ?> type='checkbox'><?= htmlspecialchars($about[1]) ?> </label> + <?php if (count($tmppluginhost->get_all($plugin)) > 0) { + if (in_array($name, $system_enabled)) { ?> + <button dojoType='dijit.form.Button' title="<?= __("Clear data") ?>" + onclick='Helpers.Plugins.clearPluginData("<?= htmlspecialchars($name) ?>")'> + <i class='material-icons'>clear</i></button> + <?php } + } ?> + + <?php if ($about[4] ?? false) { ?> + <button dojoType='dijit.form.Button' class='alt-info' title="<?= __("More info...") ?>" + onclick='window.open("<?= htmlspecialchars($about[4]) ?>")'> + <i class='material-icons'>help</i></button> + <?php } ?> + <?php if ($_SESSION["access_level"] >= 10) { ?> - <button style="display : none" + <button style="display : none" class='alt-warning' title="<?= __("Update") ?>" data-update-btn-for-plugin="<?= htmlspecialchars($name) ?>" dojoType='dijit.form.Button' onclick='Helpers.Plugins.update("<?= htmlspecialchars($name) ?>")'> <?= \Controls\icon("update") ?> - <?= __("Update") ?> </button> <?php } ?> - <?php if ($about[4] ?? false) { ?> - <button dojoType='dijit.form.Button' class='alt-info' - onclick='window.open("<?= htmlspecialchars($about[4]) ?>")'> - <i class='material-icons'>open_in_new</i> <?= __("More info...") ?></button> - <?php } ?> - <?php if ($_SESSION["access_level"] >= 10 && $is_local) { ?> - <button dojoType='dijit.form.Button' + <button dojoType='dijit.form.Button' title="<?= __("Uninstall") ?>" onclick='Helpers.Plugins.uninstall("<?= htmlspecialchars($name) ?>")'> <?= \Controls\icon("delete") ?> - <?= __("Uninstall") ?> </button> <?php } ?> @@ -876,34 +882,32 @@ class Pref_Prefs extends Handler_Protected { </input> </label> - <?php if ($_SESSION["access_level"] >= 10) { ?> - <button style="display : none" - data-update-btn-for-plugin="<?= htmlspecialchars($name) ?>" dojoType='dijit.form.Button' - onclick='Helpers.Plugins.update("<?= htmlspecialchars($name) ?>")'> - <?= \Controls\icon("update") ?> - <?= __("Update") ?> - </button> - <?php } ?> - <?php if (count($tmppluginhost->get_all($plugin)) > 0) { if (in_array($name, $system_enabled) || in_array($name, $user_enabled)) { ?> - <button dojoType='dijit.form.Button' + <button dojoType='dijit.form.Button' title="<?= __("Clear data") ?>" onclick='Helpers.Plugins.clearPluginData("<?= htmlspecialchars($name) ?>")'> - <i class='material-icons'>clear</i> <?= __("Clear data") ?></button> + <i class='material-icons'>clear</i></button> <?php } } ?> <?php if ($about[4] ?? false) { ?> - <button dojoType='dijit.form.Button' class='alt-info' + <button dojoType='dijit.form.Button' class='alt-info' title="<?= __("More info...") ?>" onclick='window.open("<?= htmlspecialchars($about[4]) ?>")'> - <i class='material-icons'>open_in_new</i> <?= __("More info...") ?></button> + <i class='material-icons'>help</i></button> + <?php } ?> + + <?php if ($_SESSION["access_level"] >= 10) { ?> + <button style="display : none" class='alt-warning' title="<?= __("Update") ?>" + data-update-btn-for-plugin="<?= htmlspecialchars($name) ?>" dojoType='dijit.form.Button' + onclick='Helpers.Plugins.update("<?= htmlspecialchars($name) ?>")'> + <?= \Controls\icon("update") ?> + </button> <?php } ?> <?php if ($_SESSION["access_level"] >= 10 && $is_local) { ?> - <button dojoType='dijit.form.Button' + <button dojoType='dijit.form.Button' title="<?= __("Uninstall") ?>" onclick='Helpers.Plugins.uninstall("<?= htmlspecialchars($name) ?>")'> <?= \Controls\icon("delete") ?> - <?= __("Uninstall") ?> </button> <?php } ?> @@ -986,7 +990,7 @@ class Pref_Prefs extends Handler_Protected { <?= __("Enable selected plugins") ?> </button> <?php if ($_SESSION["access_level"] >= 10) { ?> - <button class="update-all-plugins-btn" style="display : none" dojoType='dijit.form.Button' onclick="Helpers.Plugins.update()"> + <button class="update-all-plugins-btn alt-warning" style="display : none" dojoType='dijit.form.Button' onclick="Helpers.Plugins.update()"> <?= \Controls\icon("update") ?> <?= __("Update local plugins") ?> </button> diff --git a/themes/compact.css b/themes/compact.css index 1f9d457dc..9656cd383 100644 --- a/themes/compact.css +++ b/themes/compact.css @@ -1506,7 +1506,7 @@ body.ttrss_prefs fieldset.prefs .help-text-bottom { margin-top: 10px; } body.ttrss_prefs fieldset.plugin label.description { - width: 600px; + width: 550px; margin-right: 150px; display: inline-block; } diff --git a/themes/compact_night.css b/themes/compact_night.css index 8f2507f4f..987f98b1b 100644 --- a/themes/compact_night.css +++ b/themes/compact_night.css @@ -1506,7 +1506,7 @@ body.ttrss_prefs fieldset.prefs .help-text-bottom { margin-top: 10px; } body.ttrss_prefs fieldset.plugin label.description { - width: 600px; + width: 550px; margin-right: 150px; display: inline-block; } diff --git a/themes/light.css b/themes/light.css index c1e5201d2..12ef7efd2 100644 --- a/themes/light.css +++ b/themes/light.css @@ -1506,7 +1506,7 @@ body.ttrss_prefs fieldset.prefs .help-text-bottom { margin-top: 10px; } body.ttrss_prefs fieldset.plugin label.description { - width: 600px; + width: 550px; margin-right: 150px; display: inline-block; } diff --git a/themes/light/prefs.less b/themes/light/prefs.less index 510388391..3fe328ec5 100644 --- a/themes/light/prefs.less +++ b/themes/light/prefs.less @@ -96,7 +96,7 @@ body.ttrss_prefs { fieldset.plugin { label.description { - width : 600px; + width : 550px; margin-right : 150px; display : inline-block; diff --git a/themes/night.css b/themes/night.css index 1000586cf..9a2ee53fa 100644 --- a/themes/night.css +++ b/themes/night.css @@ -1507,7 +1507,7 @@ body.ttrss_prefs fieldset.prefs .help-text-bottom { margin-top: 10px; } body.ttrss_prefs fieldset.plugin label.description { - width: 600px; + width: 550px; margin-right: 150px; display: inline-block; } diff --git a/themes/night_blue.css b/themes/night_blue.css index 4df5f54ab..80f173c7e 100644 --- a/themes/night_blue.css +++ b/themes/night_blue.css @@ -1507,7 +1507,7 @@ body.ttrss_prefs fieldset.prefs .help-text-bottom { margin-top: 10px; } body.ttrss_prefs fieldset.plugin label.description { - width: 600px; + width: 550px; margin-right: 150px; display: inline-block; } -- GitLab