feat(patch): implement CreateFileDialog and integrate file creation in PatchEditor

- Added CreateFileDialog component for creating new files within the dashboard.
- Integrated file creation functionality into the PatchEditor, allowing users to create files directly from the directory structure.
- Enhanced user experience with form validation and success/error notifications during file creation.
- Updated ShowPatches to display file types with badges for better clarity on patch operations.
This commit is contained in:
Mauricio Siu
2026-02-17 02:28:20 -06:00
parent 9eeac50642
commit 8aba7b08cf
6 changed files with 395 additions and 40 deletions

View File

@@ -56,6 +56,7 @@ export const patchRelations = relations(patch, ({ one }) => ({
const createSchema = createInsertSchema(patch, {
filePath: z.string().min(1),
content: z.string(),
type: z.enum(["create", "update", "delete"]).optional(),
enabled: z.boolean().optional(),
applicationId: z.string().optional(),
composeId: z.string().optional(),
@@ -64,6 +65,7 @@ const createSchema = createInsertSchema(patch, {
export const apiCreatePatch = createSchema.pick({
filePath: true,
content: true,
type: true,
enabled: true,
applicationId: true,
composeId: true,