fix: ts issues
This commit is contained in:
parent
5ad47cce1a
commit
c73f1d5b38
6 changed files with 20 additions and 17 deletions
|
|
@ -172,7 +172,8 @@ export const SnapshotsTable = ({ snapshots, repositoryId, backups }: Props) => {
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<Link
|
<Link
|
||||||
hidden={!backup}
|
hidden={!backup}
|
||||||
to={backup ? `/backups/${backup.id}` : "."}
|
to={backup ? `/backups/$scheduleId` : "."}
|
||||||
|
params={backup ? { scheduleId: String(backup.id) } : {}}
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
className="hover:underline"
|
className="hover:underline"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ import {
|
||||||
FormMessage,
|
FormMessage,
|
||||||
} from "~/client/components/ui/form";
|
} from "~/client/components/ui/form";
|
||||||
import { authMiddleware } from "~/middleware/auth";
|
import { authMiddleware } from "~/middleware/auth";
|
||||||
import type { Route } from "./+types/onboarding";
|
|
||||||
import { AuthLayout } from "~/client/components/auth-layout";
|
import { AuthLayout } from "~/client/components/auth-layout";
|
||||||
import { Input } from "~/client/components/ui/input";
|
import { Input } from "~/client/components/ui/input";
|
||||||
import { Button } from "~/client/components/ui/button";
|
import { Button } from "~/client/components/ui/button";
|
||||||
|
|
@ -22,16 +21,6 @@ import { useNavigate } from "@tanstack/react-router";
|
||||||
|
|
||||||
export const clientMiddleware = [authMiddleware];
|
export const clientMiddleware = [authMiddleware];
|
||||||
|
|
||||||
export function meta(_: Route.MetaArgs) {
|
|
||||||
return [
|
|
||||||
{ title: "Zerobyte - Onboarding" },
|
|
||||||
{
|
|
||||||
name: "description",
|
|
||||||
content: "Welcome to Zerobyte. Create your admin account to get started.",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
const onboardingSchema = type({
|
const onboardingSchema = type({
|
||||||
username: type("2<=string<=30").pipe((str) => str.trim().toLowerCase()),
|
username: type("2<=string<=30").pipe((str) => str.trim().toLowerCase()),
|
||||||
email: type("string.email").pipe((str) => str.trim().toLowerCase()),
|
email: type("string.email").pipe((str) => str.trim().toLowerCase()),
|
||||||
|
|
|
||||||
|
|
@ -95,10 +95,11 @@ export const SnapshotFileBrowser = (props: Props) => {
|
||||||
</div>
|
</div>
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<Link
|
<Link
|
||||||
to={
|
to={backupId ? "/backups/$backupId/$snapshotId/restore" : "/repositories/$repoId/$snapId/restore"}
|
||||||
|
params={
|
||||||
backupId
|
backupId
|
||||||
? `/backups/${backupId}/${snapshot.short_id}/restore`
|
? { backupId, snapshotId: snapshot.short_id }
|
||||||
: `/repositories/${repositoryId}/${snapshot.short_id}/restore`
|
: { repoId: repositoryId, snapId: snapshot.short_id }
|
||||||
}
|
}
|
||||||
className={buttonVariants({ variant: "primary", size: "sm" })}
|
className={buttonVariants({ variant: "primary", size: "sm" })}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,11 @@ export function SnapshotDetailsPage({ repositoryId, snapshotId }: { repositoryId
|
||||||
<div>
|
<div>
|
||||||
<span className="text-muted-foreground">Backup Schedule:</span>
|
<span className="text-muted-foreground">Backup Schedule:</span>
|
||||||
<p>
|
<p>
|
||||||
<Link to={`/backups/$backupScheduleId`} className="text-primary hover:underline">
|
<Link
|
||||||
|
to="/backups/$scheduleId"
|
||||||
|
className="text-primary hover:underline"
|
||||||
|
params={{ scheduleId: backupSchedule?.shortId || "" }}
|
||||||
|
>
|
||||||
{backupSchedule?.name}
|
{backupSchedule?.name}
|
||||||
</Link>
|
</Link>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import {
|
||||||
import { VolumeIcon } from "~/client/components/volume-icon";
|
import { VolumeIcon } from "~/client/components/volume-icon";
|
||||||
import { parseError } from "~/client/lib/errors";
|
import { parseError } from "~/client/lib/errors";
|
||||||
import { cn } from "~/client/lib/utils";
|
import { cn } from "~/client/lib/utils";
|
||||||
import type { Route } from "./+types/volume-details";
|
|
||||||
import { VolumeInfoTabContent } from "../tabs/info";
|
import { VolumeInfoTabContent } from "../tabs/info";
|
||||||
import { FilesTabContent } from "../tabs/files";
|
import { FilesTabContent } from "../tabs/files";
|
||||||
import type { VolumeStatus } from "~/client/lib/types";
|
import type { VolumeStatus } from "~/client/lib/types";
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,13 @@ import { OnboardingPage } from "~/client/modules/auth/routes/onboarding";
|
||||||
|
|
||||||
export const Route = createFileRoute("/(auth)/onboarding")({
|
export const Route = createFileRoute("/(auth)/onboarding")({
|
||||||
component: OnboardingPage,
|
component: OnboardingPage,
|
||||||
|
head: () => ({
|
||||||
|
meta: [
|
||||||
|
{ title: "Zerobyte - Onboarding" },
|
||||||
|
{
|
||||||
|
name: "description",
|
||||||
|
content: "Welcome to Zerobyte. Create your admin account to get started.",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue