diff --git a/scm-ui/public/locales/de/admin.json b/scm-ui/public/locales/de/admin.json index 3f39de2717..3b9a79dfa9 100644 --- a/scm-ui/public/locales/de/admin.json +++ b/scm-ui/public/locales/de/admin.json @@ -31,12 +31,14 @@ }, "noPlugins": "Keine Plugins gefunden.", "modal": { - "title": "Plugin installieren", - "dependency": "Abhängigkeit:", - "dependency_plural": "Abhängigkeiten:", + "title": "{{name}} Plugin installieren", "restart": "Neustarten um Plugin zu aktivieren", "install": "Installieren", - "abort": "Abbrechen" + "abort": "Abbrechen", + "author": "Autor", + "version": "Version", + "dependencyNotification": "Mit diesem Plugin werden folgende Abhängigkeiten mit installieren wenn sie noch nicht vorhanden sind.", + "dependencies": "Abhängigkeiten" } }, "repositoryRole": { diff --git a/scm-ui/public/locales/en/admin.json b/scm-ui/public/locales/en/admin.json index 970dc44c7f..7a601fefe4 100644 --- a/scm-ui/public/locales/en/admin.json +++ b/scm-ui/public/locales/en/admin.json @@ -6,7 +6,7 @@ "settingsNavLink": "Settings", "generalNavLink": "General" }, - "info": { + "info": { "currentAppVersion": "Current Application Version", "communityTitle": "Community Support", "communityIconAlt": "Community Support Icon", @@ -31,12 +31,14 @@ }, "noPlugins": "No plugins found.", "modal": { - "title": "Install Plugin", - "dependency": "Dependency:", - "dependency_plural": "Dependencies:", + "title": "Install {{name}} Plugin", "restart": "Restart to activate", "install": "Install", - "abort": "Abort" + "abort": "Abort", + "author": "Author", + "version": "Version", + "dependencyNotification": "With this plugin, the following dependencies are installed if they are not available yet.", + "dependencies": "Dependencies" } }, "repositoryRole": { @@ -61,7 +63,7 @@ "permissions": "Permissions", "submit": "Save" }, - "delete" : { + "delete": { "button": "Löschen", "subtitle": "Berechtigungsrolle löschen", "confirmAlert": { diff --git a/scm-ui/src/admin/plugins/components/PluginEntry.js b/scm-ui/src/admin/plugins/components/PluginEntry.js index 12bc5c35c5..fa62786fc2 100644 --- a/scm-ui/src/admin/plugins/components/PluginEntry.js +++ b/scm-ui/src/admin/plugins/components/PluginEntry.js @@ -19,6 +19,7 @@ type State = { const styles = { link: { + cursor: "pointer", pointerEvents: "all" } }; diff --git a/scm-ui/src/admin/plugins/components/PluginModal.js b/scm-ui/src/admin/plugins/components/PluginModal.js index aa126f6c58..00475fb9fe 100644 --- a/scm-ui/src/admin/plugins/components/PluginModal.js +++ b/scm-ui/src/admin/plugins/components/PluginModal.js @@ -1,6 +1,8 @@ //@flow import React from "react"; +import { compose } from "redux"; import { translate } from "react-i18next"; +import injectSheet from "react-jss"; import type { Plugin } from "@scm-manager/ui-types"; import { Button, @@ -9,6 +11,7 @@ import { Modal, SubmitButton } from "@scm-manager/ui-components"; +import classNames from "classnames"; type Props = { plugin: Plugin, @@ -16,23 +19,58 @@ type Props = { onClose: () => void, // context props + classes: any, t: string => string }; +const styles = { + titleVersion: { + marginLeft: "0.75rem" + }, + userLabelAlignment: { + textAlign: "left", + marginRight: 0, + minWidth: "5.5em" + }, + userFieldFlex: { + flexGrow: 4 + }, + listSpacing: { + marginTop: "0 !important" + } +}; + class PluginModal extends React.Component { renderDependencies() { - const { plugin, t } = this.props; + const { plugin, classes, t } = this.props; let dependencies = null; if (plugin.dependencies && plugin.dependencies.length > 0) { dependencies = ( <> - {t("plugins.modal.dependency", {count: plugin.dependencies.length})} - + {t("plugin.modal.dependencyNotification")} +
+
+ {t("plugins.modal.dependencies")}: +
+
+
    + {plugin.dependencies.map((dependency, index) => { + return
  • {dependency}
  • ; + })} +
+
+
); } @@ -40,17 +78,67 @@ class PluginModal extends React.Component { } render() { - const { onSubmit, onClose, t } = this.props; + const { plugin, onSubmit, onClose, classes, t } = this.props; const body = ( <> - {this.renderDependencies()} - +
+
+

{plugin.description && plugin.description}

+
+
+
+
+
+
+ {t("plugins.modal.author")}: +
+
+ {plugin.author} +
+
+
+
+ {t("plugins.modal.version")}: +
+
+ {plugin.version} +
+
+ + {this.renderDependencies()} +
+
+
+
+ +
+
); @@ -65,7 +153,9 @@ class PluginModal extends React.Component { return ( onClose()} body={body} footer={footer} @@ -75,4 +165,7 @@ class PluginModal extends React.Component { } } -export default translate("admin")(PluginModal); +export default compose( + injectSheet(styles), + translate("admin") +)(PluginModal);