qarpeo 0.1.18 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +96 -96
- package/dist/chunks/auth-schema.mjs +3 -1
- package/dist/chunks/wrangler.mjs +22 -3
- package/dist/cli/index.mjs +448 -221
- package/dist/fate/index.d.ts +29 -22
- package/dist/fate/index.mjs +1 -3
- package/dist/module.d.ts +1 -1
- package/dist/module.mjs +103 -82
- package/dist/runtime/ai.d.ts +2 -2
- package/dist/runtime/app/components/BlobImage.vue +119 -107
- package/dist/runtime/app/components/CMSBlocks.vue +104 -93
- package/dist/runtime/app/components/CMSContent.vue +24 -23
- package/dist/runtime/app/components/CMSImage.vue +49 -49
- package/dist/runtime/app/components/CMSLocaleSwitcher.vue +110 -110
- package/dist/runtime/app/components/CMSPreviewBanner.vue +83 -79
- package/dist/runtime/app/components/CMSVersionBanner.vue +53 -49
- package/dist/runtime/app/components/CMSVersionSwitcher.vue +140 -140
- package/dist/runtime/app/components/ContentRenderer.vue +83 -80
- package/dist/runtime/app/components/FileUpload.vue +200 -196
- package/dist/runtime/app/components/ImpersonationBanner.vue +61 -57
- package/dist/runtime/app/components/QarpeoWelcome.vue +84 -84
- package/dist/runtime/app/components/SignedIn.vue +13 -13
- package/dist/runtime/app/components/SignedOut.vue +13 -13
- package/dist/runtime/app/components/shiki.css +34 -34
- package/dist/runtime/app/composables/ai.d.ts +22 -22
- package/dist/runtime/app/composables/ai.mjs +3 -7
- package/dist/runtime/app/composables/analytics.mjs +1 -1
- package/dist/runtime/app/composables/api-tokens.mjs +1 -1
- package/dist/runtime/app/composables/auth.d.ts +6 -7
- package/dist/runtime/app/composables/auth.mjs +6 -3
- package/dist/runtime/app/composables/chat.mjs +3 -7
- package/dist/runtime/app/composables/cms-preview.d.ts +3 -3
- package/dist/runtime/app/composables/cms-preview.mjs +1 -1
- package/dist/runtime/app/composables/cms.d.ts +3 -5
- package/dist/runtime/app/composables/cms.mjs +2 -2
- package/dist/runtime/app/composables/docs-version.d.ts +8 -7
- package/dist/runtime/app/composables/docs-version.mjs +3 -3
- package/dist/runtime/app/composables/impersonation.mjs +1 -1
- package/dist/runtime/app/composables/notifications.d.ts +5 -5
- package/dist/runtime/app/composables/notifications.mjs +4 -5
- package/dist/runtime/app/composables/organization.mjs +1 -1
- package/dist/runtime/app/composables/passkey.mjs +1 -1
- package/dist/runtime/app/composables/passwordless.mjs +1 -1
- package/dist/runtime/app/composables/payments.d.ts +2 -1
- package/dist/runtime/app/composables/payments.mjs +1 -1
- package/dist/runtime/app/composables/realtime.d.ts +13 -13
- package/dist/runtime/app/composables/realtime.mjs +2 -2
- package/dist/runtime/app/composables/resumable-upload.d.ts +11 -11
- package/dist/runtime/app/composables/resumable-upload.mjs +1 -1
- package/dist/runtime/app/composables/site.mjs +1 -1
- package/dist/runtime/app/composables/storage.d.ts +151 -11
- package/dist/runtime/app/composables/storage.mjs +291 -33
- package/dist/runtime/app/composables/turnstile.mjs +1 -1
- package/dist/runtime/app/composables/two-factor.mjs +1 -1
- package/dist/runtime/app/pages/devtools/agents.vue +716 -716
- package/dist/runtime/app/pages/devtools/analytics.vue +616 -616
- package/dist/runtime/app/pages/devtools/auth.vue +381 -350
- package/dist/runtime/app/pages/devtools/blob.vue +743 -744
- package/dist/runtime/app/pages/devtools/db.vue +545 -545
- package/dist/runtime/app/pages/devtools/domains.vue +771 -771
- package/dist/runtime/app/pages/devtools/kv.vue +827 -828
- package/dist/runtime/app/pages/devtools/logs.vue +649 -653
- package/dist/runtime/app/pages/devtools/mail.vue +388 -388
- package/dist/runtime/app/pages/devtools/overview.vue +391 -389
- package/dist/runtime/app/pages/devtools/realtime.vue +89 -27
- package/dist/runtime/app/pages/devtools/security.vue +20 -5
- package/dist/runtime/app/pages/devtools/settings.vue +559 -559
- package/dist/runtime/app/pages/devtools/tasks.vue +26 -10
- package/dist/runtime/app/pages/devtools.vue +176 -176
- package/dist/runtime/app/plugins/seo.mjs +1 -1
- package/dist/runtime/app/plugins/shortcuts.client.d.ts +1 -4
- package/dist/runtime/app/public/sw-notifications.mjs +47 -52
- package/dist/runtime/blob.mjs +11 -4
- package/dist/runtime/browser.d.ts +1 -1
- package/dist/runtime/browser.mjs +12 -2
- package/dist/runtime/cache.d.ts +2 -1
- package/dist/runtime/kv.mjs +4 -1
- package/dist/runtime/providers/qarpeo.d.ts +3 -3
- package/dist/runtime/server/durable-objects/agent.mjs +1 -1
- package/dist/runtime/server/durable-objects/room.d.ts +2 -2
- package/dist/runtime/server/durable-objects/room.mjs +5 -5
- package/dist/runtime/server/middleware/devtools.mjs +6 -2
- package/dist/runtime/server/plugins/cms.d.ts +4 -2
- package/dist/runtime/server/plugins/dev-proxy.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/agents/chat.post.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/agents/chat.post.mjs +4 -1
- package/dist/runtime/server/routes/__qarpeo/analytics/events.get.d.ts +1 -4
- package/dist/runtime/server/routes/__qarpeo/analytics/summary.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/analytics/summary.get.mjs +5 -1
- package/dist/runtime/server/routes/__qarpeo/db/tables.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/db/tables.get.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/logs.get.d.ts +4 -1
- package/dist/runtime/server/routes/__qarpeo/mail/track/click/[id].get.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/mail/track/open/[id].get.mjs +2 -2
- package/dist/runtime/server/routes/__qarpeo/overview.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/realtime/broadcast.post.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/realtime/broadcast.post.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/realtime/clear.post.d.ts +1 -4
- package/dist/runtime/server/routes/__qarpeo/realtime/clear.post.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/realtime/disconnect.post.d.ts +1 -4
- package/dist/runtime/server/routes/__qarpeo/realtime/disconnect.post.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/realtime/room.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/realtime/rooms.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/security/analytics.get.d.ts +2 -2
- package/dist/runtime/server/routes/__qarpeo/security/ban.post.d.ts +1 -4
- package/dist/runtime/server/routes/__qarpeo/security/clear.post.d.ts +1 -4
- package/dist/runtime/server/routes/__qarpeo/security/unban.post.d.ts +1 -4
- package/dist/runtime/server/routes/__qarpeo/settings.get.mjs +1 -1
- package/dist/runtime/server/routes/__qarpeo/tasks/run.post.mjs +3 -1
- package/dist/runtime/server/routes/agents/[agent]/chat.post.mjs +8 -2
- package/dist/runtime/server/routes/agents/[agent]/clear.post.mjs +8 -2
- package/dist/runtime/server/routes/agents/[agent]/history.get.mjs +8 -2
- package/dist/runtime/server/routes/ai/embed.post.d.ts +1 -4
- package/dist/runtime/server/routes/ai/search.post.d.ts +2 -2
- package/dist/runtime/server/routes/auth/account.delete.mjs +1 -1
- package/dist/runtime/server/routes/auth/handler.mjs +6 -1
- package/dist/runtime/server/routes/auth/magic-link/verify.get.mjs +1 -1
- package/dist/runtime/server/routes/auth/organization/members/[id].delete.mjs +7 -1
- package/dist/runtime/server/routes/auth/otp/verify.post.mjs +1 -1
- package/dist/runtime/server/routes/auth/sso/login.get.mjs +7 -1
- package/dist/runtime/server/routes/auth/sso/oidc/callback.get.mjs +8 -2
- package/dist/runtime/server/routes/auth/sso/saml/acs.post.mjs +7 -2
- package/dist/runtime/server/routes/auth/webauthn/login/options.post.mjs +1 -1
- package/dist/runtime/server/routes/auth/webauthn/login/verify.post.mjs +7 -2
- package/dist/runtime/server/routes/auth/webauthn/register/options.post.mjs +6 -1
- package/dist/runtime/server/routes/auth/webauthn/register/verify.post.mjs +6 -1
- package/dist/runtime/server/routes/browser/crawl.post.d.ts +1 -2
- package/dist/runtime/server/routes/browser/invoice.post.d.ts +1 -2
- package/dist/runtime/server/routes/browser/og-image.post.d.ts +2 -2
- package/dist/runtime/server/routes/browser/pdf.post.d.ts +1 -2
- package/dist/runtime/server/routes/browser/pdf.post.mjs +6 -1
- package/dist/runtime/server/routes/browser/screenshot.post.d.ts +2 -2
- package/dist/runtime/server/routes/browser/screenshot.post.mjs +5 -1
- package/dist/runtime/server/routes/cms/components/index.get.d.ts +2 -2
- package/dist/runtime/server/routes/cms/preview/disable.get.d.ts +4 -3
- package/dist/runtime/server/routes/cms/preview/enable.get.d.ts +8 -8
- package/dist/runtime/server/routes/cms/search.get.mjs +1 -1
- package/dist/runtime/server/routes/cms/webhooks/[provider].post.d.ts +7 -7
- package/dist/runtime/server/routes/cms/webhooks/[provider].post.mjs +9 -2
- package/dist/runtime/server/routes/docs/search.get.d.ts +9 -9
- package/dist/runtime/server/routes/fate.mjs +5 -8
- package/dist/runtime/server/routes/mail/bounce.post.d.ts +2 -2
- package/dist/runtime/server/routes/mail/unsubscribe.d.ts +2 -2
- package/dist/runtime/server/routes/mail/webhooks.post.d.ts +2 -2
- package/dist/runtime/server/routes/mail/webhooks.post.mjs +7 -1
- package/dist/runtime/server/routes/payments/usage.get.d.ts +8 -8
- package/dist/runtime/server/routes/payments/usage.post.d.ts +2 -2
- package/dist/runtime/server/routes/realtime/history.delete.d.ts +4 -3
- package/dist/runtime/server/routes/realtime/history.get.d.ts +7 -6
- package/dist/runtime/server/routes/realtime/ws.get.mjs +6 -1
- package/dist/runtime/server/routes/robots.txt.get.mjs +1 -1
- package/dist/runtime/server/routes/sitemap.xml.get.mjs +2 -1
- package/dist/runtime/server/routes/storage/multipart/abort.post.d.ts +2 -2
- package/dist/runtime/server/routes/storage/multipart/complete.post.d.ts +2 -2
- package/dist/runtime/server/routes/storage/multipart/complete.post.mjs +2 -2
- package/dist/runtime/server/routes/storage/multipart/create.post.d.ts +2 -2
- package/dist/runtime/server/routes/storage/multipart/create.post.mjs +7 -3
- package/dist/runtime/server/routes/storage/multipart/part.put.d.ts +2 -2
- package/dist/runtime/server/routes/storage/multipart/part.put.mjs +1 -1
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/index.delete.mjs +2 -4
- package/dist/runtime/server/routes/tenants/[tenant]/domains/[domain]/verify.post.mjs +2 -4
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.get.mjs +1 -1
- package/dist/runtime/server/routes/tenants/[tenant]/domains/index.post.mjs +2 -4
- package/dist/runtime/server/tasks/cms/publish.mjs +1 -1
- package/dist/runtime/server/utils/ai.d.ts +9 -9
- package/dist/runtime/server/utils/ai.mjs +3 -3
- package/dist/runtime/server/utils/auth.d.ts +12 -16
- package/dist/runtime/server/utils/auth.mjs +15 -9
- package/dist/runtime/server/utils/bots.mjs +21 -7
- package/dist/runtime/server/utils/browser-utils.d.ts +44 -41
- package/dist/runtime/server/utils/browser-utils.mjs +14 -4
- package/dist/runtime/server/utils/cache.d.ts +5 -5
- package/dist/runtime/server/utils/cms/common.d.ts +26 -0
- package/dist/runtime/server/utils/cms/common.mjs +68 -0
- package/dist/runtime/server/utils/cms/git.d.ts +24 -0
- package/dist/runtime/server/utils/cms/git.mjs +240 -0
- package/dist/runtime/server/utils/cms/markdown.d.ts +22 -0
- package/dist/runtime/server/utils/cms/markdown.mjs +92 -0
- package/dist/runtime/server/utils/cms/path.d.ts +51 -0
- package/dist/runtime/server/utils/cms/path.mjs +127 -0
- package/dist/runtime/server/utils/cms/search.d.ts +22 -0
- package/dist/runtime/server/utils/cms/search.mjs +221 -0
- package/dist/runtime/server/utils/cms-events.d.ts +1 -1
- package/dist/runtime/server/utils/cms-events.mjs +2 -2
- package/dist/runtime/server/utils/cms-filter.mjs +2 -2
- package/dist/runtime/server/utils/cms.d.ts +17 -149
- package/dist/runtime/server/utils/cms.mjs +52 -761
- package/dist/runtime/server/utils/config.d.ts +5 -4
- package/dist/runtime/server/utils/domains.mjs +7 -4
- package/dist/runtime/server/utils/email-templates.d.ts +10 -7
- package/dist/runtime/server/utils/email-templates.mjs +20 -5
- package/dist/runtime/server/utils/feed.d.ts +2 -2
- package/dist/runtime/server/utils/feed.mjs +3 -1
- package/dist/runtime/server/utils/mail-suppression.d.ts +8 -24
- package/dist/runtime/server/utils/mail-suppression.mjs +2 -2
- package/dist/runtime/server/utils/mail.d.ts +7 -8
- package/dist/runtime/server/utils/mail.mjs +17 -12
- package/dist/runtime/server/utils/multipart-store.d.ts +2 -2
- package/dist/runtime/server/utils/notifications.d.ts +9 -23
- package/dist/runtime/server/utils/organization.mjs +4 -12
- package/dist/runtime/server/utils/passwordless.mjs +1 -1
- package/dist/runtime/server/utils/payments.d.ts +2 -6
- package/dist/runtime/server/utils/payments.mjs +1 -1
- package/dist/runtime/server/utils/queue.d.ts +21 -31
- package/dist/runtime/server/utils/rag.d.ts +4 -4
- package/dist/runtime/server/utils/rag.mjs +8 -8
- package/dist/runtime/server/utils/realtime-store.d.ts +2 -2
- package/dist/runtime/server/utils/realtime.d.ts +26 -28
- package/dist/runtime/server/utils/scheduled-task.d.ts +1 -3
- package/dist/runtime/server/utils/security-store.d.ts +2 -2
- package/dist/runtime/server/utils/session.d.ts +9 -11
- package/dist/runtime/server/utils/sso.d.ts +9 -15
- package/dist/runtime/server/utils/sso.mjs +4 -8
- package/dist/runtime/server/utils/storage.d.ts +19 -2
- package/dist/runtime/server/utils/storage.mjs +36 -7
- package/dist/runtime/server/utils/tenant.mjs +3 -1
- package/dist/runtime/server/utils/turnstile.d.ts +3 -5
- package/dist/runtime/server/utils/vapid.d.ts +5 -8
- package/dist/runtime/server/utils/vapid.mjs +26 -13
- package/dist/runtime/service.d.ts +13 -13
- package/dist/runtime/service.mjs +4 -2
- package/dist/runtime/test-utils.d.ts +20 -30
- package/dist/runtime/test-utils.mjs +5 -4
- package/dist/runtime/types/auth-globals.d.ts +14 -14
- package/dist/runtime/types/imports.d.ts +82 -82
- package/dist/runtime/types/index.d.ts +2 -2
- package/dist/runtime/types/r2.d.ts +5 -0
- package/dist/runtime/types/service.d.ts +11 -18
- package/dist/types.d.ts +100 -107
- package/dist/utils/auth-schema.d.ts +2 -2
- package/dist/utils/cms-sources.d.ts +3 -3
- package/dist/utils/local-db.d.ts +3 -3
- package/dist/utils/notifications-schema.d.ts +1 -3
- package/dist/utils/pkg.d.ts +7 -0
- package/dist/utils/queue.d.ts +3 -3
- package/dist/utils/tasks.d.ts +3 -2
- package/package.json +11 -8
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { useRoute, useFetch, navigateTo } from "nuxt/app"
|
|
3
2
|
import type { NavigationMenuItem } from "@nuxt/ui"
|
|
3
|
+
import { useRoute, useFetch, navigateTo } from "nuxt/app"
|
|
4
4
|
import { computed, ref, onMounted, onUnmounted } from "vue"
|
|
5
5
|
|
|
6
6
|
interface RoomSummary {
|
|
@@ -231,7 +231,7 @@ function formatJson(val: any): string {
|
|
|
231
231
|
<span class="font-bold text-sm text-highlighted">Realtime & Rooms</span>
|
|
232
232
|
<UBadge size="xs" color="neutral" variant="subtle">Cloudflare Durable Objects</UBadge>
|
|
233
233
|
<UBadge size="xs" color="primary" variant="subtle">
|
|
234
|
-
{{ rooms.length }} Active {{ rooms.length === 1 ?
|
|
234
|
+
{{ rooms.length }} Active {{ rooms.length === 1 ? "Room" : "Rooms" }}
|
|
235
235
|
</UBadge>
|
|
236
236
|
</div>
|
|
237
237
|
</template>
|
|
@@ -245,7 +245,12 @@ function formatJson(val: any): string {
|
|
|
245
245
|
variant="ghost"
|
|
246
246
|
title="Refresh rooms"
|
|
247
247
|
:loading="roomsPending || activeRoomLoading"
|
|
248
|
-
@click="
|
|
248
|
+
@click="
|
|
249
|
+
() => {
|
|
250
|
+
executeLoadRooms()
|
|
251
|
+
loadActiveRoom()
|
|
252
|
+
}
|
|
253
|
+
"
|
|
249
254
|
/>
|
|
250
255
|
</div>
|
|
251
256
|
</template>
|
|
@@ -255,7 +260,9 @@ function formatJson(val: any): string {
|
|
|
255
260
|
<template #body>
|
|
256
261
|
<div class="grid grid-cols-12 gap-4 h-[calc(100vh-140px)]">
|
|
257
262
|
<!-- ── Left: Room Directory ──────────────────────────────────────── -->
|
|
258
|
-
<div
|
|
263
|
+
<div
|
|
264
|
+
class="col-span-12 md:col-span-4 flex flex-col rounded-xl border border-default bg-elevated/20 overflow-hidden"
|
|
265
|
+
>
|
|
259
266
|
<div class="p-3 border-b border-default bg-muted/40">
|
|
260
267
|
<UInput
|
|
261
268
|
v-model="roomSearch"
|
|
@@ -271,13 +278,25 @@ function formatJson(val: any): string {
|
|
|
271
278
|
v-for="r in filteredRooms"
|
|
272
279
|
:key="r.id"
|
|
273
280
|
class="p-2.5 rounded-lg cursor-pointer transition-colors border text-xs"
|
|
274
|
-
:class="
|
|
275
|
-
|
|
281
|
+
:class="
|
|
282
|
+
r.id === selectedRoomId
|
|
283
|
+
? 'bg-primary/10 border-primary/30 text-highlighted font-medium'
|
|
284
|
+
: 'hover:bg-elevated/40 border-transparent text-default'
|
|
285
|
+
"
|
|
286
|
+
@click="
|
|
287
|
+
() => {
|
|
288
|
+
selectedRoomId = r.id
|
|
289
|
+
loadActiveRoom()
|
|
290
|
+
}
|
|
291
|
+
"
|
|
276
292
|
>
|
|
277
293
|
<div class="flex items-center justify-between mb-1">
|
|
278
294
|
<span class="font-mono font-semibold truncate">{{ r.id }}</span>
|
|
279
295
|
<span class="flex items-center gap-1.5 shrink-0">
|
|
280
|
-
<span
|
|
296
|
+
<span
|
|
297
|
+
class="w-2 h-2 rounded-full"
|
|
298
|
+
:class="r.presenceCount > 0 ? 'bg-success animate-pulse' : 'bg-muted'"
|
|
299
|
+
></span>
|
|
281
300
|
<span class="text-[10px] text-muted">{{ r.presenceCount }} online</span>
|
|
282
301
|
</span>
|
|
283
302
|
</div>
|
|
@@ -294,16 +313,22 @@ function formatJson(val: any): string {
|
|
|
294
313
|
</div>
|
|
295
314
|
|
|
296
315
|
<!-- ── Right: Live Room Inspector ────────────────────────────────── -->
|
|
297
|
-
<div
|
|
316
|
+
<div
|
|
317
|
+
class="col-span-12 md:col-span-8 flex flex-col rounded-xl border border-default bg-elevated/20 overflow-hidden"
|
|
318
|
+
>
|
|
298
319
|
<!-- Room Header Bar -->
|
|
299
320
|
<div class="p-3.5 border-b border-default bg-muted/40 flex items-center justify-between">
|
|
300
321
|
<div class="flex items-center gap-2">
|
|
301
|
-
<div
|
|
322
|
+
<div
|
|
323
|
+
class="w-8 h-8 rounded-lg bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shrink-0"
|
|
324
|
+
>
|
|
302
325
|
<UIcon name="i-lucide-radio" class="w-4 h-4" />
|
|
303
326
|
</div>
|
|
304
327
|
<div>
|
|
305
328
|
<div class="flex items-center gap-2">
|
|
306
|
-
<span class="font-mono font-bold text-sm text-highlighted">{{
|
|
329
|
+
<span class="font-mono font-bold text-sm text-highlighted">{{
|
|
330
|
+
selectedRoomId
|
|
331
|
+
}}</span>
|
|
307
332
|
<UBadge size="xs" color="neutral" variant="subtle">
|
|
308
333
|
{{ activeRoom?.presence.length || 0 }} Connected
|
|
309
334
|
</UBadge>
|
|
@@ -319,21 +344,33 @@ function formatJson(val: any): string {
|
|
|
319
344
|
<div class="flex rounded-lg border border-default bg-elevated/40 p-0.5 text-xs">
|
|
320
345
|
<button
|
|
321
346
|
class="px-2.5 py-1 rounded-md transition-colors"
|
|
322
|
-
:class="
|
|
347
|
+
:class="
|
|
348
|
+
activeTab === 'presence'
|
|
349
|
+
? 'bg-primary text-primary-foreground font-medium'
|
|
350
|
+
: 'text-muted hover:text-default'
|
|
351
|
+
"
|
|
323
352
|
@click="activeTab = 'presence'"
|
|
324
353
|
>
|
|
325
354
|
Presence ({{ activeRoom?.presence.length || 0 }})
|
|
326
355
|
</button>
|
|
327
356
|
<button
|
|
328
357
|
class="px-2.5 py-1 rounded-md transition-colors"
|
|
329
|
-
:class="
|
|
358
|
+
:class="
|
|
359
|
+
activeTab === 'messages'
|
|
360
|
+
? 'bg-primary text-primary-foreground font-medium'
|
|
361
|
+
: 'text-muted hover:text-default'
|
|
362
|
+
"
|
|
330
363
|
@click="activeTab = 'messages'"
|
|
331
364
|
>
|
|
332
365
|
Messages ({{ activeRoom?.messages.length || 0 }})
|
|
333
366
|
</button>
|
|
334
367
|
<button
|
|
335
368
|
class="px-2.5 py-1 rounded-md transition-colors"
|
|
336
|
-
:class="
|
|
369
|
+
:class="
|
|
370
|
+
activeTab === 'state'
|
|
371
|
+
? 'bg-primary text-primary-foreground font-medium'
|
|
372
|
+
: 'text-muted hover:text-default'
|
|
373
|
+
"
|
|
337
374
|
@click="activeTab = 'state'"
|
|
338
375
|
>
|
|
339
376
|
Room State
|
|
@@ -344,8 +381,10 @@ function formatJson(val: any): string {
|
|
|
344
381
|
|
|
345
382
|
<!-- Tab 1: Presence Roster & Cursors -->
|
|
346
383
|
<div v-if="activeTab === 'presence'" class="flex-1 overflow-y-auto p-4 space-y-3">
|
|
347
|
-
<div class="text-xs font-semibold text-muted uppercase tracking-wider mb-2">
|
|
348
|
-
|
|
384
|
+
<div class="text-xs font-semibold text-muted uppercase tracking-wider mb-2">
|
|
385
|
+
Connected Peers & Cursors
|
|
386
|
+
</div>
|
|
387
|
+
|
|
349
388
|
<div v-if="activeRoom?.presence && activeRoom.presence.length > 0" class="space-y-2">
|
|
350
389
|
<div
|
|
351
390
|
v-for="user in activeRoom.presence"
|
|
@@ -353,21 +392,31 @@ function formatJson(val: any): string {
|
|
|
353
392
|
class="flex items-center justify-between p-3 rounded-lg border border-default bg-elevated/40 hover:bg-elevated/60 transition-colors"
|
|
354
393
|
>
|
|
355
394
|
<div class="flex items-center gap-3">
|
|
356
|
-
<div
|
|
357
|
-
|
|
395
|
+
<div
|
|
396
|
+
class="w-8 h-8 rounded-full bg-primary/10 border border-primary/20 flex items-center justify-center font-bold text-xs text-primary"
|
|
397
|
+
>
|
|
398
|
+
{{ user.name ? user.name.slice(0, 2).toUpperCase() : "AN" }}
|
|
358
399
|
</div>
|
|
359
400
|
<div>
|
|
360
401
|
<div class="flex items-center gap-2">
|
|
361
|
-
<span class="font-medium text-xs text-highlighted">{{
|
|
362
|
-
|
|
402
|
+
<span class="font-medium text-xs text-highlighted">{{
|
|
403
|
+
user.name || "Anonymous User"
|
|
404
|
+
}}</span>
|
|
405
|
+
<UBadge v-if="user.isAnonymous" size="xs" color="neutral" variant="outline"
|
|
406
|
+
>Anonymous</UBadge
|
|
407
|
+
>
|
|
363
408
|
<span class="font-mono text-[10px] text-muted">{{ user.id }}</span>
|
|
364
409
|
</div>
|
|
365
410
|
<div class="flex items-center gap-2 text-[11px] text-muted mt-0.5">
|
|
366
411
|
<span>Joined: {{ formatTime(user.joinedAt) }}</span>
|
|
367
412
|
<span v-if="user.presence?.status" class="flex items-center gap-1">
|
|
368
|
-
• Status:
|
|
413
|
+
• Status:
|
|
414
|
+
<span class="font-medium text-highlighted">{{ user.presence.status }}</span>
|
|
369
415
|
</span>
|
|
370
|
-
<span
|
|
416
|
+
<span
|
|
417
|
+
v-if="user.presence?.cursor"
|
|
418
|
+
class="flex items-center gap-1 font-mono text-[10px]"
|
|
419
|
+
>
|
|
371
420
|
• Cursor: ({{ user.presence.cursor.x }}, {{ user.presence.cursor.y }})
|
|
372
421
|
</span>
|
|
373
422
|
</div>
|
|
@@ -398,7 +447,9 @@ function formatJson(val: any): string {
|
|
|
398
447
|
<!-- Messages List -->
|
|
399
448
|
<div class="flex-1 overflow-y-auto p-4 space-y-2">
|
|
400
449
|
<div class="flex items-center justify-between mb-2">
|
|
401
|
-
<span class="text-xs font-semibold text-muted uppercase tracking-wider"
|
|
450
|
+
<span class="text-xs font-semibold text-muted uppercase tracking-wider"
|
|
451
|
+
>Live Broadcast History</span
|
|
452
|
+
>
|
|
402
453
|
<UButton
|
|
403
454
|
v-if="activeRoom?.messages && activeRoom.messages.length > 0"
|
|
404
455
|
size="xs"
|
|
@@ -418,12 +469,19 @@ function formatJson(val: any): string {
|
|
|
418
469
|
>
|
|
419
470
|
<div class="flex items-center justify-between mb-1 text-[11px]">
|
|
420
471
|
<div class="flex items-center gap-2">
|
|
421
|
-
<UBadge size="xs" color="primary" variant="subtle">{{
|
|
422
|
-
|
|
472
|
+
<UBadge size="xs" color="primary" variant="subtle">{{
|
|
473
|
+
msg.event || msg.type
|
|
474
|
+
}}</UBadge>
|
|
475
|
+
<span class="text-muted font-sans"
|
|
476
|
+
>from
|
|
477
|
+
<strong class="text-highlighted">{{ msg.sender || "unknown" }}</strong></span
|
|
478
|
+
>
|
|
423
479
|
</div>
|
|
424
480
|
<span class="text-muted text-[10px]">{{ formatTime(msg.timestamp) }}</span>
|
|
425
481
|
</div>
|
|
426
|
-
<pre class="bg-muted/40 p-2 rounded text-[11px] overflow-x-auto text-default">{{
|
|
482
|
+
<pre class="bg-muted/40 p-2 rounded text-[11px] overflow-x-auto text-default">{{
|
|
483
|
+
formatJson(msg.payload)
|
|
484
|
+
}}</pre>
|
|
427
485
|
</div>
|
|
428
486
|
|
|
429
487
|
<div v-if="!activeRoom?.messages?.length" class="p-8 text-center text-xs text-muted">
|
|
@@ -470,9 +528,13 @@ function formatJson(val: any): string {
|
|
|
470
528
|
|
|
471
529
|
<!-- Tab 3: Synchronized Room State -->
|
|
472
530
|
<div v-else-if="activeTab === 'state'" class="flex-1 overflow-y-auto p-4 space-y-3">
|
|
473
|
-
<div class="text-xs font-semibold text-muted uppercase tracking-wider mb-2">
|
|
531
|
+
<div class="text-xs font-semibold text-muted uppercase tracking-wider mb-2">
|
|
532
|
+
Durable Object Synchronized State
|
|
533
|
+
</div>
|
|
474
534
|
<div class="rounded-xl border border-default bg-elevated/40 p-4">
|
|
475
|
-
<pre class="font-mono text-xs text-default overflow-x-auto whitespace-pre-wrap">{{
|
|
535
|
+
<pre class="font-mono text-xs text-default overflow-x-auto whitespace-pre-wrap">{{
|
|
536
|
+
formatJson(activeRoom?.state || {})
|
|
537
|
+
}}</pre>
|
|
476
538
|
</div>
|
|
477
539
|
</div>
|
|
478
540
|
</div>
|
|
@@ -145,7 +145,9 @@ function formatTime(ts: number): string {
|
|
|
145
145
|
return new Date(ts).toLocaleTimeString()
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
function getBadgeColor(
|
|
148
|
+
function getBadgeColor(
|
|
149
|
+
type: string,
|
|
150
|
+
): "primary" | "secondary" | "success" | "info" | "warning" | "error" | "neutral" {
|
|
149
151
|
switch (type) {
|
|
150
152
|
case "ratelimit":
|
|
151
153
|
return "warning"
|
|
@@ -361,7 +363,13 @@ function getBadgeColor(type: string): "primary" | "secondary" | "success" | "inf
|
|
|
361
363
|
<td class="px-4 py-3">
|
|
362
364
|
<UBadge
|
|
363
365
|
size="xs"
|
|
364
|
-
:color="
|
|
366
|
+
:color="
|
|
367
|
+
ev.action === 'blocked'
|
|
368
|
+
? 'error'
|
|
369
|
+
: ev.action === 'challenged'
|
|
370
|
+
? 'warning'
|
|
371
|
+
: 'success'
|
|
372
|
+
"
|
|
365
373
|
variant="subtle"
|
|
366
374
|
>
|
|
367
375
|
{{ ev.action }}
|
|
@@ -378,7 +386,12 @@ function getBadgeColor(type: string): "primary" | "secondary" | "success" | "inf
|
|
|
378
386
|
variant="ghost"
|
|
379
387
|
label="Ban IP"
|
|
380
388
|
icon="i-lucide-ban"
|
|
381
|
-
@click="
|
|
389
|
+
@click="
|
|
390
|
+
() => {
|
|
391
|
+
newBanIp = ev.ip
|
|
392
|
+
triggerBanIp()
|
|
393
|
+
}
|
|
394
|
+
"
|
|
382
395
|
/>
|
|
383
396
|
<UButton
|
|
384
397
|
v-else
|
|
@@ -432,7 +445,7 @@ function getBadgeColor(type: string): "primary" | "secondary" | "success" | "inf
|
|
|
432
445
|
</td>
|
|
433
446
|
<td class="px-4 py-3">
|
|
434
447
|
<UBadge size="xs" :color="b.isBlocked ? 'error' : 'success'" variant="subtle">
|
|
435
|
-
{{ b.isBlocked ?
|
|
448
|
+
{{ b.isBlocked ? "Rate Limited" : "Active" }}
|
|
436
449
|
</UBadge>
|
|
437
450
|
</td>
|
|
438
451
|
<td class="px-4 py-3 text-right font-mono text-muted text-[11px]">
|
|
@@ -452,7 +465,9 @@ function getBadgeColor(type: string): "primary" | "secondary" | "success" | "inf
|
|
|
452
465
|
<!-- ── Tab 3: Banned IP Registry ──────────────────────────────────── -->
|
|
453
466
|
<div v-else-if="activeTab === 'banned'" class="space-y-4">
|
|
454
467
|
<!-- Add Ban Form -->
|
|
455
|
-
<div
|
|
468
|
+
<div
|
|
469
|
+
class="flex items-center gap-2 p-3 rounded-xl border border-default bg-elevated/20 max-w-md"
|
|
470
|
+
>
|
|
456
471
|
<UInput
|
|
457
472
|
v-model="newBanIp"
|
|
458
473
|
placeholder="Enter IP address (e.g. 198.51.100.42)"
|