From e03afe61ab068a3b0622dd404f866fd0038c030d Mon Sep 17 00:00:00 2001 From: Eduard Heimbuch Date: Thu, 3 Feb 2022 14:16:01 +0100 Subject: [PATCH] Adjust reload button on plugin actions (#1946) Adjust the reload button on plugin actions after restart to be a proper button instead an link styled button. --- gradle/changelog/reload_button.yaml | 2 ++ scm-ui/ui-webapp/public/locales/de/admin.json | 10 +++---- scm-ui/ui-webapp/public/locales/en/admin.json | 10 +++---- .../plugins/components/PluginActionModal.tsx | 29 +++++++++++++------ .../admin/plugins/components/PluginModal.tsx | 29 +++++++++++++------ .../components/SuccessNotification.tsx | 12 ++------ 6 files changed, 54 insertions(+), 38 deletions(-) create mode 100644 gradle/changelog/reload_button.yaml diff --git a/gradle/changelog/reload_button.yaml b/gradle/changelog/reload_button.yaml new file mode 100644 index 0000000000..4841873fb0 --- /dev/null +++ b/gradle/changelog/reload_button.yaml @@ -0,0 +1,2 @@ +- type: fixed + description: Adjust reload button on plugin actions ([#1946](https://github.com/scm-manager/scm-manager/pull/1946)) diff --git a/scm-ui/ui-webapp/public/locales/de/admin.json b/scm-ui/ui-webapp/public/locales/de/admin.json index 412a0b0318..65ce0327d6 100644 --- a/scm-ui/ui-webapp/public/locales/de/admin.json +++ b/scm-ui/ui-webapp/public/locales/de/admin.json @@ -74,11 +74,11 @@ "dependencyNotification": "Mit diesem Plugin werden folgende Abhängigkeiten mit installiert bzw. aktualisiert, wenn sie noch nicht in der aktuellen Version vorhanden sind!", "optionalDependencyNotification": "Mit diesem Plugin werden folgende optionale Abhängigkeiten mit aktualisiert, falls sie installiert sind!", "dependencies": "Abhängigkeiten", - "installedNotification": "Das Plugin wurde erfolgreich installiert. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden:", - "updatedNotification": "Das Plugin wurde erfolgreich aktualisiert. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden:", - "uninstalledNotification": "Das Plugin wurde erfolgreich installiert. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden:", - "executedChangesNotification": "Die Plugin Änderungen wurden erfolgreich durchgeführt. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden:", - "reload": "jetzt neu laden", + "installedNotification": "Das Plugin wurde erfolgreich installiert. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden.", + "updatedNotification": "Das Plugin wurde erfolgreich aktualisiert. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden.", + "uninstalledNotification": "Das Plugin wurde erfolgreich installiert. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden.", + "executedChangesNotification": "Die Plugin Änderungen wurden erfolgreich durchgeführt. Um Änderungen an der UI zu sehen, muss die Seite neu geladen werden.", + "reload": "Seite neu laden", "restartNotification": "Der SCM-Manager sollte nur neu gestartet werden, wenn aktuell niemand damit arbeitet.", "executePending": "Die folgenden Plugin-Änderungen werden ausgeführt. Anschließend wird SCM-Manager neu gestartet.", "cancelPending": "Die folgenden Plugin-Änderungen werden abgebrochen und zurückgesetzt.", diff --git a/scm-ui/ui-webapp/public/locales/en/admin.json b/scm-ui/ui-webapp/public/locales/en/admin.json index 6c6606033b..fef458d237 100644 --- a/scm-ui/ui-webapp/public/locales/en/admin.json +++ b/scm-ui/ui-webapp/public/locales/en/admin.json @@ -74,11 +74,11 @@ "dependencyNotification": "With this plugin, the following dependencies will be installed/updated if their latest versions are not installed yet!", "optionalDependencyNotification": "With this plugin, the following optional dependencies will be updated if they are installed!", "dependencies": "Dependencies", - "installedNotification": "Successfully installed plugin. You have to reload the page, to see ui changes:", - "updatedNotification": "Successfully updated plugin. You have to reload the page, to see ui changes:", - "uninstalledNotification": "Successfully uninstalled plugin. You have to reload the page, to see ui changes:", - "executedChangesNotification": "Successfully executed plugin changes. You have to reload the page, to see ui changes:", - "reload": "reload now", + "installedNotification": "Successfully installed plugin. You have to reload the page, to see ui changes.", + "updatedNotification": "Successfully updated plugin. You have to reload the page, to see ui changes.", + "uninstalledNotification": "Successfully uninstalled plugin. You have to reload the page, to see ui changes.", + "executedChangesNotification": "Successfully executed plugin changes. You have to reload the page, to see ui changes.", + "reload": "Reload now", "restartNotification": "You should only restart SCM-Manager if no one else is currently working with it.", "executePending": "The following plugin changes will be executed and after that the SCM-Manager will be restarted.", "cancelPending": "The following plugin changes will be canceled.", diff --git a/scm-ui/ui-webapp/src/admin/plugins/components/PluginActionModal.tsx b/scm-ui/ui-webapp/src/admin/plugins/components/PluginActionModal.tsx index cae0f842bb..fc829c90fe 100644 --- a/scm-ui/ui-webapp/src/admin/plugins/components/PluginActionModal.tsx +++ b/scm-ui/ui-webapp/src/admin/plugins/components/PluginActionModal.tsx @@ -141,15 +141,26 @@ const PluginActionModal: FC = ({ const footer = ( -