mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
core: fix project icon update to preserve existing icon properties
Some checks failed
Some checks failed
This commit is contained in:
parent
2ad99713f3
commit
7439a40b00
1 changed files with 3 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue