Polish pass 4 — remove remaining hard-coded colors and inline styles

- Fix bg-white toggle thumbs in V4VSettings and V4VIndicator
- Replace hard-coded amber nudge colors with theme 'warning' token
- Remove redundant gridTemplateRows and move aspectRatio to Tailwind
- Replace MarkdownToolbar inline font styles with conditional classes
This commit is contained in:
Jure
2026-04-09 15:47:12 +02:00
parent 30147afc87
commit 3eb6968de0
4 changed files with 6 additions and 9 deletions
+1 -2
View File
@@ -180,8 +180,7 @@ export function MarkdownToolbar({ textareaRef, content, setContent, setUploading
key={action}
onClick={() => handleClick(action)}
title={title}
className="px-2 py-0.5 text-[11px] text-text-muted hover:text-text hover:bg-bg-hover transition-colors rounded-sm"
style={{ fontWeight: bold ? "bold" : undefined, fontStyle: italic ? "italic" : undefined }}
className={`px-2 py-0.5 text-[11px] text-text-muted hover:text-text hover:bg-bg-hover transition-colors rounded-sm ${bold ? "font-bold" : ""} ${italic ? "italic" : ""}`}
>
{label}
</button>
+2 -3
View File
@@ -53,13 +53,12 @@ function ImageGrid({ images, onImageClick }: { images: string[]; onImageClick: (
if (count === 3) {
return (
<div className="mt-2 grid grid-cols-2 grid-rows-2 gap-1" style={{ gridTemplateRows: "1fr 1fr" }}>
<div className="mt-2 grid grid-cols-2 grid-rows-2 gap-1">
<img
src={visible[0]}
alt="Posted image"
loading="lazy"
className="w-full h-full rounded-sm object-cover bg-bg-raised border border-border cursor-zoom-in row-span-2"
style={{ aspectRatio: "3/4" }}
className="w-full h-full rounded-sm object-cover bg-bg-raised border border-border cursor-zoom-in row-span-2 aspect-[3/4]"
onClick={(e) => { e.stopPropagation(); onImageClick(0); }}
onError={(e) => { (e.target as HTMLImageElement).style.display = "none"; }}
/>
+2 -3
View File
@@ -137,9 +137,8 @@ export function V4VIndicator() {
{/* Brief nudge when V4V episode starts — once per episode per session */}
{showNudge && (
<div
className="absolute bottom-full right-0 mb-2 px-3 py-2 bg-amber-500/15 border border-amber-500/30 rounded-sm text-[10px] text-amber-300 whitespace-nowrap z-50 animate-fade-in"
className="absolute bottom-full right-0 mb-2 px-3 py-2 bg-warning/15 border border-warning/30 rounded-sm text-[10px] text-warning whitespace-nowrap z-50 animate-fade-in cursor-pointer"
onClick={() => { setShowNudge(false); setOpen(true); }}
style={{ cursor: "pointer" }}
>
This episode supports V4V stream sats to the creators
</div>
@@ -181,7 +180,7 @@ export function V4VIndicator() {
}`}
>
<span
className={`absolute top-0.5 w-3 h-3 rounded-full bg-white transition-transform ${
className={`absolute top-0.5 w-3 h-3 rounded-full bg-bg transition-transform ${
v4vStreaming ? "left-4" : "left-0.5"
}`}
/>
+1 -1
View File
@@ -35,7 +35,7 @@ export function V4VSettings() {
}`}
>
<span
className={`absolute top-0.5 w-4 h-4 rounded-full bg-white transition-transform ${
className={`absolute top-0.5 w-4 h-4 rounded-full bg-bg transition-transform ${
autoEnabled ? "left-4.5" : "left-0.5"
}`}
/>