@allbluecn/admin-app 0.3.3 → 0.3.5
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/package.json +4 -3
- package/src/components/admin/admin-user-menu.tsx +4 -4
- package/src/components/admin/developer-log.tsx +7 -7
- package/src/components/ai-memory/memory-facts-panel.tsx +9 -9
- package/src/components/ai-prompts/preview-panel.tsx +1 -1
- package/src/components/ai-prompts/prompt-editor.tsx +8 -8
- package/src/components/ai-prompts/prompt-table.tsx +6 -6
- package/src/components/ai-prompts/section-editor.tsx +3 -3
- package/src/components/ai-prompts/variable-panel.tsx +2 -2
- package/src/components/ai-prompts/version-history.tsx +5 -5
- package/src/components/ai-provider/model-list-editor.tsx +2 -2
- package/src/components/ai-provider/provider-form.tsx +7 -7
- package/src/components/ai-provider/provider-table.tsx +6 -6
- package/src/components/auth/admin-login-form.tsx +6 -6
- package/src/components/auth/icon-input.tsx +2 -2
- package/src/components/auth/password-input.tsx +2 -2
- package/src/components/component/component-form-dialog.tsx +8 -8
- package/src/components/component/component-import-dialog.tsx +6 -6
- package/src/components/component/component-table.tsx +3 -3
- package/src/components/confirm-dialog.tsx +94 -0
- package/src/components/data-table/data-table-pagination.tsx +121 -0
- package/src/components/data-table/data-table.tsx +218 -0
- package/src/components/data-table/table-detail-layout.tsx +97 -0
- package/src/components/dependency/changelog-dialog.tsx +2 -2
- package/src/components/dependency/columns.tsx +3 -3
- package/src/components/dependency/dependency-table.tsx +7 -7
- package/src/components/dependency/edit-dialog.tsx +8 -8
- package/src/components/invitations/invitations-page.tsx +13 -13
- package/src/components/knowledge-public/bookmark-form-dialog.tsx +6 -6
- package/src/components/knowledge-public/compliance-form-dialog.tsx +6 -6
- package/src/components/knowledge-public/legal-form-dialog.tsx +7 -7
- package/src/components/layout/sidebar-02/app-sidebar.tsx +1 -1
- package/src/components/layout/sidebar-02/index.tsx +1 -1
- package/src/components/layout/sidebar-02/nav-main.tsx +2 -2
- package/src/components/layout/sidebar-02/nav-notifications.tsx +3 -3
- package/src/components/market/columns.tsx +4 -4
- package/src/components/market/market-app-form.tsx +6 -6
- package/src/components/market/market-app-list.tsx +4 -4
- package/src/components/monitoring/error-list.tsx +1 -1
- package/src/components/monitoring/metrics-stats.tsx +1 -1
- package/src/components/monitoring/request-log-table.tsx +1 -1
- package/src/components/notion-avatar.tsx +126 -0
- package/src/components/oauth-providers/provider-page.tsx +9 -9
- package/src/components/permissions/assign-dialog.tsx +5 -5
- package/src/components/permissions/create-role-dialog.tsx +6 -6
- package/src/components/ui/alert-dialog.tsx +185 -0
- package/src/components/ui/alert.tsx +75 -0
- package/src/components/ui/avatar.tsx +106 -0
- package/src/components/ui/badge.tsx +51 -0
- package/src/components/ui/button.tsx +57 -0
- package/src/components/ui/card.tsx +102 -0
- package/src/components/ui/checkbox.tsx +27 -0
- package/src/components/ui/collapsible.tsx +19 -0
- package/src/components/ui/dialog.tsx +155 -0
- package/src/components/ui/dropdown-menu.tsx +265 -0
- package/src/components/ui/field.tsx +236 -0
- package/src/components/ui/input-group.tsx +157 -0
- package/src/components/ui/input.tsx +19 -0
- package/src/components/ui/label.tsx +17 -0
- package/src/components/ui/pagination.tsx +130 -0
- package/src/components/ui/select.tsx +232 -0
- package/src/components/ui/separator.tsx +23 -0
- package/src/components/ui/sheet.tsx +134 -0
- package/src/components/ui/sidebar.tsx +721 -0
- package/src/components/ui/skeleton.tsx +13 -0
- package/src/components/ui/switch.tsx +30 -0
- package/src/components/ui/table.tsx +113 -0
- package/src/components/ui/textarea.tsx +17 -0
- package/src/components/ui/toast.tsx +308 -0
- package/src/components/ui/tooltip.tsx +64 -0
- package/src/components/user/columns.tsx +4 -4
- package/src/components/user/settings-activity-log.tsx +7 -7
- package/src/components/user/settings-profile/avatar-uploader.tsx +2 -2
- package/src/components/user/settings-profile/social-links.tsx +2 -2
- package/src/components/user/settings-profile.tsx +6 -6
- package/src/components/user/user-create-dialog.tsx +6 -6
- package/src/components/user/user-detail/error-boundary.tsx +1 -1
- package/src/components/user/user-detail/user-detail-dialogs.tsx +6 -6
- package/src/components/user/user-filters.tsx +3 -3
- package/src/components/user-avatar.tsx +82 -0
- package/src/hooks/use-mobile.ts +19 -0
- package/src/lib/datetime.ts +226 -0
- package/src/lib/sanitize.ts +18 -0
- package/src/providers/index.tsx +1 -1
- package/src/routes/__root.tsx +1 -1
- package/src/routes/_nav/audit/route.lazy.tsx +1 -1
- package/src/routes/_nav/compliance/route.lazy.tsx +3 -3
- package/src/routes/_nav/components/route.lazy.tsx +4 -4
- package/src/routes/_nav/knowledge-public/bookmarks/route.lazy.tsx +6 -6
- package/src/routes/_nav/knowledge-public/compliance/route.lazy.tsx +6 -6
- package/src/routes/_nav/knowledge-public/legal/route.lazy.tsx +6 -6
- package/src/routes/_nav/licenses/$licenseId/route.lazy.tsx +3 -3
- package/src/routes/_nav/licenses/new/route.lazy.tsx +5 -5
- package/src/routes/_nav/licenses/route.lazy.tsx +1 -1
- package/src/routes/_nav/monitoring/ai-usage/route.lazy.tsx +2 -2
- package/src/routes/_nav/monitoring/errors/route.lazy.tsx +1 -1
- package/src/routes/_nav/monitoring/health/route.lazy.tsx +3 -3
- package/src/routes/_nav/monitoring/logs/route.lazy.tsx +3 -3
- package/src/routes/_nav/monitoring/metrics/route.lazy.tsx +3 -3
- package/src/routes/_nav/monitoring/route.lazy.tsx +2 -2
- package/src/routes/_nav/monitoring/sentry/route.lazy.tsx +1 -1
- package/src/routes/_nav/permissions/route.lazy.tsx +4 -4
- package/src/routes/_nav/sso/route.lazy.tsx +2 -2
- package/src/routes/_nav/users/$userId/route.lazy.tsx +8 -8
- package/src/routes/_nav/users/-components/users-table.tsx +1 -1
- package/src/routes/_nav/users/route.lazy.tsx +1 -1
- package/src/routes/setup/route.lazy.tsx +2 -2
- package/src/server/dependency/helpers.ts +0 -1
- package/src/styles/globals.css +3 -3
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
import { createLazyFileRoute } from '@tanstack/react-router'
|
|
19
19
|
import { m } from '@/paraglide/messages.js'
|
|
20
20
|
import { useState, useEffect, useRef } from 'react'
|
|
21
|
-
import { formatTimestamp } from '
|
|
21
|
+
import { formatTimestamp } from '@/lib/datetime'
|
|
22
22
|
import { HeartPulse, Play, Square, RefreshCw } from 'lucide-react'
|
|
23
23
|
import { PageHeader } from '@/components/common/page-header'
|
|
24
24
|
import { HealthCards } from '@/components/monitoring/health-cards'
|
|
25
|
-
import { DataTable } from '
|
|
25
|
+
import { DataTable } from '@/components/data-table/data-table'
|
|
26
26
|
import { getHealthStatus } from '@/server/serverFns/monitoring/get-health'
|
|
27
27
|
import { getHealthCheckSettings, updateHealthCheckSettings } from '@/server/serverFns/monitoring/get-health-settings'
|
|
28
|
-
import { toast } from '
|
|
28
|
+
import { toast } from '@/components/ui/toast'
|
|
29
29
|
import { jsonify } from '@/lib/loader-serial'
|
|
30
30
|
|
|
31
31
|
export const Route = createLazyFileRoute('/_nav/monitoring/health')({
|
|
@@ -21,11 +21,11 @@ import { useState, useEffect, useRef } from 'react'
|
|
|
21
21
|
import { Activity, Filter, RefreshCw, Trash2 } from 'lucide-react'
|
|
22
22
|
import { PageHeader } from '@/components/common/page-header'
|
|
23
23
|
import { RequestLogTable } from '@/components/monitoring/request-log-table'
|
|
24
|
-
import { Checkbox } from '
|
|
24
|
+
import { Checkbox } from '@/components/ui/checkbox'
|
|
25
25
|
import { getRequestLogs } from '@/server/serverFns/monitoring/get-request-logs'
|
|
26
26
|
import { resetMonitoring } from '@/server/serverFns/monitoring/reset'
|
|
27
|
-
import { DataTablePagination } from '
|
|
28
|
-
import { toast } from '
|
|
27
|
+
import { DataTablePagination } from '@/components/data-table/data-table-pagination'
|
|
28
|
+
import { toast } from '@/components/ui/toast'
|
|
29
29
|
import { jsonify } from '@/lib/loader-serial'
|
|
30
30
|
import { RequestLogEntry } from '@/components/monitoring/request-log-table'
|
|
31
31
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { m } from '@/paraglide/messages.js'
|
|
19
19
|
import { getBenchmark, getBenchmarkSource, compareDuration } from '@/lib/monitoring-benchmarks'
|
|
20
|
-
import { formatTimestamp } from '
|
|
20
|
+
import { formatTimestamp } from '@/lib/datetime'
|
|
21
21
|
import { createLazyFileRoute } from '@tanstack/react-router'
|
|
22
22
|
import { useState } from 'react'
|
|
23
23
|
import { BarChart3, RefreshCw, Trash2, MemoryStick } from 'lucide-react'
|
|
@@ -27,8 +27,8 @@ import { MetricsStats } from '@/components/monitoring/metrics-stats'
|
|
|
27
27
|
import { getMetrics } from '@/server/serverFns/monitoring/get-metrics'
|
|
28
28
|
import { resetMonitoring } from '@/server/serverFns/monitoring/reset'
|
|
29
29
|
import { jsonify } from '@/lib/loader-serial'
|
|
30
|
-
import { DataTable } from '
|
|
31
|
-
import { toast } from '
|
|
30
|
+
import { DataTable } from '@/components/data-table/data-table'
|
|
31
|
+
import { toast } from '@/components/ui/toast'
|
|
32
32
|
|
|
33
33
|
export const Route = createLazyFileRoute('/_nav/monitoring/metrics')({
|
|
34
34
|
component: MonitoringMetrics,
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
|
|
18
18
|
import { createLazyFileRoute, Link, Outlet, useLocation } from '@tanstack/react-router'
|
|
19
19
|
import { m } from '@/paraglide/messages.js'
|
|
20
|
-
import { SidebarTrigger } from '
|
|
21
|
-
import { Separator } from '
|
|
20
|
+
import { SidebarTrigger } from '@/components/ui/sidebar'
|
|
21
|
+
import { Separator } from '@/components/ui/separator'
|
|
22
22
|
|
|
23
23
|
export const Route = createLazyFileRoute('/_nav/monitoring')({
|
|
24
24
|
component: MonitoringLayout,
|
|
@@ -21,7 +21,7 @@ import * as Sentry from '@sentry/tanstackstart-react'
|
|
|
21
21
|
import { BugPlay, ExternalLink, Bug, Activity, Eye, EyeOff, Save, CheckCircle2, XCircle, RefreshCw, ShieldCheck } from 'lucide-react'
|
|
22
22
|
import { IconBrandSentry } from '@tabler/icons-react';
|
|
23
23
|
import { useEffect, useState } from 'react'
|
|
24
|
-
import { toast } from '
|
|
24
|
+
import { toast } from '@/components/ui/toast'
|
|
25
25
|
import { getSentryConfig, saveSentryConfig, reconfigureSentryServer } from '@/server/serverFns/sentry/config'
|
|
26
26
|
import type { SentryConfig } from '@/server/serverFns/sentry/config'
|
|
27
27
|
|
|
@@ -2,15 +2,15 @@ import { createLazyFileRoute, Link, useLocation } from '@tanstack/react-router'
|
|
|
2
2
|
import { m } from '@/paraglide/messages.js'
|
|
3
3
|
import { getLocale } from '@/paraglide/runtime.js'
|
|
4
4
|
import { useServerFn } from '@tanstack/react-start'
|
|
5
|
-
import { toast } from '
|
|
5
|
+
import { toast } from '@/components/ui/toast'
|
|
6
6
|
import { useEffect, useState } from 'react'
|
|
7
7
|
import type React from 'react'
|
|
8
8
|
import {
|
|
9
9
|
listRolesFn,
|
|
10
10
|
deleteRoleFn,
|
|
11
11
|
} from '@/server/serverFns/permissions'
|
|
12
|
-
import { Badge } from '
|
|
13
|
-
import { Button } from '
|
|
12
|
+
import { Badge } from '@/components/ui/badge'
|
|
13
|
+
import { Button } from '@/components/ui/button'
|
|
14
14
|
import {
|
|
15
15
|
Table,
|
|
16
16
|
TableBody,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
TableHead,
|
|
19
19
|
TableHeader,
|
|
20
20
|
TableRow,
|
|
21
|
-
} from '
|
|
21
|
+
} from '@/components/ui/table'
|
|
22
22
|
import { CreateRoleDialog } from '@/components/permissions/create-role-dialog'
|
|
23
23
|
import { AssignDialog } from '@/components/permissions/assign-dialog'
|
|
24
24
|
import type { RoleItem } from '@/components/permissions/types'
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
import { createLazyFileRoute } from '@tanstack/react-router'
|
|
19
19
|
import { m } from '@/paraglide/messages.js'
|
|
20
20
|
import { useServerFn } from '@tanstack/react-start'
|
|
21
|
-
import { toast } from '
|
|
21
|
+
import { toast } from '@/components/ui/toast'
|
|
22
22
|
import type React from 'react'
|
|
23
23
|
import { deleteSsoProviderFn, toggleSsoProviderFn } from '@/server/serverFns/sso-config'
|
|
24
|
-
import { Badge } from '
|
|
24
|
+
import { Badge } from '@/components/ui/badge'
|
|
25
25
|
|
|
26
26
|
export const Route = createLazyFileRoute('/_nav/sso')({
|
|
27
27
|
pendingComponent: () => (
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
import { createLazyFileRoute, useNavigate } from '@tanstack/react-router'
|
|
19
19
|
import { m } from '@/paraglide/messages.js'
|
|
20
20
|
import { useState, useTransition } from 'react'
|
|
21
|
-
import { formatTimestamp } from '
|
|
21
|
+
import { formatTimestamp } from '@/lib/datetime'
|
|
22
22
|
import { getUserDetailFn } from '@/server/serverFns/user/detail'
|
|
23
23
|
import { updateUserRoleFn } from '@/server/serverFns/user/update-role'
|
|
24
24
|
import { updateUserStatusFn } from '@/server/serverFns/user/update-status'
|
|
25
25
|
import { resetUserPasswordFn } from '@/server/serverFns/user/reset-password'
|
|
26
26
|
import { deleteUserFn } from '@/server/serverFns/user/delete'
|
|
27
|
-
import { TableDetailLayout } from '
|
|
28
|
-
import { Badge } from '
|
|
29
|
-
import { Separator } from '
|
|
30
|
-
import { Button } from '
|
|
31
|
-
import { UserAvatar } from '
|
|
27
|
+
import { TableDetailLayout } from '@/components/data-table/table-detail-layout'
|
|
28
|
+
import { Badge } from '@/components/ui/badge'
|
|
29
|
+
import { Separator } from '@/components/ui/separator'
|
|
30
|
+
import { Button } from '@/components/ui/button'
|
|
31
|
+
import { UserAvatar } from '@/components/user-avatar'
|
|
32
32
|
|
|
33
33
|
const STATUS_LABELS: Record<string, () => string> = {
|
|
34
34
|
active: m['admin-users_status_active'],
|
|
@@ -48,7 +48,7 @@ import {
|
|
|
48
48
|
ShoppingBagIcon,
|
|
49
49
|
ShieldCheckIcon,
|
|
50
50
|
} from 'lucide-react'
|
|
51
|
-
import { toast } from '
|
|
51
|
+
import { toast } from '@/components/ui/toast'
|
|
52
52
|
import { parseUserAgent, formatParsedUA } from '@allbluecn/kernel'
|
|
53
53
|
import type { AvatarConfig } from '@allbluecn/kernel'
|
|
54
54
|
import SettingsActivityLog, {
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
CardDescription,
|
|
62
62
|
CardHeader,
|
|
63
63
|
CardTitle,
|
|
64
|
-
} from '
|
|
64
|
+
} from '@/components/ui/card'
|
|
65
65
|
import { AdminUserErrorBoundary } from '@/components/user/user-detail/error-boundary'
|
|
66
66
|
import {
|
|
67
67
|
UserDeleteDialog,
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
import { DataTable } from "
|
|
19
|
+
import { DataTable } from "@/components/data-table/data-table"
|
|
20
20
|
import { getUserColumns } from "@/components/user/columns"
|
|
21
21
|
import type { UserRow } from "@/components/user/columns"
|
|
22
22
|
import { useNavigate } from "@tanstack/react-router"
|
|
@@ -21,7 +21,7 @@ import { useState } from 'react'
|
|
|
21
21
|
import { UsersTable } from './-components/users-table'
|
|
22
22
|
import { UserFilters } from '@/components/user/user-filters'
|
|
23
23
|
import { UserCreateDialog } from '@/components/user/user-create-dialog'
|
|
24
|
-
import { Button } from '
|
|
24
|
+
import { Button } from '@/components/ui/button'
|
|
25
25
|
import { PlusIcon } from 'lucide-react'
|
|
26
26
|
|
|
27
27
|
export const Route = createLazyFileRoute('/_nav/users')({
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
import { createLazyFileRoute, useNavigate } from '@tanstack/react-router'
|
|
19
19
|
import { m } from '@/paraglide/messages.js'
|
|
20
20
|
import { useState } from 'react'
|
|
21
|
-
import { toast } from '
|
|
21
|
+
import { toast } from '@/components/ui/toast'
|
|
22
22
|
import { Loader2, ShieldCheck, User, Mail, Database } from 'lucide-react'
|
|
23
23
|
import { AuthLayout, AuthLayoutLeft, AuthLayoutRight } from '@/components/auth/auth-layout'
|
|
24
24
|
import { AuthHeader } from '@/components/auth/auth-header'
|
|
25
25
|
import { AuthBrandPanel } from '@/components/auth/auth-brand-panel'
|
|
26
26
|
import { PasswordInput } from '@/components/auth/password-input'
|
|
27
27
|
import { IconInput } from '@/components/auth/icon-input'
|
|
28
|
-
import { Button } from '
|
|
28
|
+
import { Button } from '@/components/ui/button'
|
|
29
29
|
import { setupAdminFn } from '@/server/serverFns/auth/setup'
|
|
30
30
|
|
|
31
31
|
export const Route = createLazyFileRoute('/setup')({
|
package/src/styles/globals.css
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
@import "tailwindcss";
|
|
5
5
|
|
|
6
|
-
/*
|
|
7
|
-
|
|
8
|
-
@source "
|
|
6
|
+
/* src 源码类名扫描(含 components/ui 内联组件,
|
|
7
|
+
Tailwind v4 自动探测不覆盖的路径由此显式声明) */
|
|
8
|
+
@source "../";
|
|
9
9
|
|
|
10
10
|
@import "tw-animate-css";
|
|
11
11
|
|