@allbluecn/admin-app 0.3.4 → 0.3.6
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 +15 -15
- package/src/components/__tests__/user-avatar.test.tsx +39 -0
- package/src/components/admin/admin-user-menu.tsx +6 -6
- 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 +8 -8
- 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/{allblue-ui/src → src}/components/confirm-dialog.tsx +2 -2
- 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 → knowledge/public}/bookmark-form-dialog.tsx +10 -10
- package/src/components/{knowledge-public → knowledge/public}/compliance-form-dialog.tsx +10 -10
- package/src/components/{knowledge-public → knowledge/public}/legal-form-dialog.tsx +11 -11
- 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/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/{allblue-ui/src → src/components}/ui/checkbox.tsx +4 -4
- package/{allblue-ui/src → src/components}/ui/sidebar.tsx +1 -1
- package/src/components/user/columns.tsx +5 -5
- 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/{allblue-ui/src → src}/components/user-avatar.tsx +7 -4
- package/src/lib/__tests__/avatar-shape.test.ts +44 -0
- package/src/lib/auth.config.ts +1 -1
- package/{allblue-ui/src/lib/avatar.ts → src/lib/avatar-shape.ts} +15 -21
- 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 +16 -16
- package/src/routes/_nav/knowledge-public/bookmarks/route.tsx +1 -1
- package/src/routes/_nav/knowledge-public/compliance/route.lazy.tsx +14 -14
- package/src/routes/_nav/knowledge-public/compliance/route.tsx +1 -1
- package/src/routes/_nav/knowledge-public/legal/route.lazy.tsx +14 -14
- package/src/routes/_nav/knowledge-public/legal/route.tsx +1 -1
- 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 +9 -9
- package/src/routes/_nav/users/-components/users-table.tsx +1 -1
- package/src/routes/_nav/users/route.lazy.tsx +1 -1
- package/src/routes/login/route.lazy.tsx +1 -1
- package/src/routes/setup/route.lazy.tsx +2 -2
- package/src/server/dependency/helpers.ts +0 -1
- package/src/server/{knowledge-public → knowledge/public}/github-sync.ts +12 -2
- package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/create.ts +1 -1
- package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/list.ts +2 -1
- package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/sync-all-github.ts +3 -2
- package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/update.ts +3 -2
- package/src/server/serverFns/{knowledge-public → knowledge/public}/compliance/create.ts +1 -1
- package/src/server/serverFns/{knowledge-public → knowledge/public}/compliance/list.ts +2 -1
- package/src/server/serverFns/{knowledge-public → knowledge/public}/compliance/update.ts +3 -2
- package/src/server/serverFns/{knowledge-public → knowledge/public}/legal/create.ts +1 -1
- package/src/server/serverFns/{knowledge-public → knowledge/public}/legal/list.ts +2 -1
- package/src/server/serverFns/{knowledge-public → knowledge/public}/legal/update.ts +3 -2
- package/src/styles/globals.css +3 -3
- package/allblue-ui/package.json +0 -6
- package/allblue-ui/src/components/infinite-scroll-sentinel.tsx +0 -37
- package/allblue-ui/src/hooks/use-load-more.ts +0 -57
- package/allblue-ui/src/index.ts +0 -31
- package/allblue-ui/src/lib/utils.ts +0 -1
- /package/{allblue-ui/src → src/components}/data-table/data-table-pagination.tsx +0 -0
- /package/{allblue-ui/src → src/components}/data-table/data-table.tsx +0 -0
- /package/{allblue-ui/src → src/components}/data-table/table-detail-layout.tsx +0 -0
- /package/{allblue-ui/src → src}/components/notion-avatar.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/alert-dialog.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/alert.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/avatar.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/badge.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/button.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/card.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/collapsible.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/dialog.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/dropdown-menu.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/field.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/input-group.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/input.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/label.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/pagination.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/select.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/separator.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/sheet.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/skeleton.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/switch.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/table.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/textarea.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/toast.tsx +0 -0
- /package/{allblue-ui/src → src/components}/ui/tooltip.tsx +0 -0
- /package/{allblue-ui/src → src}/hooks/use-mobile.ts +0 -0
- /package/{allblue-ui/src → src}/lib/datetime.ts +0 -0
- /package/{allblue-ui/src → src}/lib/sanitize.ts +0 -0
- /package/src/server/{knowledge-public → knowledge/public}/canonical-id.ts +0 -0
- /package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/delete.ts +0 -0
- /package/src/server/serverFns/{knowledge-public → knowledge/public}/bookmarks/detail.ts +0 -0
- /package/src/server/serverFns/{knowledge-public → knowledge/public}/compliance/delete.ts +0 -0
- /package/src/server/serverFns/{knowledge-public → knowledge/public}/compliance/detail.ts +0 -0
- /package/src/server/serverFns/{knowledge-public → knowledge/public}/legal/delete.ts +0 -0
- /package/src/server/serverFns/{knowledge-public → knowledge/public}/legal/detail.ts +0 -0
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { useState } from "react"
|
|
19
19
|
import { m } from '@/paraglide/messages.js'
|
|
20
|
-
import { toast } from '
|
|
20
|
+
import { toast } from '@/components/ui/toast'
|
|
21
21
|
import { Loader2, Pencil } from "lucide-react"
|
|
22
22
|
import {
|
|
23
23
|
DEPENDENCY_CATEGORIES,
|
|
@@ -26,13 +26,13 @@ import {
|
|
|
26
26
|
type ThirdPartyDependencyRow,
|
|
27
27
|
} from "@allbluecn/kernel"
|
|
28
28
|
import { updateDependencyFn } from "@/server/serverFns/dependency/update"
|
|
29
|
-
import { Button } from "
|
|
30
|
-
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "
|
|
31
|
-
import { Input } from "
|
|
32
|
-
import { Label } from "
|
|
33
|
-
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "
|
|
34
|
-
import { Textarea } from "
|
|
35
|
-
import { Tooltip, TooltipContent, TooltipTrigger } from "
|
|
29
|
+
import { Button } from "@/components/ui/button"
|
|
30
|
+
import { Dialog, DialogContent, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog"
|
|
31
|
+
import { Input } from "@/components/ui/input"
|
|
32
|
+
import { Label } from "@/components/ui/label"
|
|
33
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
|
|
34
|
+
import { Textarea } from "@/components/ui/textarea"
|
|
35
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"
|
|
36
36
|
|
|
37
37
|
export function EditDependencyDialog({
|
|
38
38
|
row,
|
|
@@ -19,15 +19,15 @@ import { useState } from "react"
|
|
|
19
19
|
import type React from "react"
|
|
20
20
|
import { m } from "@/paraglide/messages.js"
|
|
21
21
|
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"
|
|
22
|
-
import { toast } from "
|
|
22
|
+
import { toast } from "@/components/ui/toast"
|
|
23
23
|
import { Ticket, Plus, Copy, Ban, CheckCircle2, Trash2, Users } from "lucide-react"
|
|
24
24
|
import { PageHeader } from "@/components/common/page-header"
|
|
25
|
-
import { Button } from "
|
|
26
|
-
import { Badge } from "
|
|
27
|
-
import { Input } from "
|
|
28
|
-
import { Label } from "
|
|
29
|
-
import { Switch } from "
|
|
30
|
-
import { Skeleton } from "
|
|
25
|
+
import { Button } from "@/components/ui/button"
|
|
26
|
+
import { Badge } from "@/components/ui/badge"
|
|
27
|
+
import { Input } from "@/components/ui/input"
|
|
28
|
+
import { Label } from "@/components/ui/label"
|
|
29
|
+
import { Switch } from "@/components/ui/switch"
|
|
30
|
+
import { Skeleton } from "@/components/ui/skeleton"
|
|
31
31
|
import {
|
|
32
32
|
Dialog,
|
|
33
33
|
DialogContent,
|
|
@@ -35,8 +35,8 @@ import {
|
|
|
35
35
|
DialogFooter,
|
|
36
36
|
DialogHeader,
|
|
37
37
|
DialogTitle,
|
|
38
|
-
} from "
|
|
39
|
-
import { ConfirmDialog } from "
|
|
38
|
+
} from "@/components/ui/dialog"
|
|
39
|
+
import { ConfirmDialog } from "@/components/confirm-dialog"
|
|
40
40
|
import {
|
|
41
41
|
Table,
|
|
42
42
|
TableBody,
|
|
@@ -44,13 +44,13 @@ import {
|
|
|
44
44
|
TableHead,
|
|
45
45
|
TableHeader,
|
|
46
46
|
TableRow,
|
|
47
|
-
} from "
|
|
47
|
+
} from "@/components/ui/table"
|
|
48
48
|
import {
|
|
49
49
|
Tooltip,
|
|
50
50
|
TooltipContent,
|
|
51
51
|
TooltipTrigger,
|
|
52
|
-
} from "
|
|
53
|
-
import { Card, CardContent } from "
|
|
52
|
+
} from "@/components/ui/tooltip"
|
|
53
|
+
import { Card, CardContent } from "@/components/ui/card"
|
|
54
54
|
import {
|
|
55
55
|
listInvitationCodesFn,
|
|
56
56
|
createInvitationCodeFn,
|
|
@@ -59,7 +59,7 @@ import {
|
|
|
59
59
|
getRegistrationModeFn,
|
|
60
60
|
setRegistrationModeFn,
|
|
61
61
|
} from "@/server/serverFns/invitations"
|
|
62
|
-
import { formatTimestamp } from "
|
|
62
|
+
import { formatTimestamp } from "@/lib/datetime"
|
|
63
63
|
|
|
64
64
|
type RegistrationMode = "invite" | "open"
|
|
65
65
|
|
|
@@ -17,21 +17,21 @@
|
|
|
17
17
|
|
|
18
18
|
import { useState, useEffect } from 'react'
|
|
19
19
|
import { Loader2 } from 'lucide-react'
|
|
20
|
-
import { toast } from '
|
|
21
|
-
import { Button } from '
|
|
22
|
-
import { Input } from '
|
|
23
|
-
import { Label } from '
|
|
24
|
-
import { Textarea } from '
|
|
20
|
+
import { toast } from '@/components/ui/toast'
|
|
21
|
+
import { Button } from '@/components/ui/button'
|
|
22
|
+
import { Input } from '@/components/ui/input'
|
|
23
|
+
import { Label } from '@/components/ui/label'
|
|
24
|
+
import { Textarea } from '@/components/ui/textarea'
|
|
25
25
|
import {
|
|
26
26
|
Dialog,
|
|
27
27
|
DialogContent,
|
|
28
28
|
DialogFooter,
|
|
29
29
|
DialogHeader,
|
|
30
30
|
DialogTitle,
|
|
31
|
-
} from '
|
|
32
|
-
import { adminCreateBookmarkFn } from '@/server/serverFns/knowledge
|
|
33
|
-
import { adminUpdateBookmarkFn } from '@/server/serverFns/knowledge
|
|
34
|
-
import { adminGetBookmarkDetailFn } from '@/server/serverFns/knowledge
|
|
31
|
+
} from '@/components/ui/dialog'
|
|
32
|
+
import { adminCreateBookmarkFn } from '@/server/serverFns/knowledge/public/bookmarks/create'
|
|
33
|
+
import { adminUpdateBookmarkFn } from '@/server/serverFns/knowledge/public/bookmarks/update'
|
|
34
|
+
import { adminGetBookmarkDetailFn } from '@/server/serverFns/knowledge/public/bookmarks/detail'
|
|
35
35
|
|
|
36
36
|
export interface BookmarkRow {
|
|
37
37
|
id: string
|
|
@@ -80,7 +80,7 @@ export function BookmarkFormDialog({ open, onOpenChange, item, onSuccess }: Book
|
|
|
80
80
|
if (item) {
|
|
81
81
|
setLoading(true)
|
|
82
82
|
adminGetBookmarkDetailFn({ data: { id: item.id } })
|
|
83
|
-
.then((d:
|
|
83
|
+
.then((d: Awaited<ReturnType<typeof adminGetBookmarkDetailFn>>) => {
|
|
84
84
|
setForm({
|
|
85
85
|
title: d.title ?? '',
|
|
86
86
|
url: d.url ?? '',
|
|
@@ -17,21 +17,21 @@
|
|
|
17
17
|
|
|
18
18
|
import { useState, useEffect } from 'react'
|
|
19
19
|
import { Loader2, PlusIcon, Trash2Icon } from 'lucide-react'
|
|
20
|
-
import { toast } from '
|
|
21
|
-
import { Button } from '
|
|
22
|
-
import { Input } from '
|
|
23
|
-
import { Label } from '
|
|
24
|
-
import { Textarea } from '
|
|
20
|
+
import { toast } from '@/components/ui/toast'
|
|
21
|
+
import { Button } from '@/components/ui/button'
|
|
22
|
+
import { Input } from '@/components/ui/input'
|
|
23
|
+
import { Label } from '@/components/ui/label'
|
|
24
|
+
import { Textarea } from '@/components/ui/textarea'
|
|
25
25
|
import {
|
|
26
26
|
Dialog,
|
|
27
27
|
DialogContent,
|
|
28
28
|
DialogFooter,
|
|
29
29
|
DialogHeader,
|
|
30
30
|
DialogTitle,
|
|
31
|
-
} from '
|
|
32
|
-
import { adminCreateComplianceFn } from '@/server/serverFns/knowledge
|
|
33
|
-
import { adminUpdateComplianceFn } from '@/server/serverFns/knowledge
|
|
34
|
-
import { adminGetComplianceDetailFn } from '@/server/serverFns/knowledge
|
|
31
|
+
} from '@/components/ui/dialog'
|
|
32
|
+
import { adminCreateComplianceFn } from '@/server/serverFns/knowledge/public/compliance/create'
|
|
33
|
+
import { adminUpdateComplianceFn } from '@/server/serverFns/knowledge/public/compliance/update'
|
|
34
|
+
import { adminGetComplianceDetailFn } from '@/server/serverFns/knowledge/public/compliance/detail'
|
|
35
35
|
|
|
36
36
|
export interface ComplianceRow {
|
|
37
37
|
id: string
|
|
@@ -80,7 +80,7 @@ export function ComplianceFormDialog({ open, onOpenChange, item, onSuccess }: Co
|
|
|
80
80
|
if (item) {
|
|
81
81
|
setLoading(true)
|
|
82
82
|
adminGetComplianceDetailFn({ data: { id: item.id } })
|
|
83
|
-
.then((d:
|
|
83
|
+
.then((d: Awaited<ReturnType<typeof adminGetComplianceDetailFn>>) => {
|
|
84
84
|
setForm({
|
|
85
85
|
title: d.title ?? '',
|
|
86
86
|
code: '',
|
|
@@ -18,28 +18,28 @@
|
|
|
18
18
|
import { useState, useEffect } from 'react'
|
|
19
19
|
import { m } from '@/paraglide/messages.js'
|
|
20
20
|
import { Loader2 } from 'lucide-react'
|
|
21
|
-
import { toast } from '
|
|
22
|
-
import { Button } from '
|
|
23
|
-
import { Input } from '
|
|
24
|
-
import { Label } from '
|
|
25
|
-
import { Textarea } from '
|
|
21
|
+
import { toast } from '@/components/ui/toast'
|
|
22
|
+
import { Button } from '@/components/ui/button'
|
|
23
|
+
import { Input } from '@/components/ui/input'
|
|
24
|
+
import { Label } from '@/components/ui/label'
|
|
25
|
+
import { Textarea } from '@/components/ui/textarea'
|
|
26
26
|
import {
|
|
27
27
|
Select,
|
|
28
28
|
SelectContent,
|
|
29
29
|
SelectItem,
|
|
30
30
|
SelectTrigger,
|
|
31
31
|
SelectValue,
|
|
32
|
-
} from '
|
|
32
|
+
} from '@/components/ui/select'
|
|
33
33
|
import {
|
|
34
34
|
Dialog,
|
|
35
35
|
DialogContent,
|
|
36
36
|
DialogFooter,
|
|
37
37
|
DialogHeader,
|
|
38
38
|
DialogTitle,
|
|
39
|
-
} from '
|
|
40
|
-
import { adminCreateLegalFn } from '@/server/serverFns/knowledge
|
|
41
|
-
import { adminUpdateLegalFn } from '@/server/serverFns/knowledge
|
|
42
|
-
import { adminGetLegalDetailFn } from '@/server/serverFns/knowledge
|
|
39
|
+
} from '@/components/ui/dialog'
|
|
40
|
+
import { adminCreateLegalFn } from '@/server/serverFns/knowledge/public/legal/create'
|
|
41
|
+
import { adminUpdateLegalFn } from '@/server/serverFns/knowledge/public/legal/update'
|
|
42
|
+
import { adminGetLegalDetailFn } from '@/server/serverFns/knowledge/public/legal/detail'
|
|
43
43
|
|
|
44
44
|
export interface LegalRow {
|
|
45
45
|
id: string
|
|
@@ -106,7 +106,7 @@ export function LegalFormDialog({ open, onOpenChange, item, onSuccess }: LegalFo
|
|
|
106
106
|
if (item) {
|
|
107
107
|
setLoading(true)
|
|
108
108
|
adminGetLegalDetailFn({ data: { id: item.id } })
|
|
109
|
-
.then((d:
|
|
109
|
+
.then((d: Awaited<ReturnType<typeof adminGetLegalDetailFn>>) => {
|
|
110
110
|
setForm({
|
|
111
111
|
title: d.title ?? '',
|
|
112
112
|
code: '',
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
18
|
import type { ReactNode } from "react"
|
|
19
|
-
import { SidebarInset, SidebarProvider } from "
|
|
19
|
+
import { SidebarInset, SidebarProvider } from "@/components/ui/sidebar";
|
|
20
20
|
import { DashboardSidebar } from "@/components/layout/sidebar-02/app-sidebar";
|
|
21
21
|
|
|
22
22
|
export default function Sidebar02({ children }: { children?: ReactNode }) {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
import {
|
|
20
20
|
Collapsible,
|
|
21
21
|
CollapsibleContent,
|
|
22
|
-
} from "
|
|
22
|
+
} from "@/components/ui/collapsible";
|
|
23
23
|
import {
|
|
24
24
|
SidebarMenu,
|
|
25
25
|
SidebarMenuButton,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
SidebarMenuSubButton,
|
|
29
29
|
SidebarMenuItem as SidebarMenuSubItem,
|
|
30
30
|
useSidebar,
|
|
31
|
-
} from "
|
|
31
|
+
} from "@/components/ui/sidebar";
|
|
32
32
|
import { cn } from "@/lib/utils";
|
|
33
33
|
import { ChevronDown, ChevronUp } from "lucide-react";
|
|
34
34
|
import { Link } from "@tanstack/react-router";
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
import { Avatar, AvatarFallback, AvatarImage } from "
|
|
20
|
-
import { Button } from "
|
|
19
|
+
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar";
|
|
20
|
+
import { Button } from "@/components/ui/button";
|
|
21
21
|
import {
|
|
22
22
|
DropdownMenu,
|
|
23
23
|
DropdownMenuContent,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
DropdownMenuLabel,
|
|
26
26
|
DropdownMenuSeparator,
|
|
27
27
|
DropdownMenuTrigger,
|
|
28
|
-
} from "
|
|
28
|
+
} from "@/components/ui/dropdown-menu";
|
|
29
29
|
import { BellIcon } from "lucide-react";
|
|
30
30
|
|
|
31
31
|
type Notification = {
|
|
@@ -15,17 +15,17 @@
|
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
import type { AdminColumnDef } from "
|
|
18
|
+
import type { AdminColumnDef } from "@/components/data-table/data-table";
|
|
19
19
|
import { m } from '@/paraglide/messages.js'
|
|
20
|
-
import { Badge } from "
|
|
21
|
-
import { Button } from "
|
|
20
|
+
import { Badge } from "@/components/ui/badge"
|
|
21
|
+
import { Button } from "@/components/ui/button"
|
|
22
22
|
import {
|
|
23
23
|
DropdownMenu,
|
|
24
24
|
DropdownMenuContent,
|
|
25
25
|
DropdownMenuItem,
|
|
26
26
|
DropdownMenuSeparator,
|
|
27
27
|
DropdownMenuTrigger,
|
|
28
|
-
} from "
|
|
28
|
+
} from "@/components/ui/dropdown-menu"
|
|
29
29
|
import { MoreHorizontalIcon, PencilIcon, TrashIcon, EyeIcon, EyeOffIcon } from "lucide-react"
|
|
30
30
|
|
|
31
31
|
export type MarketAppRow = {
|
|
@@ -25,18 +25,18 @@ import {
|
|
|
25
25
|
DialogFooter,
|
|
26
26
|
DialogHeader,
|
|
27
27
|
DialogTitle,
|
|
28
|
-
} from "
|
|
29
|
-
import { Button } from "
|
|
30
|
-
import { Input } from "
|
|
31
|
-
import { Label } from "
|
|
28
|
+
} from "@/components/ui/dialog"
|
|
29
|
+
import { Button } from "@/components/ui/button"
|
|
30
|
+
import { Input } from "@/components/ui/input"
|
|
31
|
+
import { Label } from "@/components/ui/label"
|
|
32
32
|
import {
|
|
33
33
|
Select,
|
|
34
34
|
SelectContent,
|
|
35
35
|
SelectItem,
|
|
36
36
|
SelectTrigger,
|
|
37
37
|
SelectValue,
|
|
38
|
-
} from "
|
|
39
|
-
import { toast } from '
|
|
38
|
+
} from "@/components/ui/select"
|
|
39
|
+
import { toast } from '@/components/ui/toast'
|
|
40
40
|
|
|
41
41
|
interface MarketAppFormProps {
|
|
42
42
|
open: boolean
|
|
@@ -17,15 +17,15 @@
|
|
|
17
17
|
|
|
18
18
|
import { useCallback, useEffect, useState } from "react"
|
|
19
19
|
import { m } from '@/paraglide/messages.js'
|
|
20
|
-
import { DataTable } from "
|
|
20
|
+
import { DataTable } from "@/components/data-table/data-table"
|
|
21
21
|
import { getMarketColumns, MarketAppRow } from "./columns"
|
|
22
22
|
import { MarketAppForm } from "./market-app-form"
|
|
23
23
|
import { MarketAppFormData } from "@/lib/anyhub/types"
|
|
24
|
-
import { Button } from "
|
|
24
|
+
import { Button } from "@/components/ui/button"
|
|
25
25
|
import { PlusIcon } from "lucide-react"
|
|
26
|
-
import { toast } from '
|
|
26
|
+
import { toast } from '@/components/ui/toast'
|
|
27
27
|
import { listMarketAppsFn, updateMarketAppFn, deleteMarketAppFn } from "@/server/serverFns/anyhub/market"
|
|
28
|
-
import { ConfirmDialog } from "
|
|
28
|
+
import { ConfirmDialog } from "@/components/confirm-dialog"
|
|
29
29
|
|
|
30
30
|
export function MarketAppList() {
|
|
31
31
|
const [apps, setApps] = useState<MarketAppRow[]>([])
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import { useState } from 'react'
|
|
19
19
|
import { m } from '@/paraglide/messages.js'
|
|
20
|
-
import { DataTable, type AdminColumnDef } from '
|
|
20
|
+
import { DataTable, type AdminColumnDef } from '@/components/data-table/data-table'
|
|
21
21
|
|
|
22
22
|
function formatRelativeTime(dateStr: string): string {
|
|
23
23
|
const now = new Date()
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
// You should have received a copy of the GNU Affero General Public License
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
|
-
import { DataTable, type AdminColumnDef } from '
|
|
18
|
+
import { DataTable, type AdminColumnDef } from '@/components/data-table/data-table'
|
|
19
19
|
import { m } from '@/paraglide/messages.js'
|
|
20
20
|
import { describeMetric } from '@/lib/monitoring-descriptions'
|
|
21
21
|
import { getBenchmark, getBenchmarkSource, compareDuration } from '@/lib/monitoring-benchmarks'
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
import type React from 'react'
|
|
19
19
|
import { m } from '@/paraglide/messages.js'
|
|
20
|
-
import { DataTable, type AdminColumnDef } from '
|
|
20
|
+
import { DataTable, type AdminColumnDef } from '@/components/data-table/data-table'
|
|
21
21
|
import { describePath } from '@/lib/monitoring-descriptions'
|
|
22
22
|
import { getBenchmark, getBenchmarkSource, compareDuration } from '@/lib/monitoring-benchmarks'
|
|
23
23
|
import { ArrowDown, ArrowUp, Info } from 'lucide-react'
|
|
@@ -19,17 +19,17 @@ import { useEffect, useState } from 'react'
|
|
|
19
19
|
import type React from 'react'
|
|
20
20
|
import { m } from '@/paraglide/messages.js'
|
|
21
21
|
import { useMutation, useQuery, useQueryClient } from '@tanstack/react-query'
|
|
22
|
-
import { toast } from '
|
|
22
|
+
import { toast } from '@/components/ui/toast'
|
|
23
23
|
import { Eye, EyeOff, KeyRound, PlugZap, Save, Trash2 } from 'lucide-react'
|
|
24
24
|
import { PageHeader } from '@/components/common/page-header'
|
|
25
|
-
import { Button } from '
|
|
26
|
-
import { Badge } from '
|
|
27
|
-
import { Card, CardContent } from '
|
|
28
|
-
import { Input } from '
|
|
29
|
-
import { Label } from '
|
|
30
|
-
import { Switch } from '
|
|
31
|
-
import { Skeleton } from '
|
|
32
|
-
import { ConfirmDialog } from '
|
|
25
|
+
import { Button } from '@/components/ui/button'
|
|
26
|
+
import { Badge } from '@/components/ui/badge'
|
|
27
|
+
import { Card, CardContent } from '@/components/ui/card'
|
|
28
|
+
import { Input } from '@/components/ui/input'
|
|
29
|
+
import { Label } from '@/components/ui/label'
|
|
30
|
+
import { Switch } from '@/components/ui/switch'
|
|
31
|
+
import { Skeleton } from '@/components/ui/skeleton'
|
|
32
|
+
import { ConfirmDialog } from '@/components/confirm-dialog'
|
|
33
33
|
import {
|
|
34
34
|
deleteOAuthProviderFn,
|
|
35
35
|
listOAuthProvidersFn,
|
|
@@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'
|
|
|
2
2
|
import type React from 'react'
|
|
3
3
|
import { m } from '@/paraglide/messages.js'
|
|
4
4
|
import { useServerFn } from '@tanstack/react-start'
|
|
5
|
-
import { toast } from '
|
|
5
|
+
import { toast } from '@/components/ui/toast'
|
|
6
6
|
import {
|
|
7
7
|
assignRoleFn,
|
|
8
8
|
unassignRoleFn,
|
|
@@ -15,9 +15,9 @@ import {
|
|
|
15
15
|
DialogFooter,
|
|
16
16
|
DialogHeader,
|
|
17
17
|
DialogTitle,
|
|
18
|
-
} from '
|
|
19
|
-
import { Button } from '
|
|
20
|
-
import { Input } from '
|
|
18
|
+
} from '@/components/ui/dialog'
|
|
19
|
+
import { Button } from '@/components/ui/button'
|
|
20
|
+
import { Input } from '@/components/ui/input'
|
|
21
21
|
import {
|
|
22
22
|
Table,
|
|
23
23
|
TableBody,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
TableHead,
|
|
26
26
|
TableHeader,
|
|
27
27
|
TableRow,
|
|
28
|
-
} from '
|
|
28
|
+
} from '@/components/ui/table'
|
|
29
29
|
import type { AssignmentItem, RoleItem } from './types'
|
|
30
30
|
|
|
31
31
|
export function AssignDialog({
|
|
@@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from 'react'
|
|
|
2
2
|
import type React from 'react'
|
|
3
3
|
import { m } from '@/paraglide/messages.js'
|
|
4
4
|
import { useServerFn } from '@tanstack/react-start'
|
|
5
|
-
import { toast } from '
|
|
5
|
+
import { toast } from '@/components/ui/toast'
|
|
6
6
|
import { createRoleFn } from '@/server/serverFns/permissions'
|
|
7
7
|
import {
|
|
8
8
|
Dialog,
|
|
@@ -11,17 +11,17 @@ import {
|
|
|
11
11
|
DialogFooter,
|
|
12
12
|
DialogHeader,
|
|
13
13
|
DialogTitle,
|
|
14
|
-
} from '
|
|
15
|
-
import { Button } from '
|
|
16
|
-
import { Input } from '
|
|
17
|
-
import { Label } from '
|
|
14
|
+
} from '@/components/ui/dialog'
|
|
15
|
+
import { Button } from '@/components/ui/button'
|
|
16
|
+
import { Input } from '@/components/ui/input'
|
|
17
|
+
import { Label } from '@/components/ui/label'
|
|
18
18
|
import {
|
|
19
19
|
Select,
|
|
20
20
|
SelectContent,
|
|
21
21
|
SelectItem,
|
|
22
22
|
SelectTrigger,
|
|
23
23
|
SelectValue,
|
|
24
|
-
} from '
|
|
24
|
+
} from '@/components/ui/select'
|
|
25
25
|
import { ALL_ACTIONS, ALL_RESOURCES, LEVELS, type ResourcePermission } from './types'
|
|
26
26
|
|
|
27
27
|
export function CreateRoleDialog({
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox"
|
|
3
3
|
import { cn } from "cn"
|
|
4
|
-
import { CheckIcon } from "lucide-react"
|
|
4
|
+
import { CheckIcon, MinusIcon } from "lucide-react"
|
|
5
5
|
|
|
6
|
-
function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {
|
|
6
|
+
function Checkbox({ className, indeterminate, ...props }: CheckboxPrimitive.Root.Props) {
|
|
7
7
|
return (
|
|
8
8
|
<CheckboxPrimitive.Root
|
|
9
9
|
data-slot="checkbox"
|
|
10
|
+
indeterminate={indeterminate}
|
|
10
11
|
className={cn(
|
|
11
12
|
"peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary",
|
|
12
13
|
className
|
|
@@ -17,8 +18,7 @@ function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {
|
|
|
17
18
|
data-slot="checkbox-indicator"
|
|
18
19
|
className="grid place-content-center text-current transition-none [&>svg]:size-3.5"
|
|
19
20
|
>
|
|
20
|
-
<CheckIcon
|
|
21
|
-
/>
|
|
21
|
+
{indeterminate ? <MinusIcon /> : <CheckIcon />}
|
|
22
22
|
</CheckboxPrimitive.Indicator>
|
|
23
23
|
</CheckboxPrimitive.Root>
|
|
24
24
|
)
|
|
@@ -4,7 +4,7 @@ import { useRender } from "@base-ui/react/use-render"
|
|
|
4
4
|
import { cva, type VariantProps } from "class-variance-authority"
|
|
5
5
|
import { cn } from "cn"
|
|
6
6
|
|
|
7
|
-
import { useIsMobile } from "
|
|
7
|
+
import { useIsMobile } from "@/hooks/use-mobile"
|
|
8
8
|
import { Button } from "./button"
|
|
9
9
|
import { Input } from "./input"
|
|
10
10
|
import { Separator } from "./separator"
|
|
@@ -16,12 +16,12 @@
|
|
|
16
16
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
import { Badge } from "
|
|
20
|
-
import { Button } from "
|
|
19
|
+
import { Badge } from "@/components/ui/badge";
|
|
20
|
+
import { Button } from "@/components/ui/button";
|
|
21
21
|
import { EyeIcon } from "lucide-react";
|
|
22
|
-
import { UserAvatar } from "
|
|
22
|
+
import { UserAvatar } from "@/components/user-avatar";
|
|
23
23
|
import type { AvatarConfig } from "@allbluecn/kernel";
|
|
24
|
-
import type { AdminColumnDef } from "
|
|
24
|
+
import type { AdminColumnDef } from "@/components/data-table/data-table";
|
|
25
25
|
|
|
26
26
|
export type UserRow = {
|
|
27
27
|
id: string;
|
|
@@ -79,7 +79,7 @@ export function getUserColumns(onView: (user: UserRow) => void): AdminColumnDef<
|
|
|
79
79
|
<div className="flex items-center gap-2">
|
|
80
80
|
<UserAvatar
|
|
81
81
|
avatarConfig={user.avatarConfig as AvatarConfig | null}
|
|
82
|
-
bgShape={user.bgShape
|
|
82
|
+
bgShape={user.bgShape}
|
|
83
83
|
bgColor={user.bgColor}
|
|
84
84
|
name={user.username}
|
|
85
85
|
size="md"
|
|
@@ -26,28 +26,28 @@ import {
|
|
|
26
26
|
import { useState } from "react";
|
|
27
27
|
import { m } from '@/paraglide/messages.js'
|
|
28
28
|
import { cn } from "@/lib/utils";
|
|
29
|
-
import { Badge } from "
|
|
30
|
-
import { Button } from "
|
|
29
|
+
import { Badge } from "@/components/ui/badge";
|
|
30
|
+
import { Button } from "@/components/ui/button";
|
|
31
31
|
import {
|
|
32
32
|
Card,
|
|
33
33
|
CardContent,
|
|
34
34
|
CardDescription,
|
|
35
35
|
CardHeader,
|
|
36
36
|
CardTitle,
|
|
37
|
-
} from "
|
|
38
|
-
import { FieldLabel } from "
|
|
37
|
+
} from "@/components/ui/card";
|
|
38
|
+
import { FieldLabel } from "@/components/ui/field";
|
|
39
39
|
import {
|
|
40
40
|
InputGroup,
|
|
41
41
|
InputGroupInput,
|
|
42
|
-
} from "
|
|
42
|
+
} from "@/components/ui/input-group";
|
|
43
43
|
import {
|
|
44
44
|
Select,
|
|
45
45
|
SelectContent,
|
|
46
46
|
SelectItem,
|
|
47
47
|
SelectTrigger,
|
|
48
48
|
SelectValue,
|
|
49
|
-
} from "
|
|
50
|
-
import { Separator } from "
|
|
49
|
+
} from "@/components/ui/select";
|
|
50
|
+
import { Separator } from "@/components/ui/separator";
|
|
51
51
|
|
|
52
52
|
export interface ActivityLogEntry {
|
|
53
53
|
id: string;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
import { Camera, Loader2, X } from "lucide-react";
|
|
4
4
|
import { cn } from "@/lib/utils";
|
|
5
|
-
import { FieldLabel } from "
|
|
6
|
-
import { Button } from "
|
|
5
|
+
import { FieldLabel } from "@/components/ui/field";
|
|
6
|
+
import { Button } from "@/components/ui/button";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* 头像上传区(纯展示):预览/拖拽/进度态由父组件持有——errors 是父级
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
Field,
|
|
5
5
|
FieldContent,
|
|
6
6
|
FieldLabel,
|
|
7
|
-
} from "
|
|
7
|
+
} from "@/components/ui/field";
|
|
8
8
|
import {
|
|
9
9
|
InputGroup,
|
|
10
10
|
InputGroupInput,
|
|
11
|
-
} from "
|
|
11
|
+
} from "@/components/ui/input-group";
|
|
12
12
|
import {
|
|
13
13
|
defaultSocialPlatforms,
|
|
14
14
|
socialPlatformLabels,
|
|
@@ -18,27 +18,27 @@
|
|
|
18
18
|
import { Loader2, Save } from "lucide-react";
|
|
19
19
|
import { useCallback, useRef, useState } from "react";
|
|
20
20
|
import { cn } from "@/lib/utils";
|
|
21
|
-
import { Button } from "
|
|
21
|
+
import { Button } from "@/components/ui/button";
|
|
22
22
|
import {
|
|
23
23
|
Card,
|
|
24
24
|
CardContent,
|
|
25
25
|
CardDescription,
|
|
26
26
|
CardHeader,
|
|
27
27
|
CardTitle,
|
|
28
|
-
} from "
|
|
28
|
+
} from "@/components/ui/card";
|
|
29
29
|
import {
|
|
30
30
|
Field,
|
|
31
31
|
FieldContent,
|
|
32
32
|
FieldDescription,
|
|
33
33
|
FieldError,
|
|
34
34
|
FieldLabel,
|
|
35
|
-
} from "
|
|
35
|
+
} from "@/components/ui/field";
|
|
36
36
|
import {
|
|
37
37
|
InputGroup,
|
|
38
38
|
InputGroupInput,
|
|
39
|
-
} from "
|
|
40
|
-
import { Separator } from "
|
|
41
|
-
import { Textarea } from "
|
|
39
|
+
} from "@/components/ui/input-group";
|
|
40
|
+
import { Separator } from "@/components/ui/separator";
|
|
41
|
+
import { Textarea } from "@/components/ui/textarea";
|
|
42
42
|
import { AvatarUploader } from "./settings-profile/avatar-uploader";
|
|
43
43
|
import { SocialLinks } from "./settings-profile/social-links";
|
|
44
44
|
import type {
|