From a1133176c66336922f8c254f8daefe604637162c Mon Sep 17 00:00:00 2001 From: Florian Scholdei Date: Wed, 16 Mar 2022 13:28:46 +0100 Subject: [PATCH] Hide plugin dependencies on uninstall (#1977) When uninstalling a plugin, there should be no notification about installing or updating plugins. --- gradle/changelog/delete_plugin_dependencies.yaml | 2 ++ .../src/admin/plugins/components/PluginModal.tsx | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 gradle/changelog/delete_plugin_dependencies.yaml diff --git a/gradle/changelog/delete_plugin_dependencies.yaml b/gradle/changelog/delete_plugin_dependencies.yaml new file mode 100644 index 0000000000..f7ecdc6849 --- /dev/null +++ b/gradle/changelog/delete_plugin_dependencies.yaml @@ -0,0 +1,2 @@ +- type: fixed + description: Hide plugin dependencies on uninstall ([#1977](https://github.com/scm-manager/scm-manager/pull/1977)) diff --git a/scm-ui/ui-webapp/src/admin/plugins/components/PluginModal.tsx b/scm-ui/ui-webapp/src/admin/plugins/components/PluginModal.tsx index a5e75a79e4..53d8df0faa 100644 --- a/scm-ui/ui-webapp/src/admin/plugins/components/PluginModal.tsx +++ b/scm-ui/ui-webapp/src/admin/plugins/components/PluginModal.tsx @@ -129,7 +129,7 @@ const PluginModal: FC = ({ onClose, pluginAction, plugin }) => { const renderDependencies = () => { let dependencies = null; - if (plugin.dependencies && plugin.dependencies.length > 0) { + if (pluginAction !== PluginAction.UNINSTALL && plugin.dependencies && plugin.dependencies.length > 0) { dependencies = (
@@ -148,7 +148,11 @@ const PluginModal: FC = ({ onClose, pluginAction, plugin }) => { const renderOptionalDependencies = () => { let optionalDependencies = null; - if (plugin.optionalDependencies && plugin.optionalDependencies.length > 0) { + if ( + pluginAction !== PluginAction.UNINSTALL && + plugin.optionalDependencies && + plugin.optionalDependencies.length > 0 + ) { optionalDependencies = (