mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
plugin style fix
This commit is contained in:
parent
99d59a140c
commit
e14e55fd94
@ -30,7 +30,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
<div>
|
||||
{packageManifest.description}
|
||||
{(packageManifest.description?.indexOf('[![') >= 0 ? null : packageManifest.description) || '(No description)'}
|
||||
</div>
|
||||
<div class="bold">
|
||||
{extractPluginAuthor(packageManifest)}
|
||||
|
@ -21,5 +21,21 @@ export function extractPluginIcon(packageManifest) {
|
||||
}
|
||||
|
||||
export function extractPluginAuthor(packageManifest) {
|
||||
return _.isPlainObject(packageManifest.author) ? packageManifest.author.name : packageManifest.author;
|
||||
if (_.isPlainObject(packageManifest.author) && packageManifest.author.name) {
|
||||
return packageManifest.author.name;
|
||||
}
|
||||
if (packageManifest.author) {
|
||||
return packageManifest.author;
|
||||
}
|
||||
if (_.isPlainObject(packageManifest.publisher) && packageManifest.publisher.username) {
|
||||
return packageManifest.publisher.username;
|
||||
}
|
||||
if (
|
||||
packageManifest.maintainers &&
|
||||
_.isPlainObject(packageManifest.maintainers[0]) &&
|
||||
packageManifest.maintainers[0].username
|
||||
) {
|
||||
return packageManifest.maintainers[0].username;
|
||||
}
|
||||
return '(Unknown author)';
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user