File tree 2 files changed +21
-6
lines changed
2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ outline: deep
12
12
* NOTE: User's describe() now exposes the link for the avatar in links.avatarImage.href instead of meta.avatarUrl. This is a breaking change.
13
13
* Implemented: apis should use plurals #183
14
14
* NOTE: rest endpoints and pages use plurals like /users instead of /user now. This is a breaking change. Update your APIs and pages to use plurals.
15
+ * Implemented: page generator should link to parent objects in the statistics section #158
15
16
16
17
### 2025-01-12
17
18
* Removed pulumi from the project.
Original file line number Diff line number Diff line change @@ -209,9 +209,16 @@ const viewProps = (schema) => {
209
209
` ;
210
210
}
211
211
else if ( prop . type == 'id' ) {
212
- out += `
213
- <div><b>${ makeLabel ( prop . name ) } </b>: {{${ schema . kind . toLowerCase ( ) } .props?.${ prop . name } }} <CopyToClipboard :text="${ schema . kind . toLowerCase ( ) } .props?.${ prop . name } " size="xs" /></div>
214
- ` ;
212
+ if ( prop . relation ?. type == 'parent' ) {
213
+ out += `
214
+ <div><b>${ makeLabel ( prop . name ) } </b>: <NuxtLink :to="${ schema . kind . toLowerCase ( ) } .links?.view?.href">{{${ schema . kind . toLowerCase ( ) } .props?.${ prop . name } }}</NuxtLink> <CopyToClipboard :text="${ schema . kind . toLowerCase ( ) } .props?.${ prop . name } " size="xs" /></div>
215
+ ` ;
216
+ }
217
+ else {
218
+ out += `
219
+ <div><b>${ makeLabel ( prop . name ) } </b>: {{${ schema . kind . toLowerCase ( ) } .props?.${ prop . name } }} <CopyToClipboard :text="${ schema . kind . toLowerCase ( ) } .props?.${ prop . name } " size="xs" /></div>
220
+ ` ;
221
+ }
215
222
}
216
223
else if ( prop . type != 'virtual' ) {
217
224
out += `
@@ -312,9 +319,16 @@ const statProps = (schema) => {
312
319
` ;
313
320
}
314
321
else if ( prop . type == 'id' ) {
315
- out += `
316
- <div class="mb-4"><b>${ makeLabel ( prop . name ) } </b>: {{${ schema . kind . toLowerCase ( ) } .props?.${ prop . name } }} <CopyToClipboard :text="${ schema . kind . toLowerCase ( ) } .props?.${ prop . name } " size="xs" /></div>
317
- ` ;
322
+ if ( prop . relation ?. type == 'parent' ) {
323
+ out += `
324
+ <div class="mb-4"><b>${ makeLabel ( prop . name ) } </b>: <NuxtLink :to="${ schema . kind . toLowerCase ( ) } .links?.view?.href">{{${ schema . kind . toLowerCase ( ) } .props?.${ prop . name } }}</NuxtLink> <CopyToClipboard :text="${ schema . kind . toLowerCase ( ) } .props?.${ prop . name } " size="xs" /></div>
325
+ ` ;
326
+ }
327
+ else {
328
+ out += `
329
+ <div class="mb-4"><b>${ makeLabel ( prop . name ) } </b>: {{${ schema . kind . toLowerCase ( ) } .props?.${ prop . name } }} <CopyToClipboard :text="${ schema . kind . toLowerCase ( ) } .props?.${ prop . name } " size="xs" /></div>
330
+ ` ;
331
+ }
318
332
}
319
333
else if ( prop . type != 'virtual' ) {
320
334
out += `
You can’t perform that action at this time.
0 commit comments