mirror of
https://github.com/nicotsx/zerobyte.git
synced 2026-08-07 05:24:25 -04:00
refactor(startup): ensure entities always use the latest configuration format (#173)
* refactor(startup): ensure entities always use the latest configuration schema * refactor: await config updates to avoid race condition on later mount
This commit is contained in:
10 files changed
+81
-17
No files matched your search
@@ -18,7 +18,7 @@ import {
|
||||
} from "../../../components/ui/form";
|
||||
import { Input } from "../../../components/ui/input";
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../../components/ui/select";
|
||||
import { volumeConfigSchema } from "~/schemas/volumes";
|
||||
import { volumeConfigSchemaBase } from "~/schemas/volumes";
|
||||
import { testConnectionMutation } from "../../../api-client/@tanstack/react-query.gen";
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from "../../../components/ui/tooltip";
|
||||
import { useSystemInfo } from "~/client/hooks/use-system-info";
|
||||
@@ -26,7 +26,7 @@ import { DirectoryForm, NFSForm, SMBForm, WebDAVForm, RcloneForm } from "./volum
|
||||
|
||||
export const formSchema = type({
|
||||
name: "2<=string<=32",
|
||||
}).and(volumeConfigSchema);
|
||||
}).and(volumeConfigSchemaBase);
|
||||
const cleanSchema = type.pipe((d) => formSchema(deepClean(d)));
|
||||
|
||||
export type FormValues = typeof formSchema.inferIn;
|
||||
|
||||
Reference in new issue
Block a user