Skip to content

Commit

Permalink
fix: JSON view label
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisdlangton committed Sep 29, 2024
1 parent b06ebd2 commit 1e06ac8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/pages/FirstOrg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const controller = reactive(new Controller())
<template v-slot:activator="{ props: activatorProps }">
<VBtn
v-bind="activatorProps"
:text="`View JSON (${JSON.parse(record.request || '')?.queries?.length} queries)`"
:text="`View JSON`"
:color="global.name.value === 'dark' ? 'secondary' : 'primary'"
variant="tonal"
density="comfortable"
Expand Down Expand Up @@ -200,7 +200,7 @@ const controller = reactive(new Controller())
<template v-slot:activator="{ props: activatorProps }">
<VBtn
v-bind="activatorProps"
:text="`View JSON (${JSON.parse(record.response || '')?.body?.length} results)`"
:text="`View JSON (${JSON.parse(record.response || '')?.body?.total} results)`"
:color="global.name.value === 'dark' ? 'secondary' : 'primary'"
variant="tonal"
density="comfortable"
Expand Down
10 changes: 7 additions & 3 deletions src/pages/GitHub.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1120,7 +1120,7 @@ const controller = reactive(new Controller())
<td>
{{ (new Date(record.createdAt)).toLocaleString() }}
</td>
<td>
<td class=".td-wrap">
{{ JSON.parse(record.request || '')?.url }}
</td>
<td>
Expand All @@ -1137,7 +1137,7 @@ const controller = reactive(new Controller())
<template v-slot:activator="{ props: activatorProps }">
<VBtn
v-bind="activatorProps"
:text="`View JSON (${JSON.parse(record.request || '')?.queries?.length} queries)`"
:text="`View JSON`"
:color="global.name.value === 'dark' ? 'secondary' : 'primary'"
variant="tonal"
density="comfortable"
Expand Down Expand Up @@ -1168,7 +1168,7 @@ const controller = reactive(new Controller())
<template v-slot:activator="{ props: activatorProps }">
<VBtn
v-bind="activatorProps"
:text="`View JSON (${JSON.parse(record.response || '')?.body?.length} results)`"
:text="JSON.parse(record.response || '')?.body?.runs ? `View JSON (${JSON.parse(record.response || '')?.body?.runs?.length} results)` : `View JSON`"
:color="global.name.value === 'dark' ? 'secondary' : 'primary'"
variant="tonal"
density="comfortable"
Expand Down Expand Up @@ -1216,4 +1216,8 @@ const controller = reactive(new Controller())
.VBtn {
text-transform: none;
}
.td-wrap {
word-wrap: break-word;
}
</style>
4 changes: 2 additions & 2 deletions src/pages/OSV.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const controller = reactive(new Controller())
<template v-slot:activator="{ props: activatorProps }">
<VBtn
v-bind="activatorProps"
:text="`View JSON (${JSON.parse(record.request || '')?.queries?.length} queries)`"
:text="JSON.parse(record.request || '')?.queries ? `View JSON (${JSON.parse(record.request || '')?.queries?.length} queries)` : `View JSON`"
:color="global.name.value === 'dark' ? 'secondary' : 'primary'"
variant="tonal"
density="comfortable"
Expand Down Expand Up @@ -200,7 +200,7 @@ const controller = reactive(new Controller())
<template v-slot:activator="{ props: activatorProps }">
<VBtn
v-bind="activatorProps"
:text="`View JSON (${JSON.parse(record.response || '')?.body?.length} results)`"
:text="JSON.parse(record.response || '')?.body?.length >= 0 ? `View JSON (${JSON.parse(record.response || '')?.body?.length} results)` : `View JSON`"
:color="global.name.value === 'dark' ? 'secondary' : 'primary'"
variant="tonal"
density="comfortable"
Expand Down

0 comments on commit 1e06ac8

Please sign in to comment.