update all

This commit is contained in:
Lokowitz
2025-05-25 19:01:20 +00:00
parent ea24759bb3
commit f07e8d08c3
63 changed files with 380 additions and 381 deletions

View File

@@ -15,7 +15,7 @@ import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
import { useEnvContext } from "@app/hooks/useEnvContext";
import CopyToClipboard from "@app/components/CopyToClipboard";
import CopyTextBox from "@app/components/CopyTextBox";
import { useTranslations } from 'next-intl';
import { useTranslations } from "next-intl";
interface AccessTokenSectionProps {
token: string;

View File

@@ -66,7 +66,7 @@ import {
CollapsibleTrigger
} from "@app/components/ui/collapsible";
import AccessTokenSection from "./AccessTokenUsage";
import { useTranslations } from 'next-intl';
import { useTranslations } from "next-intl";
type FormProps = {
open: boolean;
@@ -74,15 +74,6 @@ type FormProps = {
onCreated?: (result: ShareLinkRow) => void;
};
const formSchema = z.object({
resourceId: z.number({ message: "Please select a resource" }),
resourceName: z.string(),
resourceUrl: z.string(),
timeUnit: z.string(),
timeValue: z.coerce.number().int().positive().min(1),
title: z.string().optional()
});
export default function CreateShareLinkForm({
open,
setOpen,
@@ -100,6 +91,7 @@ export default function CreateShareLinkForm({
const [neverExpire, setNeverExpire] = useState(false);
const [isOpen, setIsOpen] = useState(false);
const t = useTranslations();
const [resources, setResources] = useState<
{
@@ -110,7 +102,14 @@ export default function CreateShareLinkForm({
}[]
>([]);
const t = useTranslations();
const formSchema = z.object({
resourceId: z.number({ message: t('shareErrorSelectResource') }),
resourceName: z.string(),
resourceUrl: z.string(),
timeUnit: z.string(),
timeValue: z.coerce.number().int().positive().min(1),
title: z.string().optional()
});
const timeUnits = [
{ unit: "minutes", name: t('minutes') },

View File

@@ -4,7 +4,7 @@ import {
ColumnDef,
} from "@tanstack/react-table";
import { DataTable } from "@app/components/ui/data-table";
import { useTranslations } from 'next-intl';
import { useTranslations } from "next-intl";
interface DataTableProps<TData, TValue> {
columns: ColumnDef<TData, TValue>[];

View File

@@ -33,7 +33,7 @@ import { ListAccessTokensResponse } from "@server/routers/accessToken";
import moment from "moment";
import CreateShareLinkForm from "./CreateShareLinkForm";
import { constructShareLink } from "@app/lib/shareLinks";
import { useTranslations } from 'next-intl';
import { useTranslations } from "next-intl";
export type ShareLinkRow = {
accessTokenId: string;

View File

@@ -9,7 +9,7 @@ import OrgProvider from "@app/providers/OrgProvider";
import { ListAccessTokensResponse } from "@server/routers/accessToken";
import ShareLinksTable, { ShareLinkRow } from "./ShareLinksTable";
import ShareableLinksSplash from "./ShareLinksSplash";
import { getTranslations } from 'next-intl/server';
import { getTranslations } from "next-intl/server";
type ShareLinksPageProps = {
params: Promise<{ orgId: string }>;