refactor: update tsconfig.json formatting and enhance rollback settings component with registry link

This commit is contained in:
Mauricio Siu
2025-12-06 12:38:51 -06:00
parent 9e8efab909
commit 2c1dfe9377
2 changed files with 78 additions and 56 deletions
@@ -1,4 +1,5 @@
import { zodResolver } from "@hookform/resolvers/zod"; import { zodResolver } from "@hookform/resolvers/zod";
import Link from "next/link";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { useForm } from "react-hook-form"; import { useForm } from "react-hook-form";
import { toast } from "sonner"; import { toast } from "sonner";
@@ -22,7 +23,6 @@ import {
FormLabel, FormLabel,
FormMessage, FormMessage,
} from "@/components/ui/form"; } from "@/components/ui/form";
import { Switch } from "@/components/ui/switch";
import { import {
Select, Select,
SelectContent, SelectContent,
@@ -32,6 +32,7 @@ import {
SelectTrigger, SelectTrigger,
SelectValue, SelectValue,
} from "@/components/ui/select"; } from "@/components/ui/select";
import { Switch } from "@/components/ui/switch";
import { api } from "@/utils/api"; import { api } from "@/utils/api";
const formSchema = z const formSchema = z
@@ -189,9 +190,22 @@ export const ShowRollbackSettings = ({ applicationId, children }: Props) => {
</SelectGroup> </SelectGroup>
</SelectContent> </SelectContent>
</Select> </Select>
<FormDescription> {!registries || registries.length === 0 ? (
Select a registry where rollback images will be stored. <FormDescription className="text-amber-600 dark:text-amber-500">
</FormDescription> No registries available. Please{" "}
<Link
href="/dashboard/settings/registry"
className="underline font-medium hover:text-amber-700 dark:hover:text-amber-400"
>
configure a registry
</Link>{" "}
first to enable rollbacks.
</FormDescription>
) : (
<FormDescription>
Select a registry where rollback images will be stored.
</FormDescription>
)}
<FormMessage /> <FormMessage />
</FormItem> </FormItem>
)} )}
+60 -52
View File
@@ -1,54 +1,62 @@
{ {
"compilerOptions": { "compilerOptions": {
/* Base Options: */ /* Base Options: */
"esModuleInterop": true, "esModuleInterop": true,
"skipLibCheck": true, "skipLibCheck": true,
"target": "es2022", "target": "es2022",
"allowJs": true, "allowJs": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"moduleDetection": "force", "moduleDetection": "force",
"isolatedModules": true, "isolatedModules": true,
/* Strictness */
/* Strictness */ "strict": true,
"strict": true, "noUncheckedIndexedAccess": true,
"noUncheckedIndexedAccess": true, "checkJs": true,
"checkJs": true, /* Bundled projects */
"lib": [
/* Bundled projects */ "dom",
"lib": ["dom", "dom.iterable", "ES2022"], "dom.iterable",
"noEmit": true, "ES2022"
"module": "ESNext", ],
"moduleResolution": "Bundler", "noEmit": true,
"jsx": "preserve", "module": "ESNext",
"plugins": [{ "name": "next" }], "moduleResolution": "Bundler",
"incremental": true, "jsx": "react-jsx",
"plugins": [
/* Path Aliases */ {
"baseUrl": ".", "name": "next"
"paths": { }
"@/*": ["./*"], ],
"@dokploy/server/*": ["../../packages/server/src/*"] "incremental": true,
} /* Path Aliases */
}, "baseUrl": ".",
"paths": {
"include": [ "@/*": [
"next-env.d.ts", "./*"
"**/*.ts", ],
"**/*.tsx", "@dokploy/server/*": [
"**/*.cjs", "../../packages/server/src/*"
"**/*.js", ]
".next/types/**/*.ts", }
"env.js", },
"next.config.mjs", "include": [
"next-i18next.config.mjs" "next-env.d.ts",
], "**/*.ts",
"exclude": [ "**/*.tsx",
"node_modules", "**/*.cjs",
"dokploy", "**/*.js",
"config", ".next/types/**/*.ts",
"dist", "env.js",
"webpack.config.server.js", "next.config.mjs",
"migration.ts", "next-i18next.config.mjs"
"setup.ts" ],
] "exclude": [
"node_modules",
"dokploy",
"config",
"dist",
"webpack.config.server.js",
"migration.ts",
"setup.ts"
]
} }