diff --git a/app/package.json b/app/package.json index 002ae21..087cb80 100644 --- a/app/package.json +++ b/app/package.json @@ -63,12 +63,14 @@ "@aws-sdk/client-s3": "^3.613.0", "@bluwy/giget-core": "^0.1.2", "@dagrejs/dagre": "^1.1.4", + "@mantine/modals": "^7.13.4", + "@mantine/notifications": "^7.13.4", "@hono/typebox-validator": "^0.2.6", "@hono/vite-dev-server": "^0.17.0", "@hono/zod-validator": "^0.4.1", "@hookform/resolvers": "^3.9.1", "@libsql/kysely-libsql": "^0.4.1", - "@rjsf/core": "^5.22.2", + "@rjsf/core": "5.22.2", "@tabler/icons-react": "3.18.0", "@types/node": "^22.10.0", "@types/react": "^18.3.12", diff --git a/app/src/ui/client/schema/auth/use-bknd-auth.ts b/app/src/ui/client/schema/auth/use-bknd-auth.ts index a3bb003..2d1ee43 100644 --- a/app/src/ui/client/schema/auth/use-bknd-auth.ts +++ b/app/src/ui/client/schema/auth/use-bknd-auth.ts @@ -1,9 +1,16 @@ +import type { AppAuthSchema } from "auth/auth-schema"; import { useBknd } from "ui/client/bknd"; export function useBkndAuth() { const { config, schema, actions: bkndActions } = useBknd(); const actions = { + config: { + set: async (data: Partial) => { + console.log("--set", data); + return await bkndActions.set("auth", data, true); + } + }, roles: { add: async (name: string, data: any = {}) => { console.log("add role", name, data); diff --git a/app/src/ui/components/display/Alert.tsx b/app/src/ui/components/display/Alert.tsx index ee5aad1..8df3074 100644 --- a/app/src/ui/components/display/Alert.tsx +++ b/app/src/ui/components/display/Alert.tsx @@ -25,8 +25,10 @@ const Base: React.FC = ({ className )} > - {title && {title}:} - {message || children} +

+ {title && {title}: } + {message || children} +

) : null; diff --git a/app/src/ui/components/form/json-schema-form/Field.tsx b/app/src/ui/components/form/json-schema-form/Field.tsx index bd225ae..68435d0 100644 --- a/app/src/ui/components/form/json-schema-form/Field.tsx +++ b/app/src/ui/components/form/json-schema-form/Field.tsx @@ -3,20 +3,16 @@ import type { ChangeEvent, ComponentPropsWithoutRef } from "react"; import * as Formy from "ui/components/form/Formy"; import { useEvent } from "ui/hooks/use-event"; import { ArrayField } from "./ArrayField"; -import { FieldWrapper } from "./FieldWrapper"; +import { FieldWrapper, type FieldwrapperProps } from "./FieldWrapper"; import { useDerivedFieldContext, useFormValue } from "./Form"; import { ObjectField } from "./ObjectField"; import { coerce, isType, isTypeSchema } from "./utils"; export type FieldProps = { - name: string; - schema?: JsonSchema; onChange?: (e: ChangeEvent) => void; - label?: string | false; - hidden?: boolean; -}; +} & Omit; -export const Field = ({ name, schema: _schema, onChange, label: _label, hidden }: FieldProps) => { +export const Field = ({ name, schema: _schema, onChange, ...props }: FieldProps) => { const { path, setValue, required, ...ctx } = useDerivedFieldContext(name, _schema); const schema = _schema ?? ctx.schema; if (!isTypeSchema(schema)) @@ -46,7 +42,7 @@ export const Field = ({ name, schema: _schema, onChange, label: _label, hidden } }); return ( -