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,559 +1,559 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useFetch } from "nuxt/app"
|
|
3
|
-
import { computed, onMounted, ref } from "vue"
|
|
4
|
-
|
|
5
|
-
const {
|
|
6
|
-
data: settingsData,
|
|
7
|
-
status: settingsStatus,
|
|
8
|
-
pending: settingsPending,
|
|
9
|
-
execute: executeLoadSettings,
|
|
10
|
-
} = useFetch<any>("/_qarpeo/api/settings", {
|
|
11
|
-
immediate: false,
|
|
12
|
-
lazy: true,
|
|
13
|
-
default: () => ({
|
|
14
|
-
system: {},
|
|
15
|
-
bindings: {},
|
|
16
|
-
modules: {},
|
|
17
|
-
devSandbox: {},
|
|
18
|
-
securityGateway: {},
|
|
19
|
-
}),
|
|
20
|
-
})
|
|
21
|
-
|
|
22
|
-
const loading = computed(
|
|
23
|
-
() =>
|
|
24
|
-
settingsPending.value || settingsStatus.value === "idle" || settingsStatus.value === "pending",
|
|
25
|
-
)
|
|
26
|
-
|
|
27
|
-
const activeTab = ref<"bindings" | "modules" | "sandbox" | "security">("bindings")
|
|
28
|
-
|
|
29
|
-
const system = computed(() => settingsData.value?.system || {})
|
|
30
|
-
const bindings = computed(() => settingsData.value?.bindings || {})
|
|
31
|
-
const modules = computed(() => settingsData.value?.modules || {})
|
|
32
|
-
const devSandbox = computed(() => settingsData.value?.devSandbox || {})
|
|
33
|
-
const security = computed(() => settingsData.value?.securityGateway || {})
|
|
34
|
-
|
|
35
|
-
// Reset dev sandbox state
|
|
36
|
-
const resetting = ref(false)
|
|
37
|
-
const showResetModal = ref(false)
|
|
38
|
-
const resetTarget = ref<"all" | "kv" | "blob">("all")
|
|
39
|
-
const resetSuccessMessage = ref("")
|
|
40
|
-
|
|
41
|
-
async function loadSettings() {
|
|
42
|
-
await executeLoadSettings()
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
async function handleResetData() {
|
|
46
|
-
resetting.value = true
|
|
47
|
-
try {
|
|
48
|
-
const res = await $fetch<any>("/_qarpeo/api/settings/reset-dev-data", {
|
|
49
|
-
method: "POST",
|
|
50
|
-
body: { target: resetTarget.value },
|
|
51
|
-
})
|
|
52
|
-
resetSuccessMessage.value = res.message || "Dev sandbox reset successfully."
|
|
53
|
-
showResetModal.value = false
|
|
54
|
-
await loadSettings()
|
|
55
|
-
setTimeout(() => {
|
|
56
|
-
resetSuccessMessage.value = ""
|
|
57
|
-
}, 4000)
|
|
58
|
-
} catch (err: any) {
|
|
59
|
-
console.error("Failed to reset sandbox:", err)
|
|
60
|
-
} finally {
|
|
61
|
-
resetting.value = false
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
function openResetModal(target: "all" | "kv" | "blob") {
|
|
66
|
-
resetTarget.value = target
|
|
67
|
-
showResetModal.value = true
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
onMounted(() => {
|
|
71
|
-
loadSettings()
|
|
72
|
-
})
|
|
73
|
-
</script>
|
|
74
|
-
|
|
75
|
-
<template>
|
|
76
|
-
<UDashboardPanel id="devtools-settings">
|
|
77
|
-
<template #header>
|
|
78
|
-
<UDashboardNavbar>
|
|
79
|
-
<template #title>
|
|
80
|
-
<div class="flex items-center gap-2">
|
|
81
|
-
<UIcon name="i-lucide-settings" class="w-4 h-4 text-primary" />
|
|
82
|
-
<span class="font-bold text-sm text-highlighted">DevTools Settings & Runtime</span>
|
|
83
|
-
<UBadge size="xs" color="neutral" variant="subtle">Diagnostics</UBadge>
|
|
84
|
-
</div>
|
|
85
|
-
</template>
|
|
86
|
-
|
|
87
|
-
<template #right>
|
|
88
|
-
<div class="flex items-center gap-1.5">
|
|
89
|
-
<UButton
|
|
90
|
-
icon="i-lucide-refresh-cw"
|
|
91
|
-
size="xs"
|
|
92
|
-
color="neutral"
|
|
93
|
-
variant="ghost"
|
|
94
|
-
title="Refresh settings"
|
|
95
|
-
:loading="loading"
|
|
96
|
-
@click="loadSettings"
|
|
97
|
-
/>
|
|
98
|
-
</div>
|
|
99
|
-
</template>
|
|
100
|
-
</UDashboardNavbar>
|
|
101
|
-
|
|
102
|
-
<!-- Subheader Category Tabs -->
|
|
103
|
-
<UDashboardToolbar>
|
|
104
|
-
<div class="flex items-center gap-1 bg-muted p-0.5 rounded border border-default">
|
|
105
|
-
<UButton
|
|
106
|
-
label="Edge Bindings"
|
|
107
|
-
icon="i-lucide-cpu"
|
|
108
|
-
size="xs"
|
|
109
|
-
:color="activeTab === 'bindings' ? 'primary' : 'neutral'"
|
|
110
|
-
:variant="activeTab === 'bindings' ? 'subtle' : 'ghost'"
|
|
111
|
-
@click="activeTab = 'bindings'"
|
|
112
|
-
/>
|
|
113
|
-
<UButton
|
|
114
|
-
label="Modules & Tiers"
|
|
115
|
-
icon="i-lucide-layers"
|
|
116
|
-
size="xs"
|
|
117
|
-
:color="activeTab === 'modules' ? 'primary' : 'neutral'"
|
|
118
|
-
:variant="activeTab === 'modules' ? 'subtle' : 'ghost'"
|
|
119
|
-
@click="activeTab = 'modules'"
|
|
120
|
-
/>
|
|
121
|
-
<UButton
|
|
122
|
-
label="Dev Sandbox"
|
|
123
|
-
icon="i-lucide-flask-conical"
|
|
124
|
-
size="xs"
|
|
125
|
-
:color="activeTab === 'sandbox' ? 'primary' : 'neutral'"
|
|
126
|
-
:variant="activeTab === 'sandbox' ? 'subtle' : 'ghost'"
|
|
127
|
-
@click="activeTab = 'sandbox'"
|
|
128
|
-
>
|
|
129
|
-
<template #trailing>
|
|
130
|
-
<UBadge
|
|
131
|
-
size="xs"
|
|
132
|
-
:color="activeTab === 'sandbox' ? 'primary' : 'neutral'"
|
|
133
|
-
variant="subtle"
|
|
134
|
-
>
|
|
135
|
-
Mock
|
|
136
|
-
</UBadge>
|
|
137
|
-
</template>
|
|
138
|
-
</UButton>
|
|
139
|
-
<UButton
|
|
140
|
-
label="Security & Gateway"
|
|
141
|
-
icon="i-lucide-shield-check"
|
|
142
|
-
size="xs"
|
|
143
|
-
:color="activeTab === 'security' ? 'primary' : 'neutral'"
|
|
144
|
-
:variant="activeTab === 'security' ? 'subtle' : 'ghost'"
|
|
145
|
-
@click="activeTab = 'security'"
|
|
146
|
-
/>
|
|
147
|
-
</div>
|
|
148
|
-
</UDashboardToolbar>
|
|
149
|
-
</template>
|
|
150
|
-
|
|
151
|
-
<template #body>
|
|
152
|
-
<!-- Success Toast / Notification Banner -->
|
|
153
|
-
<div
|
|
154
|
-
v-if="resetSuccessMessage"
|
|
155
|
-
class="bg-success/10 border border-success/30 text-success rounded-lg p-3 text-xs flex items-center justify-between mb-4"
|
|
156
|
-
>
|
|
157
|
-
<div class="flex items-center gap-2">
|
|
158
|
-
<UIcon name="i-lucide-check-circle" class="w-4 h-4 shrink-0" />
|
|
159
|
-
<span>{{ resetSuccessMessage }}</span>
|
|
160
|
-
</div>
|
|
161
|
-
<UButton color="success" variant="ghost" size="xs" @click="resetSuccessMessage = ''">
|
|
162
|
-
Dismiss
|
|
163
|
-
</UButton>
|
|
164
|
-
</div>
|
|
165
|
-
|
|
166
|
-
<!-- Loading Skeleton State -->
|
|
167
|
-
<div v-if="loading" class="space-y-6">
|
|
168
|
-
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
|
|
169
|
-
<div
|
|
170
|
-
v-for="i in 4"
|
|
171
|
-
:key="i"
|
|
172
|
-
class="bg-elevated/40 border border-default rounded-xl p-4 h-24 animate-pulse flex flex-col justify-between"
|
|
173
|
-
>
|
|
174
|
-
<div class="h-3 w-1/2 bg-muted rounded"></div>
|
|
175
|
-
<div class="h-6 w-3/4 bg-muted rounded"></div>
|
|
176
|
-
</div>
|
|
177
|
-
</div>
|
|
178
|
-
<div class="border border-default rounded-xl p-6 h-64 bg-elevated/40 animate-pulse"></div>
|
|
179
|
-
</div>
|
|
180
|
-
|
|
181
|
-
<div v-else class="space-y-6">
|
|
182
|
-
<!-- ── System Overview KPI Cards ──────────────────────────────── -->
|
|
183
|
-
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3.5">
|
|
184
|
-
<div
|
|
185
|
-
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between shadow-xs"
|
|
186
|
-
>
|
|
187
|
-
<div class="flex items-center justify-between text-muted text-xs">
|
|
188
|
-
<span>Environment</span>
|
|
189
|
-
<UIcon name="i-lucide-globe" class="w-4 h-4 text-primary" />
|
|
190
|
-
</div>
|
|
191
|
-
<div class="mt-2 flex items-center gap-2">
|
|
192
|
-
<span class="text-base font-bold text-highlighted capitalize">{{
|
|
193
|
-
system.environment
|
|
194
|
-
}}</span>
|
|
195
|
-
<UBadge :color="system.devMode ? 'warning' : 'success'" variant="subtle" size="xs">
|
|
196
|
-
{{ system.devMode ? "Dev Mode" : "Production" }}
|
|
197
|
-
</UBadge>
|
|
198
|
-
</div>
|
|
199
|
-
<div class="text-[11px] text-muted mt-1 font-mono">Node {{ system.nodeVersion }}</div>
|
|
200
|
-
</div>
|
|
201
|
-
|
|
202
|
-
<div
|
|
203
|
-
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between shadow-xs"
|
|
204
|
-
>
|
|
205
|
-
<div class="flex items-center justify-between text-muted text-xs">
|
|
206
|
-
<span>Runtime Engine</span>
|
|
207
|
-
<UIcon name="i-lucide-server" class="w-4 h-4 text-primary" />
|
|
208
|
-
</div>
|
|
209
|
-
<div class="mt-2 text-base font-bold text-highlighted">Cloudflare Edge</div>
|
|
210
|
-
<div class="text-[11px] text-muted mt-1 font-mono truncate">Nuxt 5 + Nitro Engine</div>
|
|
211
|
-
</div>
|
|
212
|
-
|
|
213
|
-
<div
|
|
214
|
-
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between shadow-xs"
|
|
215
|
-
>
|
|
216
|
-
<div class="flex items-center justify-between text-muted text-xs">
|
|
217
|
-
<span>Framework Version</span>
|
|
218
|
-
<UIcon name="i-lucide-tag" class="w-4 h-4 text-primary" />
|
|
219
|
-
</div>
|
|
220
|
-
<div class="mt-2 text-base font-bold text-highlighted font-mono">
|
|
221
|
-
v{{ system.version }}
|
|
222
|
-
</div>
|
|
223
|
-
<div class="text-[11px] text-muted mt-1">@qarpeo/core</div>
|
|
224
|
-
</div>
|
|
225
|
-
|
|
226
|
-
<div
|
|
227
|
-
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between shadow-xs"
|
|
228
|
-
>
|
|
229
|
-
<div class="flex items-center justify-between text-muted text-xs">
|
|
230
|
-
<span>Dev Mock Sandbox</span>
|
|
231
|
-
<UIcon name="i-lucide-flask-conical" class="w-4 h-4 text-primary" />
|
|
232
|
-
</div>
|
|
233
|
-
<div class="mt-2 flex items-center gap-2">
|
|
234
|
-
<span class="text-base font-bold text-highlighted">
|
|
235
|
-
{{ devSandbox.kvItems }} KV / {{ devSandbox.blobFiles }} Blob
|
|
236
|
-
</span>
|
|
237
|
-
</div>
|
|
238
|
-
<div class="text-[11px] text-muted mt-1">In-Memory Active</div>
|
|
239
|
-
</div>
|
|
240
|
-
</div>
|
|
241
|
-
|
|
242
|
-
<!-- ── TAB 1: EDGE BINDINGS ───────────────────────────────────── -->
|
|
243
|
-
<div v-if="activeTab === 'bindings'" class="space-y-4">
|
|
244
|
-
<div class="flex items-center justify-between">
|
|
245
|
-
<div>
|
|
246
|
-
<h3 class="text-sm font-bold text-highlighted">Cloudflare Edge Bindings</h3>
|
|
247
|
-
<p class="text-xs text-muted">
|
|
248
|
-
Runtime infrastructure bindings attached to Cloudflare Workers and Nitro context.
|
|
249
|
-
</p>
|
|
250
|
-
</div>
|
|
251
|
-
</div>
|
|
252
|
-
|
|
253
|
-
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3.5">
|
|
254
|
-
<div
|
|
255
|
-
v-for="(binding, key) in bindings"
|
|
256
|
-
:key="key"
|
|
257
|
-
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between space-y-3"
|
|
258
|
-
>
|
|
259
|
-
<div class="flex items-start justify-between">
|
|
260
|
-
<div class="flex items-center gap-2.5">
|
|
261
|
-
<div
|
|
262
|
-
class="w-8 h-8 rounded-lg bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shrink-0"
|
|
263
|
-
>
|
|
264
|
-
<UIcon
|
|
265
|
-
:name="
|
|
266
|
-
key === 'db'
|
|
267
|
-
? 'i-lucide-database'
|
|
268
|
-
: key === 'kv'
|
|
269
|
-
? 'i-lucide-zap'
|
|
270
|
-
: key === 'blob'
|
|
271
|
-
? 'i-lucide-box'
|
|
272
|
-
: key === 'agents'
|
|
273
|
-
? 'i-lucide-bot'
|
|
274
|
-
: key === 'analytics'
|
|
275
|
-
? 'i-lucide-bar-chart'
|
|
276
|
-
: 'i-lucide-cpu'
|
|
277
|
-
"
|
|
278
|
-
class="w-4 h-4"
|
|
279
|
-
/>
|
|
280
|
-
</div>
|
|
281
|
-
<div>
|
|
282
|
-
<div class="text-xs font-bold text-highlighted uppercase tracking-wide">
|
|
283
|
-
{{ key }}
|
|
284
|
-
</div>
|
|
285
|
-
<div class="text-[11px] text-muted">{{ binding.type }}</div>
|
|
286
|
-
</div>
|
|
287
|
-
</div>
|
|
288
|
-
|
|
289
|
-
<UBadge size="xs" :color="binding.enabled ? 'success' : 'neutral'" variant="subtle">
|
|
290
|
-
{{ binding.enabled ? "Configured" : "Disabled" }}
|
|
291
|
-
</UBadge>
|
|
292
|
-
</div>
|
|
293
|
-
|
|
294
|
-
<div class="divide-y divide-default/50 text-xs font-mono pt-1">
|
|
295
|
-
<div class="flex justify-between py-1.5">
|
|
296
|
-
<span class="text-muted">Binding Name</span>
|
|
297
|
-
<span class="text-highlighted font-bold">{{ binding.name }}</span>
|
|
298
|
-
</div>
|
|
299
|
-
<div class="flex justify-between py-1.5">
|
|
300
|
-
<span class="text-muted">Dev Fallback</span>
|
|
301
|
-
<span class="text-default">In-Memory Mock</span>
|
|
302
|
-
</div>
|
|
303
|
-
</div>
|
|
304
|
-
</div>
|
|
305
|
-
</div>
|
|
306
|
-
</div>
|
|
307
|
-
|
|
308
|
-
<!-- ── TAB 2: MODULES & TIERS ─────────────────────────────────── -->
|
|
309
|
-
<div v-else-if="activeTab === 'modules'" class="space-y-4">
|
|
310
|
-
<div>
|
|
311
|
-
<h3 class="text-sm font-bold text-highlighted">Active Framework Modules</h3>
|
|
312
|
-
<p class="text-xs text-muted">
|
|
313
|
-
Tier 1 infrastructure primitives and Tier 2 integrated business solutions.
|
|
314
|
-
</p>
|
|
315
|
-
</div>
|
|
316
|
-
|
|
317
|
-
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3.5">
|
|
318
|
-
<div
|
|
319
|
-
v-for="(mod, key) in modules"
|
|
320
|
-
:key="key"
|
|
321
|
-
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between space-y-2"
|
|
322
|
-
>
|
|
323
|
-
<div class="flex items-center justify-between">
|
|
324
|
-
<div class="flex items-center gap-2">
|
|
325
|
-
<UIcon name="i-lucide-check-circle" class="w-4 h-4 text-primary" />
|
|
326
|
-
<span class="text-xs font-bold text-highlighted">{{ mod.label }}</span>
|
|
327
|
-
</div>
|
|
328
|
-
<UBadge size="xs" :color="mod.enabled ? 'primary' : 'neutral'" variant="subtle">
|
|
329
|
-
{{ mod.enabled ? "Enabled" : "Optional" }}
|
|
330
|
-
</UBadge>
|
|
331
|
-
</div>
|
|
332
|
-
|
|
333
|
-
<p class="text-xs text-muted leading-relaxed">
|
|
334
|
-
{{ mod.description }}
|
|
335
|
-
</p>
|
|
336
|
-
|
|
337
|
-
<div
|
|
338
|
-
v-if="key === 'multitenant' && mod.enabled"
|
|
339
|
-
class="pt-2 text-[11px] font-mono text-muted space-y-0.5"
|
|
340
|
-
>
|
|
341
|
-
<div>
|
|
342
|
-
Root: <span class="text-highlighted">{{ mod.rootDomains?.join(", ") }}</span>
|
|
343
|
-
</div>
|
|
344
|
-
<div>
|
|
345
|
-
Custom Domains:
|
|
346
|
-
<span class="text-highlighted">{{ mod.customDomains ? "Active" : "Off" }}</span>
|
|
347
|
-
</div>
|
|
348
|
-
</div>
|
|
349
|
-
</div>
|
|
350
|
-
</div>
|
|
351
|
-
</div>
|
|
352
|
-
|
|
353
|
-
<!-- ── TAB 3: DEV SANDBOX MANAGEMENT ──────────────────────────── -->
|
|
354
|
-
<div v-else-if="activeTab === 'sandbox'" class="space-y-4">
|
|
355
|
-
<div class="flex items-center justify-between">
|
|
356
|
-
<div>
|
|
357
|
-
<h3 class="text-sm font-bold text-highlighted">Development Mock Sandbox</h3>
|
|
358
|
-
<p class="text-xs text-muted">
|
|
359
|
-
Manage and reset temporary in-memory mock data across DevTools panels.
|
|
360
|
-
</p>
|
|
361
|
-
</div>
|
|
362
|
-
<UButton
|
|
363
|
-
label="Reset All Sandbox Data"
|
|
364
|
-
icon="i-lucide-rotate-ccw"
|
|
365
|
-
color="error"
|
|
366
|
-
size="xs"
|
|
367
|
-
variant="subtle"
|
|
368
|
-
@click="openResetModal('all')"
|
|
369
|
-
/>
|
|
370
|
-
</div>
|
|
371
|
-
|
|
372
|
-
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
373
|
-
<!-- KV Sandbox Card -->
|
|
374
|
-
<div
|
|
375
|
-
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between space-y-4"
|
|
376
|
-
>
|
|
377
|
-
<div class="flex items-start justify-between">
|
|
378
|
-
<div class="flex items-center gap-2">
|
|
379
|
-
<UIcon name="i-lucide-zap" class="w-5 h-5 text-primary" />
|
|
380
|
-
<div>
|
|
381
|
-
<div class="text-xs font-bold text-highlighted">KV Store Sandbox</div>
|
|
382
|
-
<div class="text-[11px] text-muted">
|
|
383
|
-
{{ devSandbox.kvItems }} keys currently stored
|
|
384
|
-
</div>
|
|
385
|
-
</div>
|
|
386
|
-
</div>
|
|
387
|
-
<UBadge size="xs" color="neutral" variant="subtle">In-Memory</UBadge>
|
|
388
|
-
</div>
|
|
389
|
-
<p class="text-xs text-muted">
|
|
390
|
-
Stores mock session tokens, cache tags, rate limit windows, and domain mapping
|
|
391
|
-
records.
|
|
392
|
-
</p>
|
|
393
|
-
<div class="flex justify-end pt-2">
|
|
394
|
-
<UButton
|
|
395
|
-
label="Reset KV Store"
|
|
396
|
-
size="xs"
|
|
397
|
-
color="neutral"
|
|
398
|
-
variant="subtle"
|
|
399
|
-
icon="i-lucide-rotate-ccw"
|
|
400
|
-
@click="openResetModal('kv')"
|
|
401
|
-
/>
|
|
402
|
-
</div>
|
|
403
|
-
</div>
|
|
404
|
-
|
|
405
|
-
<!-- Blob Sandbox Card -->
|
|
406
|
-
<div
|
|
407
|
-
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between space-y-4"
|
|
408
|
-
>
|
|
409
|
-
<div class="flex items-start justify-between">
|
|
410
|
-
<div class="flex items-center gap-2">
|
|
411
|
-
<UIcon name="i-lucide-box" class="w-5 h-5 text-primary" />
|
|
412
|
-
<div>
|
|
413
|
-
<div class="text-xs font-bold text-highlighted">Blob / R2 Sandbox</div>
|
|
414
|
-
<div class="text-[11px] text-muted">
|
|
415
|
-
{{ devSandbox.blobFiles }} files uploaded
|
|
416
|
-
</div>
|
|
417
|
-
</div>
|
|
418
|
-
</div>
|
|
419
|
-
<UBadge size="xs" color="neutral" variant="subtle">In-Memory</UBadge>
|
|
420
|
-
</div>
|
|
421
|
-
<p class="text-xs text-muted">
|
|
422
|
-
Stores uploaded mock avatars, documents, and media buffers with live serve
|
|
423
|
-
endpoints.
|
|
424
|
-
</p>
|
|
425
|
-
<div class="flex justify-end pt-2">
|
|
426
|
-
<UButton
|
|
427
|
-
label="Reset Blob Store"
|
|
428
|
-
size="xs"
|
|
429
|
-
color="neutral"
|
|
430
|
-
variant="subtle"
|
|
431
|
-
icon="i-lucide-rotate-ccw"
|
|
432
|
-
@click="openResetModal('blob')"
|
|
433
|
-
/>
|
|
434
|
-
</div>
|
|
435
|
-
</div>
|
|
436
|
-
|
|
437
|
-
<!-- Tenants Sandbox Card -->
|
|
438
|
-
<div
|
|
439
|
-
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between space-y-4"
|
|
440
|
-
>
|
|
441
|
-
<div class="flex items-start justify-between">
|
|
442
|
-
<div class="flex items-center gap-2">
|
|
443
|
-
<UIcon name="i-lucide-globe" class="w-5 h-5 text-primary" />
|
|
444
|
-
<div>
|
|
445
|
-
<div class="text-xs font-bold text-highlighted">Tenants & Domains</div>
|
|
446
|
-
<div class="text-[11px] text-muted">
|
|
447
|
-
{{ devSandbox.tenantsCount }} organizations registered
|
|
448
|
-
</div>
|
|
449
|
-
</div>
|
|
450
|
-
</div>
|
|
451
|
-
<UBadge size="xs" color="neutral" variant="subtle">In-Memory</UBadge>
|
|
452
|
-
</div>
|
|
453
|
-
<p class="text-xs text-muted">
|
|
454
|
-
Simulates multi-tenant organization directories, subdomains, and CNAME custom
|
|
455
|
-
hostnames.
|
|
456
|
-
</p>
|
|
457
|
-
<div class="flex justify-end pt-2">
|
|
458
|
-
<UButton
|
|
459
|
-
label="Manage Tenants"
|
|
460
|
-
size="xs"
|
|
461
|
-
color="neutral"
|
|
462
|
-
variant="subtle"
|
|
463
|
-
to="/devtools/domains"
|
|
464
|
-
/>
|
|
465
|
-
</div>
|
|
466
|
-
</div>
|
|
467
|
-
</div>
|
|
468
|
-
</div>
|
|
469
|
-
|
|
470
|
-
<!-- ── TAB 4: SECURITY GATEWAY ────────────────────────────────── -->
|
|
471
|
-
<div v-else-if="activeTab === 'security'" class="space-y-4">
|
|
472
|
-
<div>
|
|
473
|
-
<h3 class="text-sm font-bold text-highlighted">DevTools Security Gateway</h3>
|
|
474
|
-
<p class="text-xs text-muted">
|
|
475
|
-
Access control policies safeguarding DevTools endpoints from unauthorized external
|
|
476
|
-
access.
|
|
477
|
-
</p>
|
|
478
|
-
</div>
|
|
479
|
-
|
|
480
|
-
<div class="bg-elevated/40 border border-default rounded-xl p-5 space-y-4 max-w-2xl">
|
|
481
|
-
<div class="divide-y divide-default text-xs">
|
|
482
|
-
<div class="flex items-center justify-between py-3">
|
|
483
|
-
<div>
|
|
484
|
-
<div class="font-bold text-highlighted">Authentication Required</div>
|
|
485
|
-
<div class="text-muted text-[11px]">
|
|
486
|
-
Enforce Bearer token verification on /_qarpeo/api/* endpoints
|
|
487
|
-
</div>
|
|
488
|
-
</div>
|
|
489
|
-
<UBadge :color="security.tokenRequired ? 'warning' : 'success'" variant="subtle">
|
|
490
|
-
{{ security.tokenRequired ? "Token Enforced" : "Local Dev Open" }}
|
|
491
|
-
</UBadge>
|
|
492
|
-
</div>
|
|
493
|
-
|
|
494
|
-
<div class="flex items-center justify-between py-3">
|
|
495
|
-
<div>
|
|
496
|
-
<div class="font-bold text-highlighted">Allowed Local IP Addresses</div>
|
|
497
|
-
<div class="text-muted text-[11px]">
|
|
498
|
-
Whitelisted loopback addresses for embedded DevTools dock
|
|
499
|
-
</div>
|
|
500
|
-
</div>
|
|
501
|
-
<div class="font-mono text-[11px] text-default">
|
|
502
|
-
{{ security.allowedIps?.join(", ") || "127.0.0.1, ::1" }}
|
|
503
|
-
</div>
|
|
504
|
-
</div>
|
|
505
|
-
|
|
506
|
-
<div class="flex items-center justify-between py-3">
|
|
507
|
-
<div>
|
|
508
|
-
<div class="font-bold text-highlighted">Nuxt DevTools Dock Path</div>
|
|
509
|
-
<div class="text-muted text-[11px]">
|
|
510
|
-
Embedded iframe mount path inside Nuxt DevTools
|
|
511
|
-
</div>
|
|
512
|
-
</div>
|
|
513
|
-
<div class="font-mono text-[11px] text-primary">
|
|
514
|
-
{{ security.dockRoute || "/_qarpeo/devtools" }}
|
|
515
|
-
</div>
|
|
516
|
-
</div>
|
|
517
|
-
</div>
|
|
518
|
-
</div>
|
|
519
|
-
</div>
|
|
520
|
-
</div>
|
|
521
|
-
</template>
|
|
522
|
-
</UDashboardPanel>
|
|
523
|
-
|
|
524
|
-
<!-- Reset Dev Data Confirmation Modal -->
|
|
525
|
-
<UModal v-model:open="showResetModal" title="Reset Dev Sandbox">
|
|
526
|
-
<template #body>
|
|
527
|
-
<div class="space-y-3">
|
|
528
|
-
<p class="text-xs text-default">
|
|
529
|
-
Are you sure you want to reset
|
|
530
|
-
<span class="font-bold text-highlighted uppercase">{{ resetTarget }}</span>
|
|
531
|
-
in-memory sandbox data?
|
|
532
|
-
</p>
|
|
533
|
-
<p class="text-xs text-muted">
|
|
534
|
-
All mock items created in this development session will be erased and restored to their
|
|
535
|
-
original seed fixtures.
|
|
536
|
-
</p>
|
|
537
|
-
</div>
|
|
538
|
-
</template>
|
|
539
|
-
<template #footer>
|
|
540
|
-
<div class="flex justify-end gap-2">
|
|
541
|
-
<UButton
|
|
542
|
-
label="Cancel"
|
|
543
|
-
color="neutral"
|
|
544
|
-
variant="ghost"
|
|
545
|
-
size="xs"
|
|
546
|
-
@click="showResetModal = false"
|
|
547
|
-
/>
|
|
548
|
-
<UButton
|
|
549
|
-
label="Confirm Reset"
|
|
550
|
-
color="error"
|
|
551
|
-
size="xs"
|
|
552
|
-
icon="i-lucide-rotate-ccw"
|
|
553
|
-
:loading="resetting"
|
|
554
|
-
@click="handleResetData"
|
|
555
|
-
/>
|
|
556
|
-
</div>
|
|
557
|
-
</template>
|
|
558
|
-
</UModal>
|
|
559
|
-
</template>
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useFetch } from "nuxt/app"
|
|
3
|
+
import { computed, onMounted, ref } from "vue"
|
|
4
|
+
|
|
5
|
+
const {
|
|
6
|
+
data: settingsData,
|
|
7
|
+
status: settingsStatus,
|
|
8
|
+
pending: settingsPending,
|
|
9
|
+
execute: executeLoadSettings,
|
|
10
|
+
} = useFetch<any>("/_qarpeo/api/settings", {
|
|
11
|
+
immediate: false,
|
|
12
|
+
lazy: true,
|
|
13
|
+
default: () => ({
|
|
14
|
+
system: {},
|
|
15
|
+
bindings: {},
|
|
16
|
+
modules: {},
|
|
17
|
+
devSandbox: {},
|
|
18
|
+
securityGateway: {},
|
|
19
|
+
}),
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
const loading = computed(
|
|
23
|
+
() =>
|
|
24
|
+
settingsPending.value || settingsStatus.value === "idle" || settingsStatus.value === "pending",
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
const activeTab = ref<"bindings" | "modules" | "sandbox" | "security">("bindings")
|
|
28
|
+
|
|
29
|
+
const system = computed(() => settingsData.value?.system || {})
|
|
30
|
+
const bindings = computed(() => settingsData.value?.bindings || {})
|
|
31
|
+
const modules = computed(() => settingsData.value?.modules || {})
|
|
32
|
+
const devSandbox = computed(() => settingsData.value?.devSandbox || {})
|
|
33
|
+
const security = computed(() => settingsData.value?.securityGateway || {})
|
|
34
|
+
|
|
35
|
+
// Reset dev sandbox state
|
|
36
|
+
const resetting = ref(false)
|
|
37
|
+
const showResetModal = ref(false)
|
|
38
|
+
const resetTarget = ref<"all" | "kv" | "blob">("all")
|
|
39
|
+
const resetSuccessMessage = ref("")
|
|
40
|
+
|
|
41
|
+
async function loadSettings() {
|
|
42
|
+
await executeLoadSettings()
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
async function handleResetData() {
|
|
46
|
+
resetting.value = true
|
|
47
|
+
try {
|
|
48
|
+
const res = await $fetch<any>("/_qarpeo/api/settings/reset-dev-data", {
|
|
49
|
+
method: "POST",
|
|
50
|
+
body: { target: resetTarget.value },
|
|
51
|
+
})
|
|
52
|
+
resetSuccessMessage.value = res.message || "Dev sandbox reset successfully."
|
|
53
|
+
showResetModal.value = false
|
|
54
|
+
await loadSettings()
|
|
55
|
+
setTimeout(() => {
|
|
56
|
+
resetSuccessMessage.value = ""
|
|
57
|
+
}, 4000)
|
|
58
|
+
} catch (err: any) {
|
|
59
|
+
console.error("Failed to reset sandbox:", err)
|
|
60
|
+
} finally {
|
|
61
|
+
resetting.value = false
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function openResetModal(target: "all" | "kv" | "blob") {
|
|
66
|
+
resetTarget.value = target
|
|
67
|
+
showResetModal.value = true
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
onMounted(() => {
|
|
71
|
+
loadSettings()
|
|
72
|
+
})
|
|
73
|
+
</script>
|
|
74
|
+
|
|
75
|
+
<template>
|
|
76
|
+
<UDashboardPanel id="devtools-settings">
|
|
77
|
+
<template #header>
|
|
78
|
+
<UDashboardNavbar>
|
|
79
|
+
<template #title>
|
|
80
|
+
<div class="flex items-center gap-2">
|
|
81
|
+
<UIcon name="i-lucide-settings" class="w-4 h-4 text-primary" />
|
|
82
|
+
<span class="font-bold text-sm text-highlighted">DevTools Settings & Runtime</span>
|
|
83
|
+
<UBadge size="xs" color="neutral" variant="subtle">Diagnostics</UBadge>
|
|
84
|
+
</div>
|
|
85
|
+
</template>
|
|
86
|
+
|
|
87
|
+
<template #right>
|
|
88
|
+
<div class="flex items-center gap-1.5">
|
|
89
|
+
<UButton
|
|
90
|
+
icon="i-lucide-refresh-cw"
|
|
91
|
+
size="xs"
|
|
92
|
+
color="neutral"
|
|
93
|
+
variant="ghost"
|
|
94
|
+
title="Refresh settings"
|
|
95
|
+
:loading="loading"
|
|
96
|
+
@click="loadSettings"
|
|
97
|
+
/>
|
|
98
|
+
</div>
|
|
99
|
+
</template>
|
|
100
|
+
</UDashboardNavbar>
|
|
101
|
+
|
|
102
|
+
<!-- Subheader Category Tabs -->
|
|
103
|
+
<UDashboardToolbar>
|
|
104
|
+
<div class="flex items-center gap-1 bg-muted p-0.5 rounded border border-default">
|
|
105
|
+
<UButton
|
|
106
|
+
label="Edge Bindings"
|
|
107
|
+
icon="i-lucide-cpu"
|
|
108
|
+
size="xs"
|
|
109
|
+
:color="activeTab === 'bindings' ? 'primary' : 'neutral'"
|
|
110
|
+
:variant="activeTab === 'bindings' ? 'subtle' : 'ghost'"
|
|
111
|
+
@click="activeTab = 'bindings'"
|
|
112
|
+
/>
|
|
113
|
+
<UButton
|
|
114
|
+
label="Modules & Tiers"
|
|
115
|
+
icon="i-lucide-layers"
|
|
116
|
+
size="xs"
|
|
117
|
+
:color="activeTab === 'modules' ? 'primary' : 'neutral'"
|
|
118
|
+
:variant="activeTab === 'modules' ? 'subtle' : 'ghost'"
|
|
119
|
+
@click="activeTab = 'modules'"
|
|
120
|
+
/>
|
|
121
|
+
<UButton
|
|
122
|
+
label="Dev Sandbox"
|
|
123
|
+
icon="i-lucide-flask-conical"
|
|
124
|
+
size="xs"
|
|
125
|
+
:color="activeTab === 'sandbox' ? 'primary' : 'neutral'"
|
|
126
|
+
:variant="activeTab === 'sandbox' ? 'subtle' : 'ghost'"
|
|
127
|
+
@click="activeTab = 'sandbox'"
|
|
128
|
+
>
|
|
129
|
+
<template #trailing>
|
|
130
|
+
<UBadge
|
|
131
|
+
size="xs"
|
|
132
|
+
:color="activeTab === 'sandbox' ? 'primary' : 'neutral'"
|
|
133
|
+
variant="subtle"
|
|
134
|
+
>
|
|
135
|
+
Mock
|
|
136
|
+
</UBadge>
|
|
137
|
+
</template>
|
|
138
|
+
</UButton>
|
|
139
|
+
<UButton
|
|
140
|
+
label="Security & Gateway"
|
|
141
|
+
icon="i-lucide-shield-check"
|
|
142
|
+
size="xs"
|
|
143
|
+
:color="activeTab === 'security' ? 'primary' : 'neutral'"
|
|
144
|
+
:variant="activeTab === 'security' ? 'subtle' : 'ghost'"
|
|
145
|
+
@click="activeTab = 'security'"
|
|
146
|
+
/>
|
|
147
|
+
</div>
|
|
148
|
+
</UDashboardToolbar>
|
|
149
|
+
</template>
|
|
150
|
+
|
|
151
|
+
<template #body>
|
|
152
|
+
<!-- Success Toast / Notification Banner -->
|
|
153
|
+
<div
|
|
154
|
+
v-if="resetSuccessMessage"
|
|
155
|
+
class="bg-success/10 border border-success/30 text-success rounded-lg p-3 text-xs flex items-center justify-between mb-4"
|
|
156
|
+
>
|
|
157
|
+
<div class="flex items-center gap-2">
|
|
158
|
+
<UIcon name="i-lucide-check-circle" class="w-4 h-4 shrink-0" />
|
|
159
|
+
<span>{{ resetSuccessMessage }}</span>
|
|
160
|
+
</div>
|
|
161
|
+
<UButton color="success" variant="ghost" size="xs" @click="resetSuccessMessage = ''">
|
|
162
|
+
Dismiss
|
|
163
|
+
</UButton>
|
|
164
|
+
</div>
|
|
165
|
+
|
|
166
|
+
<!-- Loading Skeleton State -->
|
|
167
|
+
<div v-if="loading" class="space-y-6">
|
|
168
|
+
<div class="grid grid-cols-1 md:grid-cols-4 gap-4">
|
|
169
|
+
<div
|
|
170
|
+
v-for="i in 4"
|
|
171
|
+
:key="i"
|
|
172
|
+
class="bg-elevated/40 border border-default rounded-xl p-4 h-24 animate-pulse flex flex-col justify-between"
|
|
173
|
+
>
|
|
174
|
+
<div class="h-3 w-1/2 bg-muted rounded"></div>
|
|
175
|
+
<div class="h-6 w-3/4 bg-muted rounded"></div>
|
|
176
|
+
</div>
|
|
177
|
+
</div>
|
|
178
|
+
<div class="border border-default rounded-xl p-6 h-64 bg-elevated/40 animate-pulse"></div>
|
|
179
|
+
</div>
|
|
180
|
+
|
|
181
|
+
<div v-else class="space-y-6">
|
|
182
|
+
<!-- ── System Overview KPI Cards ──────────────────────────────── -->
|
|
183
|
+
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3.5">
|
|
184
|
+
<div
|
|
185
|
+
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between shadow-xs"
|
|
186
|
+
>
|
|
187
|
+
<div class="flex items-center justify-between text-muted text-xs">
|
|
188
|
+
<span>Environment</span>
|
|
189
|
+
<UIcon name="i-lucide-globe" class="w-4 h-4 text-primary" />
|
|
190
|
+
</div>
|
|
191
|
+
<div class="mt-2 flex items-center gap-2">
|
|
192
|
+
<span class="text-base font-bold text-highlighted capitalize">{{
|
|
193
|
+
system.environment
|
|
194
|
+
}}</span>
|
|
195
|
+
<UBadge :color="system.devMode ? 'warning' : 'success'" variant="subtle" size="xs">
|
|
196
|
+
{{ system.devMode ? "Dev Mode" : "Production" }}
|
|
197
|
+
</UBadge>
|
|
198
|
+
</div>
|
|
199
|
+
<div class="text-[11px] text-muted mt-1 font-mono">Node {{ system.nodeVersion }}</div>
|
|
200
|
+
</div>
|
|
201
|
+
|
|
202
|
+
<div
|
|
203
|
+
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between shadow-xs"
|
|
204
|
+
>
|
|
205
|
+
<div class="flex items-center justify-between text-muted text-xs">
|
|
206
|
+
<span>Runtime Engine</span>
|
|
207
|
+
<UIcon name="i-lucide-server" class="w-4 h-4 text-primary" />
|
|
208
|
+
</div>
|
|
209
|
+
<div class="mt-2 text-base font-bold text-highlighted">Cloudflare Edge</div>
|
|
210
|
+
<div class="text-[11px] text-muted mt-1 font-mono truncate">Nuxt 5 + Nitro Engine</div>
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
<div
|
|
214
|
+
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between shadow-xs"
|
|
215
|
+
>
|
|
216
|
+
<div class="flex items-center justify-between text-muted text-xs">
|
|
217
|
+
<span>Framework Version</span>
|
|
218
|
+
<UIcon name="i-lucide-tag" class="w-4 h-4 text-primary" />
|
|
219
|
+
</div>
|
|
220
|
+
<div class="mt-2 text-base font-bold text-highlighted font-mono">
|
|
221
|
+
v{{ system.version }}
|
|
222
|
+
</div>
|
|
223
|
+
<div class="text-[11px] text-muted mt-1">@qarpeo/core</div>
|
|
224
|
+
</div>
|
|
225
|
+
|
|
226
|
+
<div
|
|
227
|
+
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between shadow-xs"
|
|
228
|
+
>
|
|
229
|
+
<div class="flex items-center justify-between text-muted text-xs">
|
|
230
|
+
<span>Dev Mock Sandbox</span>
|
|
231
|
+
<UIcon name="i-lucide-flask-conical" class="w-4 h-4 text-primary" />
|
|
232
|
+
</div>
|
|
233
|
+
<div class="mt-2 flex items-center gap-2">
|
|
234
|
+
<span class="text-base font-bold text-highlighted">
|
|
235
|
+
{{ devSandbox.kvItems }} KV / {{ devSandbox.blobFiles }} Blob
|
|
236
|
+
</span>
|
|
237
|
+
</div>
|
|
238
|
+
<div class="text-[11px] text-muted mt-1">In-Memory Active</div>
|
|
239
|
+
</div>
|
|
240
|
+
</div>
|
|
241
|
+
|
|
242
|
+
<!-- ── TAB 1: EDGE BINDINGS ───────────────────────────────────── -->
|
|
243
|
+
<div v-if="activeTab === 'bindings'" class="space-y-4">
|
|
244
|
+
<div class="flex items-center justify-between">
|
|
245
|
+
<div>
|
|
246
|
+
<h3 class="text-sm font-bold text-highlighted">Cloudflare Edge Bindings</h3>
|
|
247
|
+
<p class="text-xs text-muted">
|
|
248
|
+
Runtime infrastructure bindings attached to Cloudflare Workers and Nitro context.
|
|
249
|
+
</p>
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
|
|
253
|
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3.5">
|
|
254
|
+
<div
|
|
255
|
+
v-for="(binding, key) in bindings"
|
|
256
|
+
:key="key"
|
|
257
|
+
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between space-y-3"
|
|
258
|
+
>
|
|
259
|
+
<div class="flex items-start justify-between">
|
|
260
|
+
<div class="flex items-center gap-2.5">
|
|
261
|
+
<div
|
|
262
|
+
class="w-8 h-8 rounded-lg bg-primary/10 border border-primary/20 flex items-center justify-center text-primary shrink-0"
|
|
263
|
+
>
|
|
264
|
+
<UIcon
|
|
265
|
+
:name="
|
|
266
|
+
key === 'db'
|
|
267
|
+
? 'i-lucide-database'
|
|
268
|
+
: key === 'kv'
|
|
269
|
+
? 'i-lucide-zap'
|
|
270
|
+
: key === 'blob'
|
|
271
|
+
? 'i-lucide-box'
|
|
272
|
+
: key === 'agents'
|
|
273
|
+
? 'i-lucide-bot'
|
|
274
|
+
: key === 'analytics'
|
|
275
|
+
? 'i-lucide-bar-chart'
|
|
276
|
+
: 'i-lucide-cpu'
|
|
277
|
+
"
|
|
278
|
+
class="w-4 h-4"
|
|
279
|
+
/>
|
|
280
|
+
</div>
|
|
281
|
+
<div>
|
|
282
|
+
<div class="text-xs font-bold text-highlighted uppercase tracking-wide">
|
|
283
|
+
{{ key }}
|
|
284
|
+
</div>
|
|
285
|
+
<div class="text-[11px] text-muted">{{ binding.type }}</div>
|
|
286
|
+
</div>
|
|
287
|
+
</div>
|
|
288
|
+
|
|
289
|
+
<UBadge size="xs" :color="binding.enabled ? 'success' : 'neutral'" variant="subtle">
|
|
290
|
+
{{ binding.enabled ? "Configured" : "Disabled" }}
|
|
291
|
+
</UBadge>
|
|
292
|
+
</div>
|
|
293
|
+
|
|
294
|
+
<div class="divide-y divide-default/50 text-xs font-mono pt-1">
|
|
295
|
+
<div class="flex justify-between py-1.5">
|
|
296
|
+
<span class="text-muted">Binding Name</span>
|
|
297
|
+
<span class="text-highlighted font-bold">{{ binding.name }}</span>
|
|
298
|
+
</div>
|
|
299
|
+
<div class="flex justify-between py-1.5">
|
|
300
|
+
<span class="text-muted">Dev Fallback</span>
|
|
301
|
+
<span class="text-default">In-Memory Mock</span>
|
|
302
|
+
</div>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
</div>
|
|
306
|
+
</div>
|
|
307
|
+
|
|
308
|
+
<!-- ── TAB 2: MODULES & TIERS ─────────────────────────────────── -->
|
|
309
|
+
<div v-else-if="activeTab === 'modules'" class="space-y-4">
|
|
310
|
+
<div>
|
|
311
|
+
<h3 class="text-sm font-bold text-highlighted">Active Framework Modules</h3>
|
|
312
|
+
<p class="text-xs text-muted">
|
|
313
|
+
Tier 1 infrastructure primitives and Tier 2 integrated business solutions.
|
|
314
|
+
</p>
|
|
315
|
+
</div>
|
|
316
|
+
|
|
317
|
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3.5">
|
|
318
|
+
<div
|
|
319
|
+
v-for="(mod, key) in modules"
|
|
320
|
+
:key="key"
|
|
321
|
+
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between space-y-2"
|
|
322
|
+
>
|
|
323
|
+
<div class="flex items-center justify-between">
|
|
324
|
+
<div class="flex items-center gap-2">
|
|
325
|
+
<UIcon name="i-lucide-check-circle" class="w-4 h-4 text-primary" />
|
|
326
|
+
<span class="text-xs font-bold text-highlighted">{{ mod.label }}</span>
|
|
327
|
+
</div>
|
|
328
|
+
<UBadge size="xs" :color="mod.enabled ? 'primary' : 'neutral'" variant="subtle">
|
|
329
|
+
{{ mod.enabled ? "Enabled" : "Optional" }}
|
|
330
|
+
</UBadge>
|
|
331
|
+
</div>
|
|
332
|
+
|
|
333
|
+
<p class="text-xs text-muted leading-relaxed">
|
|
334
|
+
{{ mod.description }}
|
|
335
|
+
</p>
|
|
336
|
+
|
|
337
|
+
<div
|
|
338
|
+
v-if="key === 'multitenant' && mod.enabled"
|
|
339
|
+
class="pt-2 text-[11px] font-mono text-muted space-y-0.5"
|
|
340
|
+
>
|
|
341
|
+
<div>
|
|
342
|
+
Root: <span class="text-highlighted">{{ mod.rootDomains?.join(", ") }}</span>
|
|
343
|
+
</div>
|
|
344
|
+
<div>
|
|
345
|
+
Custom Domains:
|
|
346
|
+
<span class="text-highlighted">{{ mod.customDomains ? "Active" : "Off" }}</span>
|
|
347
|
+
</div>
|
|
348
|
+
</div>
|
|
349
|
+
</div>
|
|
350
|
+
</div>
|
|
351
|
+
</div>
|
|
352
|
+
|
|
353
|
+
<!-- ── TAB 3: DEV SANDBOX MANAGEMENT ──────────────────────────── -->
|
|
354
|
+
<div v-else-if="activeTab === 'sandbox'" class="space-y-4">
|
|
355
|
+
<div class="flex items-center justify-between">
|
|
356
|
+
<div>
|
|
357
|
+
<h3 class="text-sm font-bold text-highlighted">Development Mock Sandbox</h3>
|
|
358
|
+
<p class="text-xs text-muted">
|
|
359
|
+
Manage and reset temporary in-memory mock data across DevTools panels.
|
|
360
|
+
</p>
|
|
361
|
+
</div>
|
|
362
|
+
<UButton
|
|
363
|
+
label="Reset All Sandbox Data"
|
|
364
|
+
icon="i-lucide-rotate-ccw"
|
|
365
|
+
color="error"
|
|
366
|
+
size="xs"
|
|
367
|
+
variant="subtle"
|
|
368
|
+
@click="openResetModal('all')"
|
|
369
|
+
/>
|
|
370
|
+
</div>
|
|
371
|
+
|
|
372
|
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
373
|
+
<!-- KV Sandbox Card -->
|
|
374
|
+
<div
|
|
375
|
+
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between space-y-4"
|
|
376
|
+
>
|
|
377
|
+
<div class="flex items-start justify-between">
|
|
378
|
+
<div class="flex items-center gap-2">
|
|
379
|
+
<UIcon name="i-lucide-zap" class="w-5 h-5 text-primary" />
|
|
380
|
+
<div>
|
|
381
|
+
<div class="text-xs font-bold text-highlighted">KV Store Sandbox</div>
|
|
382
|
+
<div class="text-[11px] text-muted">
|
|
383
|
+
{{ devSandbox.kvItems }} keys currently stored
|
|
384
|
+
</div>
|
|
385
|
+
</div>
|
|
386
|
+
</div>
|
|
387
|
+
<UBadge size="xs" color="neutral" variant="subtle">In-Memory</UBadge>
|
|
388
|
+
</div>
|
|
389
|
+
<p class="text-xs text-muted">
|
|
390
|
+
Stores mock session tokens, cache tags, rate limit windows, and domain mapping
|
|
391
|
+
records.
|
|
392
|
+
</p>
|
|
393
|
+
<div class="flex justify-end pt-2">
|
|
394
|
+
<UButton
|
|
395
|
+
label="Reset KV Store"
|
|
396
|
+
size="xs"
|
|
397
|
+
color="neutral"
|
|
398
|
+
variant="subtle"
|
|
399
|
+
icon="i-lucide-rotate-ccw"
|
|
400
|
+
@click="openResetModal('kv')"
|
|
401
|
+
/>
|
|
402
|
+
</div>
|
|
403
|
+
</div>
|
|
404
|
+
|
|
405
|
+
<!-- Blob Sandbox Card -->
|
|
406
|
+
<div
|
|
407
|
+
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between space-y-4"
|
|
408
|
+
>
|
|
409
|
+
<div class="flex items-start justify-between">
|
|
410
|
+
<div class="flex items-center gap-2">
|
|
411
|
+
<UIcon name="i-lucide-box" class="w-5 h-5 text-primary" />
|
|
412
|
+
<div>
|
|
413
|
+
<div class="text-xs font-bold text-highlighted">Blob / R2 Sandbox</div>
|
|
414
|
+
<div class="text-[11px] text-muted">
|
|
415
|
+
{{ devSandbox.blobFiles }} files uploaded
|
|
416
|
+
</div>
|
|
417
|
+
</div>
|
|
418
|
+
</div>
|
|
419
|
+
<UBadge size="xs" color="neutral" variant="subtle">In-Memory</UBadge>
|
|
420
|
+
</div>
|
|
421
|
+
<p class="text-xs text-muted">
|
|
422
|
+
Stores uploaded mock avatars, documents, and media buffers with live serve
|
|
423
|
+
endpoints.
|
|
424
|
+
</p>
|
|
425
|
+
<div class="flex justify-end pt-2">
|
|
426
|
+
<UButton
|
|
427
|
+
label="Reset Blob Store"
|
|
428
|
+
size="xs"
|
|
429
|
+
color="neutral"
|
|
430
|
+
variant="subtle"
|
|
431
|
+
icon="i-lucide-rotate-ccw"
|
|
432
|
+
@click="openResetModal('blob')"
|
|
433
|
+
/>
|
|
434
|
+
</div>
|
|
435
|
+
</div>
|
|
436
|
+
|
|
437
|
+
<!-- Tenants Sandbox Card -->
|
|
438
|
+
<div
|
|
439
|
+
class="bg-elevated/40 border border-default rounded-xl p-4 flex flex-col justify-between space-y-4"
|
|
440
|
+
>
|
|
441
|
+
<div class="flex items-start justify-between">
|
|
442
|
+
<div class="flex items-center gap-2">
|
|
443
|
+
<UIcon name="i-lucide-globe" class="w-5 h-5 text-primary" />
|
|
444
|
+
<div>
|
|
445
|
+
<div class="text-xs font-bold text-highlighted">Tenants & Domains</div>
|
|
446
|
+
<div class="text-[11px] text-muted">
|
|
447
|
+
{{ devSandbox.tenantsCount }} organizations registered
|
|
448
|
+
</div>
|
|
449
|
+
</div>
|
|
450
|
+
</div>
|
|
451
|
+
<UBadge size="xs" color="neutral" variant="subtle">In-Memory</UBadge>
|
|
452
|
+
</div>
|
|
453
|
+
<p class="text-xs text-muted">
|
|
454
|
+
Simulates multi-tenant organization directories, subdomains, and CNAME custom
|
|
455
|
+
hostnames.
|
|
456
|
+
</p>
|
|
457
|
+
<div class="flex justify-end pt-2">
|
|
458
|
+
<UButton
|
|
459
|
+
label="Manage Tenants"
|
|
460
|
+
size="xs"
|
|
461
|
+
color="neutral"
|
|
462
|
+
variant="subtle"
|
|
463
|
+
to="/devtools/domains"
|
|
464
|
+
/>
|
|
465
|
+
</div>
|
|
466
|
+
</div>
|
|
467
|
+
</div>
|
|
468
|
+
</div>
|
|
469
|
+
|
|
470
|
+
<!-- ── TAB 4: SECURITY GATEWAY ────────────────────────────────── -->
|
|
471
|
+
<div v-else-if="activeTab === 'security'" class="space-y-4">
|
|
472
|
+
<div>
|
|
473
|
+
<h3 class="text-sm font-bold text-highlighted">DevTools Security Gateway</h3>
|
|
474
|
+
<p class="text-xs text-muted">
|
|
475
|
+
Access control policies safeguarding DevTools endpoints from unauthorized external
|
|
476
|
+
access.
|
|
477
|
+
</p>
|
|
478
|
+
</div>
|
|
479
|
+
|
|
480
|
+
<div class="bg-elevated/40 border border-default rounded-xl p-5 space-y-4 max-w-2xl">
|
|
481
|
+
<div class="divide-y divide-default text-xs">
|
|
482
|
+
<div class="flex items-center justify-between py-3">
|
|
483
|
+
<div>
|
|
484
|
+
<div class="font-bold text-highlighted">Authentication Required</div>
|
|
485
|
+
<div class="text-muted text-[11px]">
|
|
486
|
+
Enforce Bearer token verification on /_qarpeo/api/* endpoints
|
|
487
|
+
</div>
|
|
488
|
+
</div>
|
|
489
|
+
<UBadge :color="security.tokenRequired ? 'warning' : 'success'" variant="subtle">
|
|
490
|
+
{{ security.tokenRequired ? "Token Enforced" : "Local Dev Open" }}
|
|
491
|
+
</UBadge>
|
|
492
|
+
</div>
|
|
493
|
+
|
|
494
|
+
<div class="flex items-center justify-between py-3">
|
|
495
|
+
<div>
|
|
496
|
+
<div class="font-bold text-highlighted">Allowed Local IP Addresses</div>
|
|
497
|
+
<div class="text-muted text-[11px]">
|
|
498
|
+
Whitelisted loopback addresses for embedded DevTools dock
|
|
499
|
+
</div>
|
|
500
|
+
</div>
|
|
501
|
+
<div class="font-mono text-[11px] text-default">
|
|
502
|
+
{{ security.allowedIps?.join(", ") || "127.0.0.1, ::1" }}
|
|
503
|
+
</div>
|
|
504
|
+
</div>
|
|
505
|
+
|
|
506
|
+
<div class="flex items-center justify-between py-3">
|
|
507
|
+
<div>
|
|
508
|
+
<div class="font-bold text-highlighted">Nuxt DevTools Dock Path</div>
|
|
509
|
+
<div class="text-muted text-[11px]">
|
|
510
|
+
Embedded iframe mount path inside Nuxt DevTools
|
|
511
|
+
</div>
|
|
512
|
+
</div>
|
|
513
|
+
<div class="font-mono text-[11px] text-primary">
|
|
514
|
+
{{ security.dockRoute || "/_qarpeo/devtools" }}
|
|
515
|
+
</div>
|
|
516
|
+
</div>
|
|
517
|
+
</div>
|
|
518
|
+
</div>
|
|
519
|
+
</div>
|
|
520
|
+
</div>
|
|
521
|
+
</template>
|
|
522
|
+
</UDashboardPanel>
|
|
523
|
+
|
|
524
|
+
<!-- Reset Dev Data Confirmation Modal -->
|
|
525
|
+
<UModal v-model:open="showResetModal" title="Reset Dev Sandbox">
|
|
526
|
+
<template #body>
|
|
527
|
+
<div class="space-y-3">
|
|
528
|
+
<p class="text-xs text-default">
|
|
529
|
+
Are you sure you want to reset
|
|
530
|
+
<span class="font-bold text-highlighted uppercase">{{ resetTarget }}</span>
|
|
531
|
+
in-memory sandbox data?
|
|
532
|
+
</p>
|
|
533
|
+
<p class="text-xs text-muted">
|
|
534
|
+
All mock items created in this development session will be erased and restored to their
|
|
535
|
+
original seed fixtures.
|
|
536
|
+
</p>
|
|
537
|
+
</div>
|
|
538
|
+
</template>
|
|
539
|
+
<template #footer>
|
|
540
|
+
<div class="flex justify-end gap-2">
|
|
541
|
+
<UButton
|
|
542
|
+
label="Cancel"
|
|
543
|
+
color="neutral"
|
|
544
|
+
variant="ghost"
|
|
545
|
+
size="xs"
|
|
546
|
+
@click="showResetModal = false"
|
|
547
|
+
/>
|
|
548
|
+
<UButton
|
|
549
|
+
label="Confirm Reset"
|
|
550
|
+
color="error"
|
|
551
|
+
size="xs"
|
|
552
|
+
icon="i-lucide-rotate-ccw"
|
|
553
|
+
:loading="resetting"
|
|
554
|
+
@click="handleResetData"
|
|
555
|
+
/>
|
|
556
|
+
</div>
|
|
557
|
+
</template>
|
|
558
|
+
</UModal>
|
|
559
|
+
</template>
|