|
2 | 2 | import { onDevtoolsClientConnected } from '@nuxt/devtools-kit/iframe-client'
|
3 | 3 | import { registry } from '../src/registry'
|
4 | 4 | import { devtools, getScriptSize, humanFriendlyTimestamp, reactive, ref, urlToOrigin } from '#imports'
|
5 |
| -import { loadShiki } from '~/composables/shiki' |
6 | 5 | import { msToHumanReadable } from '~/utils/formatting'
|
7 | 6 |
|
8 | 7 | const scriptRegistry = registry(s => s)
|
9 |
| -await loadShiki() |
10 | 8 |
|
11 | 9 | const scripts = ref({})
|
12 | 10 | const scriptSizes = reactive<Record<string, string>>({})
|
@@ -73,7 +71,7 @@ function viewDocs(docs: string) {
|
73 | 71 |
|
74 | 72 | <template>
|
75 | 73 | <div class="relative n-bg-base flex flex-col">
|
76 |
| - <header class="sticky top-0 z-2 px-4 pt-4"> |
| 74 | + <header class="sticky top-0 z-2 px-4 pt-4 bg-background/80 backdrop-blur-lg"> |
77 | 75 | <div class="flex justify-between items-start" mb2>
|
78 | 76 | <div class="flex space-x-5">
|
79 | 77 | <h1 text-xl flex items-center gap-2>
|
@@ -155,9 +153,9 @@ function viewDocs(docs: string) {
|
155 | 153 | </div>
|
156 | 154 | </div>
|
157 | 155 | </header>
|
158 |
| - <div class="flex-row flex p4 h-full" style="min-height: calc(100vh - 64px);"> |
| 156 | + <div class="flex-row flex h-full" style="min-height: calc(100vh - 64px);"> |
159 | 157 | <main class="mx-auto flex flex-col w-full bg-white dark:bg-black dark:bg-dark-700 bg-light-200 ">
|
160 |
| - <div v-if="tab === 'scripts'" class="h-full relative max-h-full"> |
| 158 | + <div v-if="tab === 'scripts'" class="h-full relative max-h-full p-4"> |
161 | 159 | <div v-if="!Object.keys(scripts || {}).length">
|
162 | 160 | <div>No scripts loaded.</div>
|
163 | 161 | </div>
|
@@ -237,12 +235,12 @@ function viewDocs(docs: string) {
|
237 | 235 | {{ event.status }}
|
238 | 236 | </div>
|
239 | 237 | </template>
|
240 |
| - <template v-else-if="event.type === 'fn-call' && event.args"> |
241 |
| - <OCodeBlock :code="`${event.fn}(${event.args?.map(a => JSON.stringify(a, null, 2)).join(', ') || ''})`" lang="javascript" /> |
242 |
| - </template> |
243 |
| - <template v-else-if="event.type === 'fn-call' && !event.args"> |
244 |
| - <OCodeBlock :code="`QUEUED ${event.fn}`" lang="javascript" /> |
245 |
| - </template> |
| 238 | + <div v-else-if="event.type === 'fn-call' && event.args" class="px-2 py-[2px] bg-gray-100 text-gray-700 rounded-lg font-mono"> |
| 239 | + {{ `${event.fn}(${event.args?.map((a: any) => JSON.stringify(a, null, 2)).join(', ') || ''})` }} |
| 240 | + </div> |
| 241 | + <div v-else-if="event.type === 'fn-call' && !event.args" class="px-2 py-[2px] bg-gray-100 text-gray-700 rounded-lg font-mono"> |
| 242 | + QUEUED {{ event.fn }} |
| 243 | + </div> |
246 | 244 | </div>
|
247 | 245 | </div>
|
248 | 246 | </OSectionBlock>
|
|
0 commit comments