@vitnode/core 1.2.0-canary.23 → 1.2.0-canary.25
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/dist/scripts/plugin.d.ts.map +1 -1
- package/dist/scripts/scripts.js +2 -9
- package/dist/scripts/shared/file-utils.d.ts.map +1 -1
- package/dist/src/api/{plugins → adapters}/email/nodemailer.d.ts +1 -1
- package/dist/src/api/adapters/email/nodemailer.d.ts.map +1 -0
- package/dist/src/api/{plugins → adapters}/email/nodemailer.js +1 -1
- package/dist/src/api/{plugins → adapters}/email/resend.d.ts +1 -1
- package/dist/src/api/adapters/email/resend.d.ts.map +1 -0
- package/dist/src/api/{plugins → adapters}/email/resend.js +1 -1
- package/dist/src/api/adapters/sso/discord.d.ts.map +1 -0
- package/dist/src/api/adapters/sso/facebook.d.ts.map +1 -0
- package/dist/src/api/adapters/sso/google.d.ts.map +1 -0
- package/dist/src/api/config.d.ts.map +1 -1
- package/dist/src/api/config.js +6 -5
- package/dist/src/api/lib/logger-middleware.d.ts +8 -0
- package/dist/src/api/lib/logger-middleware.d.ts.map +1 -0
- package/dist/src/api/lib/logger-middleware.js +35 -0
- package/dist/src/api/lib/route.d.ts +1 -1
- package/dist/src/api/lib/route.d.ts.map +1 -1
- package/dist/src/api/lib/route.js +1 -1
- package/dist/src/api/middlewares/{global/global.d.ts → global.middleware.d.ts} +10 -8
- package/dist/src/api/middlewares/global.middleware.d.ts.map +1 -0
- package/dist/src/api/middlewares/global.middleware.js +86 -0
- package/dist/src/api/middlewares/rate-limiter.middleware.d.ts +4 -0
- package/dist/src/api/middlewares/rate-limiter.middleware.d.ts.map +1 -0
- package/dist/src/api/middlewares/rate-limiter.middleware.js +26 -0
- package/dist/src/api/models/device.d.ts +4 -1
- package/dist/src/api/models/device.d.ts.map +1 -1
- package/dist/src/api/models/device.js +21 -14
- package/dist/src/api/models/email.d.ts +1 -2
- package/dist/src/api/models/email.d.ts.map +1 -1
- package/dist/src/api/models/email.js +9 -16
- package/dist/src/api/models/password.d.ts.map +1 -1
- package/dist/src/api/models/password.js +8 -1
- package/dist/src/api/models/session-admin.d.ts +1 -1
- package/dist/src/api/models/session-admin.d.ts.map +1 -1
- package/dist/src/api/models/session-admin.js +40 -16
- package/dist/src/api/models/session.d.ts +1 -1
- package/dist/src/api/models/session.d.ts.map +1 -1
- package/dist/src/api/models/session.js +28 -12
- package/dist/src/api/models/sso.js +1 -1
- package/dist/src/api/models/user/sign-up.d.ts +1 -1
- package/dist/src/api/models/user/sign-up.d.ts.map +1 -1
- package/dist/src/api/models/user/sign-up.js +2 -3
- package/dist/src/api/models/user.d.ts +1 -1
- package/dist/src/api/models/user.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.d.ts +223 -8
- package/dist/src/api/modules/admin/admin.module.d.ts.map +1 -1
- package/dist/src/api/modules/admin/admin.module.js +3 -1
- package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts +221 -0
- package/dist/src/api/modules/admin/debug/debug.admin.module.d.ts.map +1 -0
- package/dist/src/api/modules/admin/debug/debug.admin.module.js +10 -0
- package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts +222 -0
- package/dist/src/api/modules/admin/debug/routes/logs.route.d.ts.map +1 -0
- package/dist/src/api/modules/admin/debug/routes/logs.route.js +90 -0
- package/dist/src/api/modules/admin/routes/session.route.d.ts +1 -5
- package/dist/src/api/modules/admin/routes/session.route.d.ts.map +1 -1
- package/dist/src/api/modules/admin/routes/session.route.js +0 -4
- package/dist/src/api/modules/admin/users/routes/list.route.d.ts +1 -1
- package/dist/src/api/modules/admin/users/routes/users.route.d.ts +1 -1
- package/dist/src/api/modules/admin/users/users.admin.module.d.ts +1 -1
- package/dist/src/api/modules/middleware/middleware.module.d.ts +1 -1
- package/dist/src/api/modules/middleware/route.d.ts +1 -1
- package/dist/src/api/modules/middleware/route.d.ts.map +1 -1
- package/dist/src/api/modules/middleware/route.js +2 -4
- package/dist/src/api/modules/users/routes/session.route.d.ts +1 -1
- package/dist/src/api/modules/users/routes/sign-in.route.d.ts +1 -1
- package/dist/src/api/modules/users/routes/sign-out.route.d.ts +1 -1
- package/dist/src/api/modules/users/routes/sign-up.route.d.ts +1 -1
- package/dist/src/api/modules/users/routes/test.route.d.ts +2 -2
- package/dist/src/api/modules/users/routes/test.route.d.ts.map +1 -1
- package/dist/src/api/modules/users/routes/test.route.js +9 -1
- package/dist/src/api/modules/users/sso/routes/callback.route.d.ts +1 -1
- package/dist/src/api/modules/users/sso/routes/create-url.route.d.ts +1 -1
- package/dist/src/api/modules/users/sso/sso.module.d.ts +2 -2
- package/dist/src/api/modules/users/users.module.d.ts +8 -8
- package/dist/src/app_admin/core/debug/page.d.ts +11 -0
- package/dist/src/app_admin/core/debug/page.d.ts.map +1 -0
- package/dist/src/app_admin/core/debug/page.js +44 -0
- package/dist/src/app_admin/core/users/page.d.ts +4 -1
- package/dist/src/app_admin/core/users/page.d.ts.map +1 -1
- package/dist/src/app_admin/core/users/page.js +3 -1
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.d.ts +15 -0
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.d.ts.map +1 -0
- package/dist/src/components/confirm-action/confirm-action-alert-dialog.js +41 -0
- package/dist/src/components/confirm-action/content.d.ts +7 -0
- package/dist/src/components/confirm-action/content.d.ts.map +1 -0
- package/dist/src/components/confirm-action/content.js +31 -0
- package/dist/src/components/date-format.d.ts +2 -1
- package/dist/src/components/date-format.d.ts.map +1 -1
- package/dist/src/components/date-format.js +4 -1
- package/dist/src/components/switchers/langs/language-swietcher.d.ts +5 -0
- package/dist/src/components/switchers/langs/language-swietcher.d.ts.map +1 -0
- package/dist/src/components/switchers/langs/language-swietcher.js +45 -0
- package/dist/src/components/switchers/themes/theme-switcher.d.ts.map +1 -0
- package/dist/src/components/switchers/{theme-switcher.js → themes/theme-switcher.js} +1 -1
- package/dist/src/components/table/data-table.d.ts.map +1 -1
- package/dist/src/components/table/data-table.js +2 -7
- package/dist/src/components/ui/alert-dialog.d.ts +7 -2
- package/dist/src/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/src/components/ui/alert-dialog.js +39 -5
- package/dist/src/components/ui/dialog.js +1 -1
- package/dist/src/database/logs.d.ts +203 -0
- package/dist/src/database/logs.d.ts.map +1 -0
- package/dist/src/database/logs.js +31 -0
- package/dist/src/database/sessions.d.ts +19 -0
- package/dist/src/database/sessions.d.ts.map +1 -1
- package/dist/src/database/sessions.js +3 -0
- package/dist/src/lib/fetcher/core.d.ts +2 -1
- package/dist/src/lib/fetcher/core.d.ts.map +1 -1
- package/dist/src/lib/fetcher/core.js +2 -2
- package/dist/src/lib/fetcher-client.d.ts +2 -1
- package/dist/src/lib/fetcher-client.d.ts.map +1 -1
- package/dist/src/lib/fetcher-client.js +3 -2
- package/dist/src/lib/fetcher.d.ts +2 -1
- package/dist/src/lib/fetcher.d.ts.map +1 -1
- package/dist/src/lib/fetcher.js +2 -1
- package/dist/src/views/admin/layouts/admin-layout.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/admin-layout.js +5 -1
- package/dist/src/views/admin/layouts/user-bar/client.d.ts.map +1 -1
- package/dist/src/views/admin/layouts/user-bar/client.js +26 -18
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.d.ts +2 -0
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/clear-cache.js +35 -0
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.d.ts +2 -0
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/actions/clear-cache/mutation-api.js +5 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts +3 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/content.js +281 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts +5 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/system-logs/actions/more/more.js +74 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.d.ts +4 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-status.js +8 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.d.ts +3 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/system-logs/badges/badge-type-log.js +30 -0
- package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.d.ts +31 -0
- package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.d.ts.map +1 -0
- package/dist/src/views/admin/views/core/debug/system-logs/system-logs-view.js +96 -0
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts +1 -1
- package/dist/src/views/auth/sso/buttons/sso-buttons.d.ts.map +1 -1
- package/dist/src/views/auth/sso/buttons/sso-buttons.js +5 -2
- package/dist/src/views/layouts/theme/header/header.d.ts +4 -1
- package/dist/src/views/layouts/theme/header/header.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/header/header.js +8 -4
- package/dist/src/views/layouts/theme/layout.d.ts +3 -1
- package/dist/src/views/layouts/theme/layout.d.ts.map +1 -1
- package/dist/src/views/layouts/theme/layout.js +4 -3
- package/dist/src/vitnode.config.d.ts +11 -5
- package/dist/src/vitnode.config.d.ts.map +1 -1
- package/dist/src/vitnode.config.js +2 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +45 -28
- package/src/locales/en.json +59 -1
- package/dist/src/api/lib/get-user-ip.d.ts +0 -3
- package/dist/src/api/lib/get-user-ip.d.ts.map +0 -1
- package/dist/src/api/lib/get-user-ip.js +0 -8
- package/dist/src/api/middlewares/global/global.d.ts.map +0 -1
- package/dist/src/api/middlewares/global/global.js +0 -47
- package/dist/src/api/plugins/email/nodemailer.d.ts.map +0 -1
- package/dist/src/api/plugins/email/resend.d.ts.map +0 -1
- package/dist/src/api/plugins/sso/discord.d.ts.map +0 -1
- package/dist/src/api/plugins/sso/facebook.d.ts.map +0 -1
- package/dist/src/api/plugins/sso/google.d.ts.map +0 -1
- package/dist/src/components/switchers/theme-switcher.d.ts.map +0 -1
- package/src/app/login/page.tsx +0 -22
- package/src/app/login/sso/[providerId]/page.tsx +0 -19
- package/src/app/register/page.tsx +0 -22
- package/src/app_admin/core/page.tsx +0 -5
- package/src/app_admin/core/test/page.tsx +0 -5
- package/src/app_admin/core/users/page.tsx +0 -35
- package/src/drizzle.config.ts +0 -58
- package/src/vitnode.config.ts +0 -104
- /package/dist/src/api/{plugins → adapters}/sso/discord.d.ts +0 -0
- /package/dist/src/api/{plugins → adapters}/sso/discord.js +0 -0
- /package/dist/src/api/{plugins → adapters}/sso/facebook.d.ts +0 -0
- /package/dist/src/api/{plugins → adapters}/sso/facebook.js +0 -0
- /package/dist/src/api/{plugins → adapters}/sso/google.d.ts +0 -0
- /package/dist/src/api/{plugins → adapters}/sso/google.js +0 -0
- /package/dist/src/components/switchers/{theme-switcher.d.ts → themes/theme-switcher.d.ts} +0 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { CalendarIcon, GlobeIcon, HashIcon, PlugIcon, ServerIcon, UserIcon } from "lucide-react";
|
|
3
|
+
import { useTranslations } from "next-intl";
|
|
4
|
+
import { DateFormat } from "../../../../../../../../components/date-format.js";
|
|
5
|
+
import { Badge } from "../../../../../../../../components/ui/badge.js";
|
|
6
|
+
import { Card, CardContent, CardHeader, CardTitle } from "../../../../../../../../components/ui/card.js";
|
|
7
|
+
import { Input } from "../../../../../../../../components/ui/input.js";
|
|
8
|
+
import { Label } from "../../../../../../../../components/ui/label.js";
|
|
9
|
+
import { Textarea } from "../../../../../../../../components/ui/textarea.js";
|
|
10
|
+
import { Link } from "../../../../../../../../lib/navigation.js";
|
|
11
|
+
import { BadgeStatus } from "../../badges/badge-status.js";
|
|
12
|
+
import { BadgeTypeLog } from "../../badges/badge-type-log.js";
|
|
13
|
+
export const ContentMoreActionSystemLogs = ({ content, ipAddress, pluginId, createdAt, type, id, method, path, userAgent, statusCode, user })=>{
|
|
14
|
+
const t = useTranslations('admin.debug.logs.more');
|
|
15
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
16
|
+
className: "space-y-6",
|
|
17
|
+
children: [
|
|
18
|
+
/*#__PURE__*/ _jsxs(Card, {
|
|
19
|
+
children: [
|
|
20
|
+
/*#__PURE__*/ _jsx(CardHeader, {
|
|
21
|
+
children: /*#__PURE__*/ _jsxs(CardTitle, {
|
|
22
|
+
className: "flex items-center gap-2",
|
|
23
|
+
children: [
|
|
24
|
+
/*#__PURE__*/ _jsx(HashIcon, {
|
|
25
|
+
className: "size-4"
|
|
26
|
+
}),
|
|
27
|
+
t('log_overview.title')
|
|
28
|
+
]
|
|
29
|
+
})
|
|
30
|
+
}),
|
|
31
|
+
/*#__PURE__*/ _jsxs(CardContent, {
|
|
32
|
+
className: "space-y-6",
|
|
33
|
+
children: [
|
|
34
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
35
|
+
className: "grid grid-cols-1 gap-4 md:grid-cols-3",
|
|
36
|
+
children: [
|
|
37
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
38
|
+
className: "space-y-2",
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
41
|
+
className: "text-muted-foreground text-xs font-medium",
|
|
42
|
+
htmlFor: "log-type",
|
|
43
|
+
children: t('log_overview.log_type')
|
|
44
|
+
}),
|
|
45
|
+
/*#__PURE__*/ _jsx(BadgeTypeLog, {
|
|
46
|
+
type: type
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
}),
|
|
50
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
51
|
+
className: "space-y-2",
|
|
52
|
+
children: [
|
|
53
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
54
|
+
className: "text-muted-foreground text-xs font-medium",
|
|
55
|
+
children: t('log_overview.status_code')
|
|
56
|
+
}),
|
|
57
|
+
/*#__PURE__*/ _jsx(BadgeStatus, {
|
|
58
|
+
statusCode: statusCode
|
|
59
|
+
})
|
|
60
|
+
]
|
|
61
|
+
}),
|
|
62
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
63
|
+
className: "space-y-2",
|
|
64
|
+
children: [
|
|
65
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
66
|
+
className: "text-muted-foreground text-xs font-medium",
|
|
67
|
+
htmlFor: "log-id",
|
|
68
|
+
children: t('log_overview.log_id')
|
|
69
|
+
}),
|
|
70
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
71
|
+
id: "log-id",
|
|
72
|
+
readOnly: true,
|
|
73
|
+
value: `#${id}`
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
})
|
|
77
|
+
]
|
|
78
|
+
}),
|
|
79
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
80
|
+
className: "grid grid-cols-1 gap-4 md:grid-cols-3",
|
|
81
|
+
children: [
|
|
82
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
83
|
+
className: "space-y-2",
|
|
84
|
+
children: [
|
|
85
|
+
/*#__PURE__*/ _jsxs(Label, {
|
|
86
|
+
className: "text-muted-foreground flex items-center gap-1 text-xs font-medium",
|
|
87
|
+
htmlFor: "created-at",
|
|
88
|
+
children: [
|
|
89
|
+
/*#__PURE__*/ _jsx(CalendarIcon, {
|
|
90
|
+
className: "size-3"
|
|
91
|
+
}),
|
|
92
|
+
t('log_overview.created_at')
|
|
93
|
+
]
|
|
94
|
+
}),
|
|
95
|
+
/*#__PURE__*/ _jsx("div", {
|
|
96
|
+
className: "text-sm",
|
|
97
|
+
id: "created-at",
|
|
98
|
+
children: /*#__PURE__*/ _jsx(DateFormat, {
|
|
99
|
+
date: createdAt
|
|
100
|
+
})
|
|
101
|
+
})
|
|
102
|
+
]
|
|
103
|
+
}),
|
|
104
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
105
|
+
className: "space-y-2",
|
|
106
|
+
children: [
|
|
107
|
+
/*#__PURE__*/ _jsxs(Label, {
|
|
108
|
+
className: "text-muted-foreground flex items-center gap-1 text-xs font-medium",
|
|
109
|
+
htmlFor: "plugin-id",
|
|
110
|
+
children: [
|
|
111
|
+
/*#__PURE__*/ _jsx(PlugIcon, {
|
|
112
|
+
className: "size-3"
|
|
113
|
+
}),
|
|
114
|
+
t('log_overview.plugin')
|
|
115
|
+
]
|
|
116
|
+
}),
|
|
117
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
118
|
+
id: "plugin-id",
|
|
119
|
+
readOnly: true,
|
|
120
|
+
value: pluginId
|
|
121
|
+
})
|
|
122
|
+
]
|
|
123
|
+
}),
|
|
124
|
+
user && /*#__PURE__*/ _jsxs("div", {
|
|
125
|
+
className: "space-y-2",
|
|
126
|
+
children: [
|
|
127
|
+
/*#__PURE__*/ _jsxs(Label, {
|
|
128
|
+
className: "text-muted-foreground flex items-center gap-1 text-xs font-medium",
|
|
129
|
+
htmlFor: "user-link",
|
|
130
|
+
children: [
|
|
131
|
+
/*#__PURE__*/ _jsx(UserIcon, {
|
|
132
|
+
className: "size-3"
|
|
133
|
+
}),
|
|
134
|
+
t('log_overview.user')
|
|
135
|
+
]
|
|
136
|
+
}),
|
|
137
|
+
/*#__PURE__*/ _jsxs(Link, {
|
|
138
|
+
className: "border-input bg-background hover:bg-accent hover:text-accent-foreground block rounded-md border px-3 py-2 text-sm font-medium",
|
|
139
|
+
href: `/admin/core/users/${user.id}`,
|
|
140
|
+
id: "user-link",
|
|
141
|
+
children: [
|
|
142
|
+
user.name,
|
|
143
|
+
" (#",
|
|
144
|
+
user.id,
|
|
145
|
+
")"
|
|
146
|
+
]
|
|
147
|
+
})
|
|
148
|
+
]
|
|
149
|
+
})
|
|
150
|
+
]
|
|
151
|
+
})
|
|
152
|
+
]
|
|
153
|
+
})
|
|
154
|
+
]
|
|
155
|
+
}),
|
|
156
|
+
/*#__PURE__*/ _jsxs(Card, {
|
|
157
|
+
children: [
|
|
158
|
+
/*#__PURE__*/ _jsx(CardHeader, {
|
|
159
|
+
children: /*#__PURE__*/ _jsxs(CardTitle, {
|
|
160
|
+
className: "flex items-center gap-2",
|
|
161
|
+
children: [
|
|
162
|
+
/*#__PURE__*/ _jsx(GlobeIcon, {
|
|
163
|
+
className: "size-4"
|
|
164
|
+
}),
|
|
165
|
+
t('request_information.title')
|
|
166
|
+
]
|
|
167
|
+
})
|
|
168
|
+
}),
|
|
169
|
+
/*#__PURE__*/ _jsxs(CardContent, {
|
|
170
|
+
className: "space-y-6",
|
|
171
|
+
children: [
|
|
172
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
173
|
+
className: "grid grid-cols-1 gap-6 md:grid-cols-2",
|
|
174
|
+
children: [
|
|
175
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
176
|
+
className: "space-y-3",
|
|
177
|
+
children: [
|
|
178
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
179
|
+
className: "text-muted-foreground text-xs font-medium",
|
|
180
|
+
htmlFor: "ip-address",
|
|
181
|
+
children: t('request_information.ip_address')
|
|
182
|
+
}),
|
|
183
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
184
|
+
id: "ip-address",
|
|
185
|
+
readOnly: true,
|
|
186
|
+
value: ipAddress
|
|
187
|
+
})
|
|
188
|
+
]
|
|
189
|
+
}),
|
|
190
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
191
|
+
className: "space-y-3",
|
|
192
|
+
children: [
|
|
193
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
194
|
+
className: "text-muted-foreground text-xs font-medium",
|
|
195
|
+
htmlFor: "request-method",
|
|
196
|
+
children: t('request_information.request_method')
|
|
197
|
+
}),
|
|
198
|
+
/*#__PURE__*/ _jsx("div", {
|
|
199
|
+
className: "flex",
|
|
200
|
+
children: /*#__PURE__*/ _jsx(Badge, {
|
|
201
|
+
className: "px-3 py-1",
|
|
202
|
+
id: "request-method",
|
|
203
|
+
variant: "outline",
|
|
204
|
+
children: method
|
|
205
|
+
})
|
|
206
|
+
})
|
|
207
|
+
]
|
|
208
|
+
})
|
|
209
|
+
]
|
|
210
|
+
}),
|
|
211
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
212
|
+
className: "space-y-3",
|
|
213
|
+
children: [
|
|
214
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
215
|
+
className: "text-muted-foreground text-xs font-medium",
|
|
216
|
+
htmlFor: "request-url",
|
|
217
|
+
children: t('request_information.request_url')
|
|
218
|
+
}),
|
|
219
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
220
|
+
id: "request-url",
|
|
221
|
+
readOnly: true,
|
|
222
|
+
value: path
|
|
223
|
+
})
|
|
224
|
+
]
|
|
225
|
+
}),
|
|
226
|
+
userAgent && /*#__PURE__*/ _jsxs("div", {
|
|
227
|
+
className: "space-y-3",
|
|
228
|
+
children: [
|
|
229
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
230
|
+
className: "text-muted-foreground text-xs font-medium",
|
|
231
|
+
htmlFor: "user-agent",
|
|
232
|
+
children: t('request_information.user_agent')
|
|
233
|
+
}),
|
|
234
|
+
/*#__PURE__*/ _jsx(Textarea, {
|
|
235
|
+
className: "resize-none font-mono text-sm",
|
|
236
|
+
id: "user-agent",
|
|
237
|
+
readOnly: true,
|
|
238
|
+
value: userAgent
|
|
239
|
+
})
|
|
240
|
+
]
|
|
241
|
+
})
|
|
242
|
+
]
|
|
243
|
+
})
|
|
244
|
+
]
|
|
245
|
+
}),
|
|
246
|
+
/*#__PURE__*/ _jsxs(Card, {
|
|
247
|
+
children: [
|
|
248
|
+
/*#__PURE__*/ _jsx(CardHeader, {
|
|
249
|
+
children: /*#__PURE__*/ _jsxs(CardTitle, {
|
|
250
|
+
className: "flex items-center gap-2",
|
|
251
|
+
children: [
|
|
252
|
+
/*#__PURE__*/ _jsx(ServerIcon, {
|
|
253
|
+
className: "size-4"
|
|
254
|
+
}),
|
|
255
|
+
t('log_content.title')
|
|
256
|
+
]
|
|
257
|
+
})
|
|
258
|
+
}),
|
|
259
|
+
/*#__PURE__*/ _jsx(CardContent, {
|
|
260
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
261
|
+
className: "space-y-2",
|
|
262
|
+
children: [
|
|
263
|
+
/*#__PURE__*/ _jsx(Label, {
|
|
264
|
+
className: "text-muted-foreground text-xs font-medium",
|
|
265
|
+
htmlFor: "log-content",
|
|
266
|
+
children: t('log_content.full_log')
|
|
267
|
+
}),
|
|
268
|
+
/*#__PURE__*/ _jsx(Textarea, {
|
|
269
|
+
className: "min-h-[120px] font-mono text-sm",
|
|
270
|
+
id: "log-content",
|
|
271
|
+
readOnly: true,
|
|
272
|
+
value: content
|
|
273
|
+
})
|
|
274
|
+
]
|
|
275
|
+
})
|
|
276
|
+
})
|
|
277
|
+
]
|
|
278
|
+
})
|
|
279
|
+
]
|
|
280
|
+
});
|
|
281
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const ContentMoreActionSystemLogs: React.LazyExoticComponent<({ content, ipAddress, pluginId, createdAt, type, id, method, path, userAgent, statusCode, user, }: Awaited<ReturnType<typeof import("../../system-logs-view").getSystemLogsData>>["edges"][number]) => import("react/jsx-runtime").JSX.Element>;
|
|
3
|
+
export declare const MoreActionSystemLogs: (props: React.ComponentProps<typeof ContentMoreActionSystemLogs>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=more.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"more.d.ts","sourceRoot":"","sources":["../../../../../../../../../../src/views/admin/views/core/debug/system-logs/actions/more/more.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAmB1B,QAAA,MAAM,2BAA2B,gIAevB,uFACkB,qDAZ3B,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,CAAC,cAAc,CAAC,OAAO,2BAA2B,CAAC,4CAsChE,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { SearchIcon } from "lucide-react";
|
|
4
|
+
import { useTranslations } from "next-intl";
|
|
5
|
+
import React from "react";
|
|
6
|
+
import { Button } from "../../../../../../../../components/ui/button.js";
|
|
7
|
+
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from "../../../../../../../../components/ui/dialog.js";
|
|
8
|
+
import { Loader } from "../../../../../../../../components/ui/loader.js";
|
|
9
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../../../../../../../../components/ui/tooltip.js";
|
|
10
|
+
const ContentMoreActionSystemLogs = /*#__PURE__*/ React.lazy(async ()=>import("./content.js").then((module)=>({
|
|
11
|
+
default: module.ContentMoreActionSystemLogs
|
|
12
|
+
})));
|
|
13
|
+
export const MoreActionSystemLogs = (props)=>{
|
|
14
|
+
const t = useTranslations('admin.debug.logs.more');
|
|
15
|
+
return /*#__PURE__*/ _jsxs(Dialog, {
|
|
16
|
+
children: [
|
|
17
|
+
/*#__PURE__*/ _jsx(TooltipProvider, {
|
|
18
|
+
children: /*#__PURE__*/ _jsxs(Tooltip, {
|
|
19
|
+
children: [
|
|
20
|
+
/*#__PURE__*/ _jsx(TooltipTrigger, {
|
|
21
|
+
asChild: true,
|
|
22
|
+
children: /*#__PURE__*/ _jsx(DialogTrigger, {
|
|
23
|
+
asChild: true,
|
|
24
|
+
children: /*#__PURE__*/ _jsx(Button, {
|
|
25
|
+
size: "icon",
|
|
26
|
+
variant: "ghost",
|
|
27
|
+
children: /*#__PURE__*/ _jsx(SearchIcon, {})
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
}),
|
|
31
|
+
/*#__PURE__*/ _jsx(TooltipContent, {
|
|
32
|
+
children: t('title')
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
})
|
|
36
|
+
}),
|
|
37
|
+
/*#__PURE__*/ _jsxs(DialogContent, {
|
|
38
|
+
className: "sm:max-w-4xl",
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ _jsxs(DialogHeader, {
|
|
41
|
+
children: [
|
|
42
|
+
/*#__PURE__*/ _jsxs(DialogTitle, {
|
|
43
|
+
className: "flex items-center gap-2",
|
|
44
|
+
children: [
|
|
45
|
+
/*#__PURE__*/ _jsx(SearchIcon, {
|
|
46
|
+
className: "size-5"
|
|
47
|
+
}),
|
|
48
|
+
t('title')
|
|
49
|
+
]
|
|
50
|
+
}),
|
|
51
|
+
/*#__PURE__*/ _jsx(DialogDescription, {
|
|
52
|
+
children: t.rich('desc', {
|
|
53
|
+
logId: ()=>/*#__PURE__*/ _jsxs("span", {
|
|
54
|
+
className: "font-semibold",
|
|
55
|
+
children: [
|
|
56
|
+
"#",
|
|
57
|
+
props.id
|
|
58
|
+
]
|
|
59
|
+
})
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ _jsx(React.Suspense, {
|
|
65
|
+
fallback: /*#__PURE__*/ _jsx(Loader, {}),
|
|
66
|
+
children: /*#__PURE__*/ _jsx(ContentMoreActionSystemLogs, {
|
|
67
|
+
...props
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
})
|
|
72
|
+
]
|
|
73
|
+
});
|
|
74
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge-status.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/views/admin/views/core/debug/system-logs/badges/badge-status.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,gBAAgB;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,4CAcjE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Badge } from "../../../../../../../components/ui/badge.js";
|
|
3
|
+
export const BadgeStatus = ({ statusCode })=>{
|
|
4
|
+
return /*#__PURE__*/ _jsx(Badge, {
|
|
5
|
+
variant: statusCode >= 200 && statusCode < 300 ? 'default' : statusCode >= 400 ? 'destructive' : 'secondary',
|
|
6
|
+
children: statusCode
|
|
7
|
+
});
|
|
8
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ContentMoreActionSystemLogs } from '../actions/more/content';
|
|
2
|
+
export declare const BadgeTypeLog: ({ type, }: Pick<React.ComponentProps<typeof ContentMoreActionSystemLogs>, "type">) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=badge-type-log.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge-type-log.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/views/admin/views/core/debug/system-logs/badges/badge-type-log.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAE3E,eAAO,MAAM,YAAY,GAAI,WAE1B,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,2BAA2B,CAAC,EAAE,MAAM,CAAC,4CAoBxE,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TriangleAlertIcon, XIcon } from "lucide-react";
|
|
3
|
+
import { useTranslations } from "next-intl";
|
|
4
|
+
import { Badge } from "../../../../../../../components/ui/badge.js";
|
|
5
|
+
export const BadgeTypeLog = ({ type })=>{
|
|
6
|
+
const t = useTranslations('admin.debug.logs.types');
|
|
7
|
+
if (type === 'warn') {
|
|
8
|
+
return /*#__PURE__*/ _jsxs(Badge, {
|
|
9
|
+
className: "bg-warn/10 border-warn/50 text-warn",
|
|
10
|
+
children: [
|
|
11
|
+
/*#__PURE__*/ _jsx(TriangleAlertIcon, {}),
|
|
12
|
+
" ",
|
|
13
|
+
t(type)
|
|
14
|
+
]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
if (type === 'error') {
|
|
18
|
+
return /*#__PURE__*/ _jsxs(Badge, {
|
|
19
|
+
className: "bg-destructive/10 border-destructive/50 text-destructive",
|
|
20
|
+
children: [
|
|
21
|
+
/*#__PURE__*/ _jsx(XIcon, {}),
|
|
22
|
+
" ",
|
|
23
|
+
t(type)
|
|
24
|
+
]
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return /*#__PURE__*/ _jsx(Badge, {
|
|
28
|
+
children: t(type)
|
|
29
|
+
});
|
|
30
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const getSystemLogsData: (query: Record<string, string | string[] | undefined>) => Promise<{
|
|
2
|
+
edges: {
|
|
3
|
+
ipAddress: string;
|
|
4
|
+
user: {
|
|
5
|
+
id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
nameCode: string;
|
|
8
|
+
} | null;
|
|
9
|
+
id: number;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
userAgent: string | null;
|
|
12
|
+
type: "warn" | "error" | "debug";
|
|
13
|
+
path: string;
|
|
14
|
+
pluginId: string;
|
|
15
|
+
content: string;
|
|
16
|
+
method: string;
|
|
17
|
+
statusCode: number;
|
|
18
|
+
}[];
|
|
19
|
+
pageInfo: {
|
|
20
|
+
count: number;
|
|
21
|
+
totalCount: number;
|
|
22
|
+
hasNextPage: boolean;
|
|
23
|
+
hasPreviousPage: boolean;
|
|
24
|
+
startCursor: number | null;
|
|
25
|
+
endCursor: number | null;
|
|
26
|
+
};
|
|
27
|
+
}>;
|
|
28
|
+
export declare const SystemLogsView: ({ searchParams, }: {
|
|
29
|
+
searchParams: Promise<Record<string, string | string[] | undefined>>;
|
|
30
|
+
}) => Promise<import("react/jsx-runtime").JSX.Element>;
|
|
31
|
+
//# sourceMappingURL=system-logs-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system-logs-view.d.ts","sourceRoot":"","sources":["../../../../../../../../src/views/admin/views/core/debug/system-logs/system-logs-view.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,iBAAiB,GAC5B,OAAO,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;EAcrD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAU,mBAElC;IACD,YAAY,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC;CACtE,qDA8DA,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getTranslations } from "next-intl/server";
|
|
3
|
+
import { debugAdminModule } from "../../../../../../api/modules/admin/debug/debug.admin.module.js";
|
|
4
|
+
import { DateFormat } from "../../../../../../components/date-format.js";
|
|
5
|
+
import { DataTable } from "../../../../../../components/table/data-table.js";
|
|
6
|
+
import { fetcher } from "../../../../../../lib/fetcher.js";
|
|
7
|
+
import { MoreActionSystemLogs } from "./actions/more/more.js";
|
|
8
|
+
import { BadgeStatus } from "./badges/badge-status.js";
|
|
9
|
+
import { BadgeTypeLog } from "./badges/badge-type-log.js";
|
|
10
|
+
export const getSystemLogsData = async (query)=>{
|
|
11
|
+
const res = await fetcher(debugAdminModule, {
|
|
12
|
+
prefixPath: '/admin',
|
|
13
|
+
path: '/logs',
|
|
14
|
+
method: 'get',
|
|
15
|
+
module: 'debug',
|
|
16
|
+
args: {
|
|
17
|
+
query
|
|
18
|
+
},
|
|
19
|
+
withPagination: true
|
|
20
|
+
});
|
|
21
|
+
return await res.json();
|
|
22
|
+
};
|
|
23
|
+
export const SystemLogsView = async ({ searchParams })=>{
|
|
24
|
+
const [t, query] = await Promise.all([
|
|
25
|
+
getTranslations('admin.debug.logs'),
|
|
26
|
+
searchParams
|
|
27
|
+
]);
|
|
28
|
+
const data = await getSystemLogsData(query);
|
|
29
|
+
return /*#__PURE__*/ _jsx(DataTable, {
|
|
30
|
+
columns: [
|
|
31
|
+
{
|
|
32
|
+
id: 'pluginId',
|
|
33
|
+
label: t('plugin'),
|
|
34
|
+
className: 'w-48'
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
id: 'type',
|
|
38
|
+
label: t('type'),
|
|
39
|
+
cell: ({ row })=>/*#__PURE__*/ _jsx(BadgeTypeLog, {
|
|
40
|
+
type: row.type
|
|
41
|
+
})
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'statusCode',
|
|
45
|
+
label: t('status_code'),
|
|
46
|
+
className: 'w-26',
|
|
47
|
+
cell: ({ row })=>/*#__PURE__*/ _jsx(BadgeStatus, {
|
|
48
|
+
statusCode: row.statusCode
|
|
49
|
+
})
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
id: 'createdAt',
|
|
53
|
+
label: t('created_at'),
|
|
54
|
+
cell: ({ row })=>/*#__PURE__*/ _jsx(DateFormat, {
|
|
55
|
+
date: row.createdAt,
|
|
56
|
+
showFullDate: true
|
|
57
|
+
})
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'content',
|
|
61
|
+
label: t('content'),
|
|
62
|
+
cell: ({ row })=>{
|
|
63
|
+
const CHARACTERS = 50;
|
|
64
|
+
const content = row.content;
|
|
65
|
+
const isLong = content.length > CHARACTERS;
|
|
66
|
+
const displayContent = isLong ? content.slice(0, CHARACTERS) + '...' : content;
|
|
67
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
68
|
+
children: displayContent
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: 'actions',
|
|
74
|
+
label: '',
|
|
75
|
+
cell: ({ row })=>/*#__PURE__*/ _jsx(MoreActionSystemLogs, {
|
|
76
|
+
...row
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
edges: data.edges.map((edge)=>({
|
|
81
|
+
...edge
|
|
82
|
+
})),
|
|
83
|
+
order: {
|
|
84
|
+
columns: [
|
|
85
|
+
'createdAt',
|
|
86
|
+
'pluginId',
|
|
87
|
+
'type'
|
|
88
|
+
],
|
|
89
|
+
defaultOrder: {
|
|
90
|
+
column: 'createdAt',
|
|
91
|
+
order: 'desc'
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
pageInfo: data.pageInfo
|
|
95
|
+
});
|
|
96
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const SSOButtonsSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
2
|
-
export declare const SSOButtons: () => Promise<import("react/jsx-runtime").JSX.Element>;
|
|
2
|
+
export declare const SSOButtons: () => Promise<import("react/jsx-runtime").JSX.Element | null>;
|
|
3
3
|
//# sourceMappingURL=sso-buttons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sso-buttons.d.ts","sourceRoot":"","sources":["../../../../../../src/views/auth/sso/buttons/sso-buttons.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,kBAAkB,+CAO9B,CAAC;AAEF,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"sso-buttons.d.ts","sourceRoot":"","sources":["../../../../../../src/views/auth/sso/buttons/sso-buttons.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,kBAAkB,+CAO9B,CAAC;AAEF,eAAO,MAAM,UAAU,+DA+BtB,CAAC"}
|
|
@@ -21,6 +21,9 @@ export const SSOButtons = async ()=>{
|
|
|
21
21
|
getTranslations('core.auth.sso'),
|
|
22
22
|
getMiddlewareApi()
|
|
23
23
|
]);
|
|
24
|
+
if (!sso.length) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
24
27
|
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
25
28
|
children: [
|
|
26
29
|
/*#__PURE__*/ _jsxs("div", {
|
|
@@ -32,7 +35,7 @@ export const SSOButtons = async ()=>{
|
|
|
32
35
|
className: "w-full border-t"
|
|
33
36
|
})
|
|
34
37
|
}),
|
|
35
|
-
|
|
38
|
+
/*#__PURE__*/ _jsx("div", {
|
|
36
39
|
className: "relative flex justify-center text-xs",
|
|
37
40
|
children: /*#__PURE__*/ _jsx("span", {
|
|
38
41
|
className: "bg-card text-muted-foreground px-4",
|
|
@@ -41,7 +44,7 @@ export const SSOButtons = async ()=>{
|
|
|
41
44
|
})
|
|
42
45
|
]
|
|
43
46
|
}),
|
|
44
|
-
|
|
47
|
+
/*#__PURE__*/ _jsx("div", {
|
|
45
48
|
className: "flex flex-wrap items-center justify-center gap-4",
|
|
46
49
|
children: sso.map((provider)=>/*#__PURE__*/ _jsx(ButtonSSOButtons, {
|
|
47
50
|
providerId: provider.id,
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { VitNodeConfig } from '../../../../vitnode.config';
|
|
3
|
+
export declare const HeaderLayout: ({ logo, className, vitNodeConfig, ...props }: React.ComponentProps<"header"> & {
|
|
2
4
|
logo: React.ReactNode;
|
|
5
|
+
vitNodeConfig: VitNodeConfig;
|
|
3
6
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
7
|
//# sourceMappingURL=header.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../../../src/views/layouts/theme/header/header.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../../../src/views/layouts/theme/header/header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAUtD,eAAO,MAAM,YAAY,GAAI,8CAK1B,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAAG;IAClC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,aAAa,EAAE,aAAa,CAAC;CAC9B,4CAwBA,CAAC"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { LanguageSwitcher } from "../../../../components/switchers/langs/language-swietcher.js";
|
|
4
|
+
import { ThemeSwitcher } from "../../../../components/switchers/themes/theme-switcher.js";
|
|
4
5
|
import { Skeleton } from "../../../../components/ui/skeleton.js";
|
|
5
6
|
import { Link } from "../../../../lib/navigation.js";
|
|
6
7
|
import { cn } from "../../../../lib/utils.js";
|
|
7
8
|
import { UserHeader } from "./user/user.js";
|
|
8
|
-
export const HeaderLayout = ({ logo, className, ...props })=>{
|
|
9
|
+
export const HeaderLayout = ({ logo, className, vitNodeConfig, ...props })=>{
|
|
9
10
|
return /*#__PURE__*/ _jsx("header", {
|
|
10
11
|
className: cn('bg-card/75 sticky top-0 z-20 w-full border-b shadow-sm backdrop-blur', className),
|
|
11
12
|
...props,
|
|
@@ -20,8 +21,11 @@ export const HeaderLayout = ({ logo, className, ...props })=>{
|
|
|
20
21
|
/*#__PURE__*/ _jsxs("div", {
|
|
21
22
|
className: "ml-auto flex items-center gap-2",
|
|
22
23
|
children: [
|
|
24
|
+
/*#__PURE__*/ _jsx(LanguageSwitcher, {
|
|
25
|
+
locales: vitNodeConfig.i18n.locales
|
|
26
|
+
}),
|
|
23
27
|
/*#__PURE__*/ _jsx(ThemeSwitcher, {}),
|
|
24
|
-
/*#__PURE__*/ _jsx(Suspense, {
|
|
28
|
+
/*#__PURE__*/ _jsx(React.Suspense, {
|
|
25
29
|
fallback: /*#__PURE__*/ _jsx(Skeleton, {
|
|
26
30
|
className: "h-9 w-32"
|
|
27
31
|
}),
|