feat: add color to project

This commit is contained in:
Adam
2025-12-09 13:29:59 -06:00
parent c944d19c3b
commit 9a34965432
5 changed files with 1371 additions and 268 deletions

View File

@@ -18,6 +18,7 @@ export namespace Project {
vcs: z.literal("git").optional(),
name: z.string().optional(),
icon: z.string().optional(),
color: z.string().optional(),
time: z.object({
created: z.number(),
updated: z.number().optional(),
@@ -134,11 +135,13 @@ export namespace Project {
projectID: z.string(),
name: z.string().optional(),
icon: z.string().optional(),
color: z.string().optional(),
}),
async (input) => {
return await Storage.update<Info>(["project", input.projectID], (draft) => {
if (input.name !== undefined) draft.name = input.name
if (input.icon !== undefined) draft.icon = input.icon
if (input.color !== undefined) draft.color = input.color
draft.time.updated = Date.now()
})
},

View File

@@ -54,7 +54,7 @@ export const ProjectRoute = new Hono()
"/:projectID",
describeRoute({
summary: "Update project",
description: "Update project properties such as name and icon.",
description: "Update project properties such as name, icon and color.",
operationId: "project.update",
responses: {
200: {