admin/plugins: search online now shows stars, and offer as hidden columns also license, last-update and version
Massimo Melina committed
Jun 5, 2022 at 09:35 UTC
c9107397b6b2526aefd8cd8ad78d89983258448d
2 files changed
+22
-4
admin/src/OnlinePlugins.ts
+20
-3
@@ -30,16 +30,33 @@ export default function OnlinePlugins() {
30
{
31
field: 'id',
32
headerName: "name",
33
- flex: .3,
34
- minWidth: 150,
33
+ flex: 1,
34
},
35
{
36
field: 'version',
37
width: 70,
38
+ hide: true,
39
+ },
40
+ {
41
+ field: 'pushed_at',
42
+ headerName: "last update",
43
+ hide: true,
44
+ valueGetter: ({ value }) => new Date(value).toLocaleDateString(),
45
+ },
46
+ {
47
+ field: 'license',
48
+ width: 80,
49
+ hide: true,
50
},
51
{
52
field: 'description',
42
- flex: 1,
53
+ flex: 3,
54
+ },
55
+ {
56
+ field: 'stargazers_count',
57
+ width: 50,
58
+ headerName: "stars",
59
+ align: 'center',
60
},
61
{
62
field: "actions",
server/src/github.ts
+2
-1
@@ -107,7 +107,8 @@ export async function* searchPlugins(text: string) {
107
continue
108
Object.assign(pl, { // inject some extra useful fields
109
downloading: downloading[repo],
110
- })
110
+ license: it.license?.spdx_id,
111
+ }, _.pick(it, ['pushed_at', 'stargazers_count']))
112
yield pl
113
}
114
}