Display plugin version for installed plugins

This commit is contained in:
Florian Scholdei
2020-04-03 00:21:26 +02:00
parent 5e03611e1b
commit 8a2be4a5d3
3 changed files with 1639 additions and 1599 deletions

View File

@@ -87,8 +87,15 @@ class PluginEntry extends React.Component<Props, State> {
});
};
createFooterLeft = (plugin: Plugin) => {
if (!this.isInstallable()) {
return <small>{plugin.version}</small>;
}
return null;
};
createFooterRight = (plugin: Plugin) => {
return <small className="level-item">{plugin.author}</small>;
return <small className="level-item is-block shorten-text">{plugin.author}</small>;
};
isInstallable = () => {
@@ -172,8 +179,8 @@ class PluginEntry extends React.Component<Props, State> {
const { plugin } = this.props;
const avatar = this.createAvatar(plugin);
const actionbar = this.createActionbar();
const footerLeft = this.createFooterLeft(plugin);
const footerRight = this.createFooterRight(plugin);
const modal = this.renderModal();
return (
@@ -184,6 +191,7 @@ class PluginEntry extends React.Component<Props, State> {
title={plugin.displayName ? <strong>{plugin.displayName}</strong> : <strong>{plugin.name}</strong>}
description={plugin.description}
contentRight={plugin.pending || plugin.markedForUninstall ? this.createPendingSpinner() : actionbar}
footerLeft={footerLeft}
footerRight={footerRight}
/>
{modal}