feat(desktop): add recently closed projects to home (#34926)

This commit is contained in:
usrnk1 2026-07-03 09:52:40 +02:00 committed by GitHub
commit bf58fae51f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 271 additions and 17 deletions

View file

@ -81,6 +81,13 @@
--project-avatar-border: var(--v2-avatar-border-gray);
}
[data-slot="project-avatar-surface"][data-variant="outline"] {
--project-avatar-bg: var(--v2-background-bg-base);
--project-avatar-border: var(--v2-border-border-strong);
color: var(--v2-text-text-muted);
text-shadow: none;
}
[data-slot="project-avatar-surface"][data-has-image] {
background: var(--project-avatar-bg);
}

View file

@ -11,6 +11,7 @@ Saturated 16px project avatar with color variants and optional unread dot.
### Variants
- Color: orange, yellow, cyan, green, red, pink, blue, purple, gray.
- Outline: neutral, muted style for de-emphasized projects (e.g. recently closed).
- Image vs initial content state.
- Unread dot with corner mask when \`unread\` is set.
@ -33,7 +34,7 @@ export default {
argTypes: {
variant: {
control: "select",
options: [...PROJECT_AVATAR_VARIANTS],
options: [...PROJECT_AVATAR_VARIANTS, "outline"],
},
},
args: {
@ -62,6 +63,13 @@ export const AllVariants = {
),
}
export const Outline = {
args: {
fallback: "O",
variant: "outline",
},
}
export const Unread = {
args: {
fallback: "O",

View file

@ -26,10 +26,13 @@ export const PROJECT_AVATAR_VARIANTS = [
export type ProjectAvatarVariant = (typeof PROJECT_AVATAR_VARIANTS)[number]
// "outline" is a neutral, muted style (e.g. recently closed projects) and is not part of the color rotation.
export type ProjectAvatarStyle = ProjectAvatarVariant | "outline"
export interface ProjectAvatarProps extends ComponentProps<"div"> {
fallback: string
src?: string
variant?: ProjectAvatarVariant
variant?: ProjectAvatarStyle
unread?: boolean
}