mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 05:43:55 +00:00
core: fix project icon update to preserve existing icon properties
This commit is contained in:
parent
2ad99713f3
commit
7439a40b00
@ -22,8 +22,8 @@ export namespace Project {
|
||||
name: z.string().optional(),
|
||||
icon: z
|
||||
.object({
|
||||
url: z.string(),
|
||||
color: z.string(),
|
||||
url: z.string().optional(),
|
||||
color: z.string().optional(),
|
||||
})
|
||||
.optional(),
|
||||
time: z.object({
|
||||
@ -135,8 +135,8 @@ export namespace Project {
|
||||
const url = `data:${mime};base64,${base64}`
|
||||
await Storage.update<Info>(["project", input.id], (draft) => {
|
||||
draft.icon = {
|
||||
...draft.icon,
|
||||
url,
|
||||
color: draft.icon?.color ?? "#000000",
|
||||
}
|
||||
})
|
||||
return
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user