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,350 +1,381 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { useFetch } from "nuxt/app"
|
|
3
|
-
import { computed, onMounted, ref } from "vue"
|
|
4
|
-
|
|
5
|
-
interface UserRecord {
|
|
6
|
-
id: string
|
|
7
|
-
email: string
|
|
8
|
-
name?: string
|
|
9
|
-
avatarUrl?: string
|
|
10
|
-
role?: string
|
|
11
|
-
emailVerified?: number
|
|
12
|
-
createdAt: number
|
|
13
|
-
updatedAt?: number
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
interface SessionRecord {
|
|
17
|
-
id: string
|
|
18
|
-
userId: string
|
|
19
|
-
userName?: string
|
|
20
|
-
userEmail?: string
|
|
21
|
-
clientType?: string
|
|
22
|
-
userAgent?: string
|
|
23
|
-
ipAddress?: string
|
|
24
|
-
lastActive: number
|
|
25
|
-
expiresAt: number
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const activeTab = ref<"users" | "sessions">("users")
|
|
29
|
-
const searchQuery = ref("")
|
|
30
|
-
const revokingId = ref<string | null>(null)
|
|
31
|
-
|
|
32
|
-
const {
|
|
33
|
-
data: usersData,
|
|
34
|
-
pending: usersPending,
|
|
35
|
-
refresh: refreshUsers,
|
|
36
|
-
} = useFetch<any>("/_qarpeo/api/auth/users", {
|
|
37
|
-
default: () => ({ users: [], total: 0, isDevMock: false }),
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
const {
|
|
41
|
-
data: sessionsData,
|
|
42
|
-
pending: sessionsPending,
|
|
43
|
-
refresh: refreshSessions,
|
|
44
|
-
} = useFetch<any>("/_qarpeo/api/auth/sessions", {
|
|
45
|
-
default: () => ({ sessions: [], isDevMock: false }),
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
const users = computed<UserRecord[]>(() => usersData.value?.users || [])
|
|
49
|
-
const sessions = computed<SessionRecord[]>(() => sessionsData.value?.sessions || [])
|
|
50
|
-
const isDevMock = computed(
|
|
51
|
-
|
|
52
|
-
)
|
|
53
|
-
|
|
54
|
-
const filteredUsers = computed(() => {
|
|
55
|
-
if (!searchQuery.value.trim()) return users.value
|
|
56
|
-
const q = searchQuery.value.toLowerCase()
|
|
57
|
-
return users.value.filter(
|
|
58
|
-
(u) =>
|
|
59
|
-
u.email.toLowerCase().includes(q) ||
|
|
60
|
-
(u.name && u.name.toLowerCase().includes(q)) ||
|
|
61
|
-
(u.role && u.role.toLowerCase().includes(q)),
|
|
62
|
-
)
|
|
63
|
-
})
|
|
64
|
-
|
|
65
|
-
const filteredSessions = computed(() => {
|
|
66
|
-
if (!searchQuery.value.trim()) return sessions.value
|
|
67
|
-
const q = searchQuery.value.toLowerCase()
|
|
68
|
-
return sessions.value.filter(
|
|
69
|
-
(s) =>
|
|
70
|
-
(s.userEmail && s.userEmail.toLowerCase().includes(q)) ||
|
|
71
|
-
(s.userName && s.userName.toLowerCase().includes(q)) ||
|
|
72
|
-
(s.ipAddress && s.ipAddress.includes(q)) ||
|
|
73
|
-
(s.clientType && s.clientType.toLowerCase().includes(q)),
|
|
74
|
-
)
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
const stats = computed(() => {
|
|
78
|
-
const verifiedCount = users.value.filter((u) => Boolean(u.emailVerified)).length
|
|
79
|
-
const adminCount = users.value.filter((u) => u.role === "admin").length
|
|
80
|
-
return {
|
|
81
|
-
totalUsers: users.value.length,
|
|
82
|
-
activeSessions: sessions.value.length,
|
|
83
|
-
verifiedCount,
|
|
84
|
-
adminCount,
|
|
85
|
-
}
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
function fmtDate(ts?: number) {
|
|
89
|
-
if (!ts) return "—"
|
|
90
|
-
return new Date(ts).toLocaleDateString([], {
|
|
91
|
-
year: "numeric",
|
|
92
|
-
month: "short",
|
|
93
|
-
day: "numeric",
|
|
94
|
-
hour: "2-digit",
|
|
95
|
-
minute: "2-digit",
|
|
96
|
-
})
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
function fmtRelative(ts?: number) {
|
|
100
|
-
if (!ts) return "—"
|
|
101
|
-
const diff = Date.now() - ts
|
|
102
|
-
const mins = Math.floor(diff / 60000)
|
|
103
|
-
if (mins < 1) return "Just now"
|
|
104
|
-
if (mins < 60) return `${mins}m ago`
|
|
105
|
-
const hours = Math.floor(mins / 60)
|
|
106
|
-
if (hours < 24) return `${hours}h ago`
|
|
107
|
-
return `${Math.floor(hours / 24)}d ago`
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
async function revokeSession(sessionId: string) {
|
|
111
|
-
revokingId.value = sessionId
|
|
112
|
-
try {
|
|
113
|
-
await $fetch("/_qarpeo/api/auth/revoke-session", {
|
|
114
|
-
method: "POST",
|
|
115
|
-
body: { sessionId },
|
|
116
|
-
})
|
|
117
|
-
await refreshSessions()
|
|
118
|
-
} finally {
|
|
119
|
-
revokingId.value = null
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
async function refreshAll() {
|
|
124
|
-
await Promise.all([refreshUsers(), refreshSessions()])
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
onMounted(() => {
|
|
128
|
-
refreshAll()
|
|
129
|
-
})
|
|
130
|
-
</script>
|
|
131
|
-
|
|
132
|
-
<template>
|
|
133
|
-
<UDashboardPanel id="devtools-auth">
|
|
134
|
-
<template #header>
|
|
135
|
-
<UDashboardNavbar>
|
|
136
|
-
<template #title>
|
|
137
|
-
<div class="flex items-center gap-2">
|
|
138
|
-
<UIcon name="i-lucide-users" class="w-4 h-4 text-primary" />
|
|
139
|
-
<span class="font-bold text-sm text-highlighted">Auth & Users</span>
|
|
140
|
-
<UBadge size="xs" color="primary" variant="subtle">Tier 1 Auth</UBadge>
|
|
141
|
-
<UBadge
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
</
|
|
267
|
-
<
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
<
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
<
|
|
330
|
-
|
|
331
|
-
</
|
|
332
|
-
<
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
</td>
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useFetch } from "nuxt/app"
|
|
3
|
+
import { computed, onMounted, ref } from "vue"
|
|
4
|
+
|
|
5
|
+
interface UserRecord {
|
|
6
|
+
id: string
|
|
7
|
+
email: string
|
|
8
|
+
name?: string
|
|
9
|
+
avatarUrl?: string
|
|
10
|
+
role?: string
|
|
11
|
+
emailVerified?: number
|
|
12
|
+
createdAt: number
|
|
13
|
+
updatedAt?: number
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface SessionRecord {
|
|
17
|
+
id: string
|
|
18
|
+
userId: string
|
|
19
|
+
userName?: string
|
|
20
|
+
userEmail?: string
|
|
21
|
+
clientType?: string
|
|
22
|
+
userAgent?: string
|
|
23
|
+
ipAddress?: string
|
|
24
|
+
lastActive: number
|
|
25
|
+
expiresAt: number
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const activeTab = ref<"users" | "sessions">("users")
|
|
29
|
+
const searchQuery = ref("")
|
|
30
|
+
const revokingId = ref<string | null>(null)
|
|
31
|
+
|
|
32
|
+
const {
|
|
33
|
+
data: usersData,
|
|
34
|
+
pending: usersPending,
|
|
35
|
+
refresh: refreshUsers,
|
|
36
|
+
} = useFetch<any>("/_qarpeo/api/auth/users", {
|
|
37
|
+
default: () => ({ users: [], total: 0, isDevMock: false }),
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
const {
|
|
41
|
+
data: sessionsData,
|
|
42
|
+
pending: sessionsPending,
|
|
43
|
+
refresh: refreshSessions,
|
|
44
|
+
} = useFetch<any>("/_qarpeo/api/auth/sessions", {
|
|
45
|
+
default: () => ({ sessions: [], isDevMock: false }),
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
const users = computed<UserRecord[]>(() => usersData.value?.users || [])
|
|
49
|
+
const sessions = computed<SessionRecord[]>(() => sessionsData.value?.sessions || [])
|
|
50
|
+
const isDevMock = computed(() =>
|
|
51
|
+
Boolean(usersData.value?.isDevMock || sessionsData.value?.isDevMock),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
const filteredUsers = computed(() => {
|
|
55
|
+
if (!searchQuery.value.trim()) return users.value
|
|
56
|
+
const q = searchQuery.value.toLowerCase()
|
|
57
|
+
return users.value.filter(
|
|
58
|
+
(u) =>
|
|
59
|
+
u.email.toLowerCase().includes(q) ||
|
|
60
|
+
(u.name && u.name.toLowerCase().includes(q)) ||
|
|
61
|
+
(u.role && u.role.toLowerCase().includes(q)),
|
|
62
|
+
)
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
const filteredSessions = computed(() => {
|
|
66
|
+
if (!searchQuery.value.trim()) return sessions.value
|
|
67
|
+
const q = searchQuery.value.toLowerCase()
|
|
68
|
+
return sessions.value.filter(
|
|
69
|
+
(s) =>
|
|
70
|
+
(s.userEmail && s.userEmail.toLowerCase().includes(q)) ||
|
|
71
|
+
(s.userName && s.userName.toLowerCase().includes(q)) ||
|
|
72
|
+
(s.ipAddress && s.ipAddress.includes(q)) ||
|
|
73
|
+
(s.clientType && s.clientType.toLowerCase().includes(q)),
|
|
74
|
+
)
|
|
75
|
+
})
|
|
76
|
+
|
|
77
|
+
const stats = computed(() => {
|
|
78
|
+
const verifiedCount = users.value.filter((u) => Boolean(u.emailVerified)).length
|
|
79
|
+
const adminCount = users.value.filter((u) => u.role === "admin").length
|
|
80
|
+
return {
|
|
81
|
+
totalUsers: users.value.length,
|
|
82
|
+
activeSessions: sessions.value.length,
|
|
83
|
+
verifiedCount,
|
|
84
|
+
adminCount,
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
|
|
88
|
+
function fmtDate(ts?: number) {
|
|
89
|
+
if (!ts) return "—"
|
|
90
|
+
return new Date(ts).toLocaleDateString([], {
|
|
91
|
+
year: "numeric",
|
|
92
|
+
month: "short",
|
|
93
|
+
day: "numeric",
|
|
94
|
+
hour: "2-digit",
|
|
95
|
+
minute: "2-digit",
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function fmtRelative(ts?: number) {
|
|
100
|
+
if (!ts) return "—"
|
|
101
|
+
const diff = Date.now() - ts
|
|
102
|
+
const mins = Math.floor(diff / 60000)
|
|
103
|
+
if (mins < 1) return "Just now"
|
|
104
|
+
if (mins < 60) return `${mins}m ago`
|
|
105
|
+
const hours = Math.floor(mins / 60)
|
|
106
|
+
if (hours < 24) return `${hours}h ago`
|
|
107
|
+
return `${Math.floor(hours / 24)}d ago`
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
async function revokeSession(sessionId: string) {
|
|
111
|
+
revokingId.value = sessionId
|
|
112
|
+
try {
|
|
113
|
+
await $fetch("/_qarpeo/api/auth/revoke-session", {
|
|
114
|
+
method: "POST",
|
|
115
|
+
body: { sessionId },
|
|
116
|
+
})
|
|
117
|
+
await refreshSessions()
|
|
118
|
+
} finally {
|
|
119
|
+
revokingId.value = null
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
async function refreshAll() {
|
|
124
|
+
await Promise.all([refreshUsers(), refreshSessions()])
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
onMounted(() => {
|
|
128
|
+
refreshAll()
|
|
129
|
+
})
|
|
130
|
+
</script>
|
|
131
|
+
|
|
132
|
+
<template>
|
|
133
|
+
<UDashboardPanel id="devtools-auth">
|
|
134
|
+
<template #header>
|
|
135
|
+
<UDashboardNavbar>
|
|
136
|
+
<template #title>
|
|
137
|
+
<div class="flex items-center gap-2">
|
|
138
|
+
<UIcon name="i-lucide-users" class="w-4 h-4 text-primary" />
|
|
139
|
+
<span class="font-bold text-sm text-highlighted">Auth & Users</span>
|
|
140
|
+
<UBadge size="xs" color="primary" variant="subtle">Tier 1 Auth</UBadge>
|
|
141
|
+
<UBadge
|
|
142
|
+
v-if="isDevMock"
|
|
143
|
+
size="xs"
|
|
144
|
+
color="warning"
|
|
145
|
+
variant="subtle"
|
|
146
|
+
icon="i-lucide-flask-conical"
|
|
147
|
+
>
|
|
148
|
+
Preview Mode
|
|
149
|
+
</UBadge>
|
|
150
|
+
</div>
|
|
151
|
+
</template>
|
|
152
|
+
|
|
153
|
+
<template #right>
|
|
154
|
+
<div class="flex items-center gap-2">
|
|
155
|
+
<UButton
|
|
156
|
+
icon="i-lucide-refresh-cw"
|
|
157
|
+
size="xs"
|
|
158
|
+
color="neutral"
|
|
159
|
+
variant="ghost"
|
|
160
|
+
title="Refresh auth data"
|
|
161
|
+
:loading="usersPending || sessionsPending"
|
|
162
|
+
@click="refreshAll"
|
|
163
|
+
/>
|
|
164
|
+
</div>
|
|
165
|
+
</template>
|
|
166
|
+
</UDashboardNavbar>
|
|
167
|
+
|
|
168
|
+
<!-- Toolbar with KPI cards and Search -->
|
|
169
|
+
<UDashboardToolbar>
|
|
170
|
+
<div class="flex flex-col gap-3 w-full py-2">
|
|
171
|
+
<!-- KPI Summary Grid -->
|
|
172
|
+
<div class="grid grid-cols-2 sm:grid-cols-4 gap-2 w-full">
|
|
173
|
+
<div class="p-2.5 rounded-lg border border-default bg-card">
|
|
174
|
+
<span class="text-xs text-muted">Total Users</span>
|
|
175
|
+
<p class="text-lg font-bold text-highlighted mt-0.5">{{ stats.totalUsers }}</p>
|
|
176
|
+
</div>
|
|
177
|
+
<div class="p-2.5 rounded-lg border border-default bg-card">
|
|
178
|
+
<span class="text-xs text-muted">Active Sessions</span>
|
|
179
|
+
<p class="text-lg font-bold text-highlighted mt-0.5">{{ stats.activeSessions }}</p>
|
|
180
|
+
</div>
|
|
181
|
+
<div class="p-2.5 rounded-lg border border-default bg-card">
|
|
182
|
+
<span class="text-xs text-muted">Verified Emails</span>
|
|
183
|
+
<p class="text-lg font-bold text-highlighted mt-0.5">{{ stats.verifiedCount }}</p>
|
|
184
|
+
</div>
|
|
185
|
+
<div class="p-2.5 rounded-lg border border-default bg-card">
|
|
186
|
+
<span class="text-xs text-muted">Administrators</span>
|
|
187
|
+
<p class="text-lg font-bold text-highlighted mt-0.5">{{ stats.adminCount }}</p>
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
<!-- Controls: Tabs + Search -->
|
|
192
|
+
<div
|
|
193
|
+
class="flex items-center justify-between flex-wrap gap-2 pt-1 border-t border-default"
|
|
194
|
+
>
|
|
195
|
+
<div class="flex items-center gap-1 bg-muted p-0.5 rounded border border-default">
|
|
196
|
+
<UButton
|
|
197
|
+
label="Users"
|
|
198
|
+
icon="i-lucide-user"
|
|
199
|
+
size="xs"
|
|
200
|
+
:color="activeTab === 'users' ? 'primary' : 'neutral'"
|
|
201
|
+
:variant="activeTab === 'users' ? 'subtle' : 'ghost'"
|
|
202
|
+
@click="activeTab = 'users'"
|
|
203
|
+
>
|
|
204
|
+
<template #trailing>
|
|
205
|
+
<UBadge
|
|
206
|
+
size="xs"
|
|
207
|
+
:color="activeTab === 'users' ? 'primary' : 'neutral'"
|
|
208
|
+
variant="subtle"
|
|
209
|
+
>
|
|
210
|
+
{{ users.length }}
|
|
211
|
+
</UBadge>
|
|
212
|
+
</template>
|
|
213
|
+
</UButton>
|
|
214
|
+
|
|
215
|
+
<UButton
|
|
216
|
+
label="Active Sessions"
|
|
217
|
+
icon="i-lucide-shield-check"
|
|
218
|
+
size="xs"
|
|
219
|
+
:color="activeTab === 'sessions' ? 'primary' : 'neutral'"
|
|
220
|
+
:variant="activeTab === 'sessions' ? 'subtle' : 'ghost'"
|
|
221
|
+
@click="activeTab = 'sessions'"
|
|
222
|
+
>
|
|
223
|
+
<template #trailing>
|
|
224
|
+
<UBadge
|
|
225
|
+
size="xs"
|
|
226
|
+
:color="activeTab === 'sessions' ? 'primary' : 'neutral'"
|
|
227
|
+
variant="subtle"
|
|
228
|
+
>
|
|
229
|
+
{{ sessions.length }}
|
|
230
|
+
</UBadge>
|
|
231
|
+
</template>
|
|
232
|
+
</UButton>
|
|
233
|
+
</div>
|
|
234
|
+
|
|
235
|
+
<div class="w-full sm:w-64">
|
|
236
|
+
<UInput
|
|
237
|
+
v-model="searchQuery"
|
|
238
|
+
icon="i-lucide-search"
|
|
239
|
+
size="xs"
|
|
240
|
+
placeholder="Filter by name, email, IP..."
|
|
241
|
+
class="w-full"
|
|
242
|
+
/>
|
|
243
|
+
</div>
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
</UDashboardToolbar>
|
|
247
|
+
</template>
|
|
248
|
+
|
|
249
|
+
<!-- Main Content Area -->
|
|
250
|
+
<div class="p-4 overflow-x-auto">
|
|
251
|
+
<!-- ─── USERS TAB ─────────────────────────────────────────────────────────── -->
|
|
252
|
+
<div v-if="activeTab === 'users'">
|
|
253
|
+
<div v-if="filteredUsers.length === 0" class="text-center py-12 text-muted">
|
|
254
|
+
<UIcon name="i-lucide-user-x" class="w-8 h-8 mx-auto mb-2 opacity-50" />
|
|
255
|
+
<p class="text-sm font-medium">No users found</p>
|
|
256
|
+
<p class="text-xs text-muted mt-1">
|
|
257
|
+
Users register via OAuth, WebAuthn Passkeys, OTP, or Magic Links.
|
|
258
|
+
</p>
|
|
259
|
+
</div>
|
|
260
|
+
|
|
261
|
+
<div v-else class="border border-default rounded-lg overflow-hidden bg-card">
|
|
262
|
+
<table class="w-full text-left text-xs">
|
|
263
|
+
<thead class="bg-muted border-b border-default text-muted font-medium">
|
|
264
|
+
<tr>
|
|
265
|
+
<th class="p-3">User</th>
|
|
266
|
+
<th class="p-3">Role</th>
|
|
267
|
+
<th class="p-3">Status</th>
|
|
268
|
+
<th class="p-3">Registered</th>
|
|
269
|
+
<th class="p-3">ID</th>
|
|
270
|
+
</tr>
|
|
271
|
+
</thead>
|
|
272
|
+
<tbody class="divide-y divide-default">
|
|
273
|
+
<tr v-for="u in filteredUsers" :key="u.id" class="hover:bg-muted/50 transition">
|
|
274
|
+
<td class="p-3">
|
|
275
|
+
<div class="flex items-center gap-2.5">
|
|
276
|
+
<div
|
|
277
|
+
class="w-7 h-7 rounded-full bg-primary/10 border border-primary/20 flex items-center justify-center font-bold text-primary text-xs shrink-0"
|
|
278
|
+
>
|
|
279
|
+
{{ (u.name || u.email).charAt(0).toUpperCase() }}
|
|
280
|
+
</div>
|
|
281
|
+
<div>
|
|
282
|
+
<p class="font-medium text-highlighted">{{ u.name || "—" }}</p>
|
|
283
|
+
<p class="text-[11px] text-muted font-mono">{{ u.email }}</p>
|
|
284
|
+
</div>
|
|
285
|
+
</div>
|
|
286
|
+
</td>
|
|
287
|
+
<td class="p-3">
|
|
288
|
+
<UBadge
|
|
289
|
+
size="xs"
|
|
290
|
+
:color="u.role === 'admin' ? 'primary' : 'neutral'"
|
|
291
|
+
variant="subtle"
|
|
292
|
+
>
|
|
293
|
+
{{ u.role || "user" }}
|
|
294
|
+
</UBadge>
|
|
295
|
+
</td>
|
|
296
|
+
<td class="p-3">
|
|
297
|
+
<UBadge
|
|
298
|
+
size="xs"
|
|
299
|
+
:color="u.emailVerified ? 'success' : 'neutral'"
|
|
300
|
+
variant="subtle"
|
|
301
|
+
>
|
|
302
|
+
{{ u.emailVerified ? "Verified" : "Unverified" }}
|
|
303
|
+
</UBadge>
|
|
304
|
+
</td>
|
|
305
|
+
<td class="p-3 text-muted">
|
|
306
|
+
{{ fmtDate(u.createdAt) }}
|
|
307
|
+
</td>
|
|
308
|
+
<td class="p-3 font-mono text-[11px] text-muted">
|
|
309
|
+
{{ u.id }}
|
|
310
|
+
</td>
|
|
311
|
+
</tr>
|
|
312
|
+
</tbody>
|
|
313
|
+
</table>
|
|
314
|
+
</div>
|
|
315
|
+
</div>
|
|
316
|
+
|
|
317
|
+
<!-- ─── SESSIONS TAB ──────────────────────────────────────────────────────── -->
|
|
318
|
+
<div v-else-if="activeTab === 'sessions'">
|
|
319
|
+
<div v-if="filteredSessions.length === 0" class="text-center py-12 text-muted">
|
|
320
|
+
<UIcon name="i-lucide-shield-alert" class="w-8 h-8 mx-auto mb-2 opacity-50" />
|
|
321
|
+
<p class="text-sm font-medium">No active sessions</p>
|
|
322
|
+
<p class="text-xs text-muted mt-1">Sessions are tracked across D1 and KV.</p>
|
|
323
|
+
</div>
|
|
324
|
+
|
|
325
|
+
<div v-else class="border border-default rounded-lg overflow-hidden bg-card">
|
|
326
|
+
<table class="w-full text-left text-xs">
|
|
327
|
+
<thead class="bg-muted border-b border-default text-muted font-medium">
|
|
328
|
+
<tr>
|
|
329
|
+
<th class="p-3">User</th>
|
|
330
|
+
<th class="p-3">Client</th>
|
|
331
|
+
<th class="p-3">IP Address</th>
|
|
332
|
+
<th class="p-3">Last Active</th>
|
|
333
|
+
<th class="p-3">Expires</th>
|
|
334
|
+
<th class="p-3 text-right">Actions</th>
|
|
335
|
+
</tr>
|
|
336
|
+
</thead>
|
|
337
|
+
<tbody class="divide-y divide-default">
|
|
338
|
+
<tr v-for="s in filteredSessions" :key="s.id" class="hover:bg-muted/50 transition">
|
|
339
|
+
<td class="p-3">
|
|
340
|
+
<p class="font-medium text-highlighted">{{ s.userName || "Active User" }}</p>
|
|
341
|
+
<p class="text-[11px] text-muted font-mono">{{ s.userEmail || s.userId }}</p>
|
|
342
|
+
</td>
|
|
343
|
+
<td class="p-3">
|
|
344
|
+
<UBadge size="xs" color="neutral" variant="subtle">
|
|
345
|
+
{{ s.clientType || "web" }}
|
|
346
|
+
</UBadge>
|
|
347
|
+
<p
|
|
348
|
+
class="text-[10px] text-muted truncate max-w-[200px] mt-0.5"
|
|
349
|
+
:title="s.userAgent"
|
|
350
|
+
>
|
|
351
|
+
{{ s.userAgent || "—" }}
|
|
352
|
+
</p>
|
|
353
|
+
</td>
|
|
354
|
+
<td class="p-3 font-mono text-[11px]">
|
|
355
|
+
{{ s.ipAddress || "—" }}
|
|
356
|
+
</td>
|
|
357
|
+
<td class="p-3 text-muted">
|
|
358
|
+
{{ fmtRelative(s.lastActive) }}
|
|
359
|
+
</td>
|
|
360
|
+
<td class="p-3 text-muted">
|
|
361
|
+
{{ fmtDate(s.expiresAt) }}
|
|
362
|
+
</td>
|
|
363
|
+
<td class="p-3 text-right">
|
|
364
|
+
<UButton
|
|
365
|
+
size="xs"
|
|
366
|
+
color="error"
|
|
367
|
+
variant="ghost"
|
|
368
|
+
icon="i-lucide-log-out"
|
|
369
|
+
label="Revoke"
|
|
370
|
+
:loading="revokingId === s.id"
|
|
371
|
+
@click="revokeSession(s.id)"
|
|
372
|
+
/>
|
|
373
|
+
</td>
|
|
374
|
+
</tr>
|
|
375
|
+
</tbody>
|
|
376
|
+
</table>
|
|
377
|
+
</div>
|
|
378
|
+
</div>
|
|
379
|
+
</div>
|
|
380
|
+
</UDashboardPanel>
|
|
381
|
+
</template>
|