Skip to content

armgit / mimik

Public Imported from GitHub
0

🎬 A browser extension and desktop app that turns your clicks into step-by-step guides with annotated screenshots πŸ“–

feat(ui): give the placeholder mascot a muted looking-away pose

Luis Ortiz258a9f10beed
diff --git a/src/ui/shared/ImagePlaceholder.tsx b/src/ui/shared/ImagePlaceholder.tsx
index aa460ad..921c3e1 100644
--- a/src/ui/shared/ImagePlaceholder.tsx
+++ b/src/ui/shared/ImagePlaceholder.tsx
@@ -13,10 +13,10 @@ const DEFAULT_RATIO = 16 / 10;
export default function ImagePlaceholder({ label, ratio = DEFAULT_RATIO, className = '' }: ImagePlaceholderProps) {
return (
<div
- className={`flex flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border bg-secondary/60 ${className}`}
+ className={`flex flex-col items-center justify-center gap-2 rounded-lg border border-dashed border-border bg-secondary/60 text-muted-foreground ${className}`}
style={{ aspectRatio: ratio }}
>
- <MascotIcon size={64} />
+ <MascotIcon size={64} pose="lookaway" tone="muted" />
<span className="text-[12px] font-semibold text-muted-foreground">{label}</span>
</div>
);
diff --git a/src/ui/shared/MascotIcon.tsx b/src/ui/shared/MascotIcon.tsx
index 8fdd311..556179a 100644
--- a/src/ui/shared/MascotIcon.tsx
+++ b/src/ui/shared/MascotIcon.tsx
@@ -1,4 +1,16 @@
-export default function MascotIcon({ size = 22 }: { size?: number }) {
+interface MascotIconProps {
+ size?: number;
+ pose?: 'happy' | 'lookaway';
+ tone?: 'brand' | 'muted';
+}
+
+export default function MascotIcon({ size = 22, pose = 'happy', tone = 'brand' }: MascotIconProps) {
+ const muted = tone === 'muted';
+ const body = muted ? 'fill-current opacity-55' : 'fill-primary';
+ const crown = muted ? 'fill-current opacity-80' : 'fill-violet-mid';
+ const seam = muted ? 'fill-current opacity-25' : 'fill-lavender';
+ const feature = muted ? 'fill-card stroke-card' : 'fill-lavender stroke-lavender';
+
return (
<svg
xmlns="http://www.w3.org/2000/svg"
@@ -6,31 +18,37 @@ export default function MascotIcon({ size = 22 }: { size?: number }) {
width={size}
height={Math.round((size * 120) / 160)}
className="block shrink-0"
+ aria-hidden="true"
>
<defs>
- <clipPath id="fds">
+ <clipPath id="mascot-crown-split">
<path d="M30 95 L170 60 L170 95 Z" />
</clipPath>
</defs>
- <rect x="30" y="95" width="140" height="68" rx="5" className="fill-primary" />
- <path d="M30 95 L30 80 Q30 60, 100 60 Q170 60, 170 80 L170 95 Z" className="fill-violet-mid" />
- <path d="M30 95 L30 80 Q30 60, 100 60 Q170 60, 170 80 L170 95 Z" className="fill-accent" clipPath="url(#fds)" />
- <rect x="30" y="93" width="140" height="3" className="fill-lavender" />
- <path d="M68 122 Q76 112 84 122" className="stroke-lavender" strokeWidth="5" fill="none" strokeLinecap="round" />
- <path
- d="M116 122 Q124 112 132 122"
- className="stroke-lavender"
- strokeWidth="5"
- fill="none"
- strokeLinecap="round"
- />
- <path
- d="M84 138 Q100 148 116 138"
- className="stroke-lavender"
- strokeWidth="3.5"
- fill="none"
- strokeLinecap="round"
- />
+ <rect x="30" y="95" width="140" height="68" rx="5" className={body} />
+ <path d="M30 95 L30 80 Q30 60, 100 60 Q170 60, 170 80 L170 95 Z" className={crown} />
+ {!muted && (
+ <path
+ d="M30 95 L30 80 Q30 60, 100 60 Q170 60, 170 80 L170 95 Z"
+ className="fill-accent"
+ clipPath="url(#mascot-crown-split)"
+ />
+ )}
+ <rect x="30" y="93" width="140" height="3" className={seam} />
+
+ {pose === 'lookaway' ? (
+ <>
+ <circle cx="80" cy="124" r="5" className={feature} strokeWidth="0" />
+ <circle cx="128" cy="124" r="5" className={feature} strokeWidth="0" />
+ <path d="M86 141 Q100 136 116 141" className={feature} strokeWidth="3.5" fill="none" strokeLinecap="round" />
+ </>
+ ) : (
+ <>
+ <path d="M68 122 Q76 112 84 122" className={feature} strokeWidth="5" fill="none" strokeLinecap="round" />
+ <path d="M116 122 Q124 112 132 122" className={feature} strokeWidth="5" fill="none" strokeLinecap="round" />
+ <path d="M84 138 Q100 148 116 138" className={feature} strokeWidth="3.5" fill="none" strokeLinecap="round" />
+ </>
+ )}
</svg>
);
}