@@ -61,6 +61,7 @@ export default function Score(
61
61
name = { data . package . name }
62
62
scorePercentage = { data . package . score }
63
63
score = { data . score }
64
+ canAdmin = { iam . canAdmin }
64
65
/>
65
66
)
66
67
: (
@@ -78,8 +79,9 @@ function ScoreInfo(props: {
78
79
name : string ;
79
80
scorePercentage : number ;
80
81
score : PackageScore ;
82
+ canAdmin : boolean ;
81
83
} ) {
82
- const { scope, name, scorePercentage, score } = props ;
84
+ const { scope, name, scorePercentage, score, canAdmin } = props ;
83
85
84
86
return (
85
87
< div class = "mt-8 grid items-center justify-items-center grid-cols-1 md:grid-cols-3 gap-12" >
@@ -173,25 +175,43 @@ function ScoreInfo(props: {
173
175
scoreValue = { 1 }
174
176
title = "Has a description"
175
177
>
176
- The package should have a description set in the package settings to
177
- help users find this package via search.
178
+ The package should have a description set in { canAdmin
179
+ ? (
180
+ < a class = "link" href = "settings#description" >
181
+ the package settings
182
+ </ a >
183
+ )
184
+ : "the package settings" } { " " }
185
+ to help users find this package via search.
178
186
</ ScoreItem >
179
187
< ScoreItem
180
188
value = { score . atLeastOneRuntimeCompatible }
181
189
scoreValue = { 1 }
182
190
title = "At least one runtime is marked as compatible"
183
191
>
184
192
The package should be marked with at least one runtime as "compatible"
185
- in the package settings to aid users in understanding where they can
186
- use this package.
193
+ in { canAdmin
194
+ ? (
195
+ < a class = "link" href = "settings#runtime_compat" >
196
+ the package settings
197
+ </ a >
198
+ )
199
+ : "the package settings" } { " " }
200
+ to aid users in understanding where they can use this package.
187
201
</ ScoreItem >
188
202
< ScoreItem
189
203
value = { score . multipleRuntimesCompatible }
190
204
scoreValue = { 1 }
191
205
title = "At least two runtimes are marked as compatible"
192
206
>
193
207
The package should be compatible with more than one runtime, and be
194
- marked as such in the package settings.
208
+ marked as such in { canAdmin
209
+ ? (
210
+ < a class = "link" href = "settings#runtime_compat" >
211
+ the package settings
212
+ </ a >
213
+ )
214
+ : "the package settings" } .
195
215
</ ScoreItem >
196
216
< ScoreItem
197
217
value = { score . hasProvenance }
0 commit comments