aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/admin
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/components/admin')
-rw-r--r--apps/web/components/admin/AddUserDialog.tsx2
-rw-r--r--apps/web/components/admin/AdminNotices.tsx3
-rw-r--r--apps/web/components/admin/BackgroundJobs.tsx3
-rw-r--r--apps/web/components/admin/BasicStats.tsx3
-rw-r--r--apps/web/components/admin/BookmarkDebugger.tsx2
-rw-r--r--apps/web/components/admin/CreateInviteDialog.tsx3
-rw-r--r--apps/web/components/admin/InvitesList.tsx3
-rw-r--r--apps/web/components/admin/ResetPasswordDialog.tsx3
-rw-r--r--apps/web/components/admin/ServiceConnections.tsx3
-rw-r--r--apps/web/components/admin/UpdateUserDialog.tsx2
-rw-r--r--apps/web/components/admin/UserList.tsx3
11 files changed, 19 insertions, 11 deletions
diff --git a/apps/web/components/admin/AddUserDialog.tsx b/apps/web/components/admin/AddUserDialog.tsx
index 2e29c6da..b5843eab 100644
--- a/apps/web/components/admin/AddUserDialog.tsx
+++ b/apps/web/components/admin/AddUserDialog.tsx
@@ -27,13 +27,13 @@ import {
SelectValue,
} from "@/components/ui/select";
import { toast } from "@/components/ui/sonner";
-import { useTRPC } from "@/lib/trpc";
import { zodResolver } from "@hookform/resolvers/zod";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { TRPCClientError } from "@trpc/client";
import { useForm } from "react-hook-form";
import { z } from "zod";
+import { useTRPC } from "@karakeep/shared-react/trpc";
import { zAdminCreateUserSchema } from "@karakeep/shared/types/admin";
type AdminCreateUserSchema = z.infer<typeof zAdminCreateUserSchema>;
diff --git a/apps/web/components/admin/AdminNotices.tsx b/apps/web/components/admin/AdminNotices.tsx
index e9d9a692..76c3df04 100644
--- a/apps/web/components/admin/AdminNotices.tsx
+++ b/apps/web/components/admin/AdminNotices.tsx
@@ -2,10 +2,11 @@
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import { Badge } from "@/components/ui/badge";
-import { useTRPC } from "@/lib/trpc";
import { useQuery } from "@tanstack/react-query";
import { AlertCircle } from "lucide-react";
+import { useTRPC } from "@karakeep/shared-react/trpc";
+
import { AdminCard } from "./AdminCard";
interface AdminNotice {
diff --git a/apps/web/components/admin/BackgroundJobs.tsx b/apps/web/components/admin/BackgroundJobs.tsx
index 3dab3c54..0df34cc4 100644
--- a/apps/web/components/admin/BackgroundJobs.tsx
+++ b/apps/web/components/admin/BackgroundJobs.tsx
@@ -13,7 +13,6 @@ import {
import { Skeleton } from "@/components/ui/skeleton";
import { toast } from "@/components/ui/sonner";
import { useTranslation } from "@/lib/i18n/client";
-import { useTRPC } from "@/lib/trpc";
import { keepPreviousData, useMutation, useQuery } from "@tanstack/react-query";
import {
Activity,
@@ -31,6 +30,8 @@ import {
Webhook,
} from "lucide-react";
+import { useTRPC } from "@karakeep/shared-react/trpc";
+
import { Button } from "../ui/button";
import { AdminCard } from "./AdminCard";
diff --git a/apps/web/components/admin/BasicStats.tsx b/apps/web/components/admin/BasicStats.tsx
index 9c88ba83..ec2b73a9 100644
--- a/apps/web/components/admin/BasicStats.tsx
+++ b/apps/web/components/admin/BasicStats.tsx
@@ -3,9 +3,10 @@
import { AdminCard } from "@/components/admin/AdminCard";
import { useClientConfig } from "@/lib/clientConfig";
import { useTranslation } from "@/lib/i18n/client";
-import { useTRPC } from "@/lib/trpc";
import { useQuery } from "@tanstack/react-query";
+import { useTRPC } from "@karakeep/shared-react/trpc";
+
const REPO_LATEST_RELEASE_API =
"https://api.github.com/repos/karakeep-app/karakeep/releases/latest";
const REPO_RELEASE_PAGE = "https://github.com/karakeep-app/karakeep/releases";
diff --git a/apps/web/components/admin/BookmarkDebugger.tsx b/apps/web/components/admin/BookmarkDebugger.tsx
index 78eb2c85..7e15262f 100644
--- a/apps/web/components/admin/BookmarkDebugger.tsx
+++ b/apps/web/components/admin/BookmarkDebugger.tsx
@@ -8,7 +8,6 @@ import { Button } from "@/components/ui/button";
import InfoTooltip from "@/components/ui/info-tooltip";
import { Input } from "@/components/ui/input";
import { useTranslation } from "@/lib/i18n/client";
-import { useTRPC } from "@/lib/trpc";
import { formatBytes } from "@/lib/utils";
import { useMutation, useQuery } from "@tanstack/react-query";
import { formatDistanceToNow } from "date-fns";
@@ -35,6 +34,7 @@ import {
import { parseAsString, useQueryState } from "nuqs";
import { toast } from "sonner";
+import { useTRPC } from "@karakeep/shared-react/trpc";
import { BookmarkTypes } from "@karakeep/shared/types/bookmarks";
export default function BookmarkDebugger() {
diff --git a/apps/web/components/admin/CreateInviteDialog.tsx b/apps/web/components/admin/CreateInviteDialog.tsx
index c8b6be8c..e9930b1e 100644
--- a/apps/web/components/admin/CreateInviteDialog.tsx
+++ b/apps/web/components/admin/CreateInviteDialog.tsx
@@ -20,13 +20,14 @@ import {
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { toast } from "@/components/ui/sonner";
-import { useTRPC } from "@/lib/trpc";
import { zodResolver } from "@hookform/resolvers/zod";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { TRPCClientError } from "@trpc/client";
import { useForm } from "react-hook-form";
import { z } from "zod";
+import { useTRPC } from "@karakeep/shared-react/trpc";
+
const createInviteSchema = z.object({
email: z.string().email("Please enter a valid email address"),
});
diff --git a/apps/web/components/admin/InvitesList.tsx b/apps/web/components/admin/InvitesList.tsx
index 9d94f0a0..d4dc1793 100644
--- a/apps/web/components/admin/InvitesList.tsx
+++ b/apps/web/components/admin/InvitesList.tsx
@@ -11,7 +11,6 @@ import {
TableHeader,
TableRow,
} from "@/components/ui/table";
-import { useTRPC } from "@/lib/trpc";
import {
useMutation,
useQueryClient,
@@ -20,6 +19,8 @@ import {
import { formatDistanceToNow } from "date-fns";
import { Mail, MailX, UserPlus } from "lucide-react";
+import { useTRPC } from "@karakeep/shared-react/trpc";
+
import ActionConfirmingDialog from "../ui/action-confirming-dialog";
import { AdminCard } from "./AdminCard";
import CreateInviteDialog from "./CreateInviteDialog";
diff --git a/apps/web/components/admin/ResetPasswordDialog.tsx b/apps/web/components/admin/ResetPasswordDialog.tsx
index 59886d54..f195395a 100644
--- a/apps/web/components/admin/ResetPasswordDialog.tsx
+++ b/apps/web/components/admin/ResetPasswordDialog.tsx
@@ -20,13 +20,14 @@ import {
} from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { toast } from "@/components/ui/sonner";
-import { useTRPC } from "@/lib/trpc"; // Adjust the import path as needed
import { zodResolver } from "@hookform/resolvers/zod";
import { useMutation } from "@tanstack/react-query";
import { TRPCClientError } from "@trpc/client";
import { useForm } from "react-hook-form";
import { z } from "zod";
+import { useTRPC } from "@karakeep/shared-react/trpc"; // Adjust the import path as needed
+
import { resetPasswordSchema } from "@karakeep/shared/types/admin";
interface ResetPasswordDialogProps {
diff --git a/apps/web/components/admin/ServiceConnections.tsx b/apps/web/components/admin/ServiceConnections.tsx
index 0509f352..5cdab46a 100644
--- a/apps/web/components/admin/ServiceConnections.tsx
+++ b/apps/web/components/admin/ServiceConnections.tsx
@@ -2,9 +2,10 @@
import { AdminCard } from "@/components/admin/AdminCard";
import { useTranslation } from "@/lib/i18n/client";
-import { useTRPC } from "@/lib/trpc";
import { useQuery } from "@tanstack/react-query";
+import { useTRPC } from "@karakeep/shared-react/trpc";
+
function ConnectionStatus({
label,
configured,
diff --git a/apps/web/components/admin/UpdateUserDialog.tsx b/apps/web/components/admin/UpdateUserDialog.tsx
index aeec9d4e..95ccb6fd 100644
--- a/apps/web/components/admin/UpdateUserDialog.tsx
+++ b/apps/web/components/admin/UpdateUserDialog.tsx
@@ -27,13 +27,13 @@ import {
SelectValue,
} from "@/components/ui/select";
import { toast } from "@/components/ui/sonner";
-import { useTRPC } from "@/lib/trpc";
import { zodResolver } from "@hookform/resolvers/zod";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { TRPCClientError } from "@trpc/client";
import { useForm } from "react-hook-form";
import { z } from "zod";
+import { useTRPC } from "@karakeep/shared-react/trpc";
import { updateUserSchema } from "@karakeep/shared/types/admin";
type UpdateUserSchema = z.infer<typeof updateUserSchema>;
diff --git a/apps/web/components/admin/UserList.tsx b/apps/web/components/admin/UserList.tsx
index 810a945f..6789f66a 100644
--- a/apps/web/components/admin/UserList.tsx
+++ b/apps/web/components/admin/UserList.tsx
@@ -13,7 +13,6 @@ import {
} from "@/components/ui/table";
import { useSession } from "@/lib/auth/client";
import { useTranslation } from "@/lib/i18n/client";
-import { useTRPC } from "@/lib/trpc";
import {
useMutation,
useQueryClient,
@@ -21,6 +20,8 @@ import {
} from "@tanstack/react-query";
import { Check, KeyRound, Pencil, Trash, UserPlus, X } from "lucide-react";
+import { useTRPC } from "@karakeep/shared-react/trpc";
+
import ActionConfirmingDialog from "../ui/action-confirming-dialog";
import AddUserDialog from "./AddUserDialog";
import { AdminCard } from "./AdminCard";