refactor(frontend): unify Tailwind classes — replace hardcoded colors with semantic design tokens
- Replace all bg-blue-600/hover:bg-blue-700 → bg-primary/hover:bg-primary-hover - Replace all bg-red-600/hover:bg-red-700 → bg-destructive/hover:bg-destructive-hover - Replace all focus:ring-blue-500 → focus-visible:ring-primary-ring - Replace all text-blue-600 → text-primary on interactive elements - Replace all bg-blue-50 → bg-primary-light on UI surfaces - Replace all bg-red-50 → bg-destructive-light on error surfaces - Replace all border-blue-200/300 → border-primary-ring - Replace all border-red-200 → border-destructive-light - Replace peer-checked:bg-blue-600 → peer-checked:bg-primary (toggles) - Replace focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 patterns - Keep status badge patterns (bg-*-100 text-*-700) and hover:bg-blue-50 intact 82 files changed, ~400 changes. Build passes.
This commit is contained in:
@@ -158,7 +158,7 @@
|
||||
<button
|
||||
onclick={handleGenerateMessage}
|
||||
disabled={generatingMessage || loading}
|
||||
class="text-xs text-blue-600 hover:text-blue-800 disabled:opacity-50 flex items-center"
|
||||
class="text-xs text-primary hover:text-blue-800 disabled:opacity-50 flex items-center"
|
||||
>
|
||||
{#if generatingMessage}
|
||||
<span class="animate-spin mr-1">↻</span> {$t.mapper?.generating}
|
||||
@@ -169,7 +169,7 @@
|
||||
</div>
|
||||
<textarea
|
||||
bind:value={message}
|
||||
class="w-full border rounded p-2 h-32 focus:ring-2 focus:ring-blue-500 outline-none resize-none"
|
||||
class="w-full border rounded p-2 h-32 focus-visible:ring-2 focus-visible:ring-primary-ring outline-none resize-none"
|
||||
placeholder={$t.git?.describe_changes}
|
||||
></textarea>
|
||||
</div>
|
||||
@@ -202,7 +202,7 @@
|
||||
{/each}
|
||||
{#each status.untracked_files as file}
|
||||
<li
|
||||
class="text-blue-600 flex items-center"
|
||||
class="text-primary flex items-center"
|
||||
title={$t.git?.untracked}
|
||||
>
|
||||
<span class="mr-2">?</span>
|
||||
@@ -258,7 +258,7 @@
|
||||
loading ||
|
||||
(!status?.is_dirty &&
|
||||
status?.staged_files?.length === 0)}
|
||||
class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700 disabled:opacity-50"
|
||||
class="px-4 py-2 bg-primary text-white rounded hover:bg-primary-hover disabled:opacity-50"
|
||||
>
|
||||
{committing ? $t.git?.committing : $t.git?.commit}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user