mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-13 17:05:43 +01:00
Improve plugin center for Cloudogu plugins
This commit is contained in:
@@ -68,7 +68,7 @@
|
|||||||
"version": "Version",
|
"version": "Version",
|
||||||
"currentVersion": "Installierte Version",
|
"currentVersion": "Installierte Version",
|
||||||
"newVersion": "Neue Version",
|
"newVersion": "Neue Version",
|
||||||
"cloudoguInstallInfo": "Dieses Plugin ist nur über myCloudogu erhältlich. Zum Installieren folgen Sie bitte der Anleitung.",
|
"cloudoguInstallInfo": "Dieses Plugin ist exklusiv über myCloudogu erhältlich. Zum Installieren folgen Sie bitte der Anleitung.",
|
||||||
"cloudoguInstall": "Zur Installationsanleitung",
|
"cloudoguInstall": "Zur Installationsanleitung",
|
||||||
"dependencyNotification": "Mit diesem Plugin werden folgende Abhängigkeiten mit installiert bzw. aktualisiert, wenn sie noch nicht in der aktuellen Version vorhanden sind!",
|
"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!",
|
"optionalDependencyNotification": "Mit diesem Plugin werden folgende optionale Abhängigkeiten mit aktualisiert, falls sie installiert sind!",
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
"version": "Version",
|
"version": "Version",
|
||||||
"currentVersion": "Installed version",
|
"currentVersion": "Installed version",
|
||||||
"newVersion": "New version",
|
"newVersion": "New version",
|
||||||
"cloudoguInstallInfo": "This plugin is only available via myCloudogu. Follow the instructions to install it.",
|
"cloudoguInstallInfo": "This plugin is exclusively available via myCloudogu. Follow the instructions to install it.",
|
||||||
"cloudoguInstall": "To Installation Instructions",
|
"cloudoguInstall": "To Installation Instructions",
|
||||||
"dependencyNotification": "With this plugin, the following dependencies will be installed/updated if their latest versions are not installed yet!",
|
"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!",
|
"optionalDependencyNotification": "With this plugin, the following optional dependencies will be updated if they are installed!",
|
||||||
|
|||||||
@@ -60,6 +60,18 @@ const PluginEntry: FC<Props> = ({ plugin, openModal }) => {
|
|||||||
const isUninstallable = plugin._links.uninstall && (plugin._links.uninstall as Link).href;
|
const isUninstallable = plugin._links.uninstall && (plugin._links.uninstall as Link).href;
|
||||||
const isCloudoguPlugin = plugin.type === "CLOUDOGU";
|
const isCloudoguPlugin = plugin.type === "CLOUDOGU";
|
||||||
|
|
||||||
|
const evaluateAction = () => {
|
||||||
|
if (isInstallable) {
|
||||||
|
return () => openModal({ plugin, action: PluginAction.INSTALL });
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isCloudoguPlugin) {
|
||||||
|
return () => openModal({ plugin, action: PluginAction.CLOUDOGU });
|
||||||
|
}
|
||||||
|
|
||||||
|
return undefined;
|
||||||
|
};
|
||||||
|
|
||||||
const pendingSpinner = () => (
|
const pendingSpinner = () => (
|
||||||
<Icon className="fa-spin fa-lg" name="spinner" color={plugin.markedForUninstall ? "danger" : "info"} />
|
<Icon className="fa-spin fa-lg" name="spinner" color={plugin.markedForUninstall ? "danger" : "info"} />
|
||||||
);
|
);
|
||||||
@@ -91,7 +103,7 @@ const PluginEntry: FC<Props> = ({ plugin, openModal }) => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CardColumn
|
<CardColumn
|
||||||
action={isInstallable ? () => openModal({ plugin, action: PluginAction.INSTALL }) : undefined}
|
action={evaluateAction()}
|
||||||
avatar={<PluginAvatar plugin={plugin} />}
|
avatar={<PluginAvatar plugin={plugin} />}
|
||||||
title={plugin.displayName ? <strong>{plugin.displayName}</strong> : <strong>{plugin.name}</strong>}
|
title={plugin.displayName ? <strong>{plugin.displayName}</strong> : <strong>{plugin.name}</strong>}
|
||||||
description={plugin.description}
|
description={plugin.description}
|
||||||
|
|||||||
Reference in New Issue
Block a user