Add setup page componant

This commit is contained in:
Zoe Roux
2024-05-26 02:05:23 +02:00
parent db2204258a
commit 97e3257aee
7 changed files with 93 additions and 15 deletions
@@ -33,6 +33,12 @@ export const OidcInfoP = z.object({
logoUrl: z.string().nullable(),
});
export enum SetupStep {
MissingAdminAccount = "MissingAdminAccount",
NoVideoFound = "NoVideoFound",
Done = "Done",
}
export const ServerInfoP = z
.object({
/*
@@ -51,6 +57,10 @@ export const ServerInfoP = z
* The list of oidc providers configured for this instance of kyoo.
*/
oidc: z.record(z.string(), OidcInfoP),
/*
* Check if kyoo's setup is finished.
*/
setupStatus: z.nativeEnum(SetupStep),
})
.transform((x) => {
const baseUrl = Platform.OS === "web" ? x.publicUrl : "kyoo://";