feat: add icon and color support to project persistence (#439)
This commit is contained in:
committed by
GitHub
parent
4d71bb27eb
commit
4915e5f1fb
@@ -116,6 +116,12 @@ const sanitizeProjects = (value: unknown): ProjectEntry[] => {
|
||||
if (typeof candidate.label === 'string' && candidate.label.trim().length > 0) {
|
||||
project.label = candidate.label.trim();
|
||||
}
|
||||
if (typeof candidate.icon === 'string' && candidate.icon.trim().length > 0) {
|
||||
project.icon = candidate.icon.trim();
|
||||
}
|
||||
if (typeof candidate.color === 'string' && candidate.color.trim().length > 0) {
|
||||
project.color = candidate.color.trim();
|
||||
}
|
||||
if (typeof candidate.addedAt === 'number' && Number.isFinite(candidate.addedAt) && candidate.addedAt >= 0) {
|
||||
project.addedAt = candidate.addedAt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user