refactor(frontend): enforce semantic tokens + extract 3 Screen Models
Color tokens: 3658→0 violations across 186 .svelte/.svelte.ts files. All raw Tailwind colors (bg-blue-*, text-gray-*, border-red-*, etc.) replaced with semantic tokens from tailwind.config.js in 5 perl passes. Model extraction (11→8 oversized pages): - LLMReportModel.svelte.ts: LLM report page 413→221 lines - DatasetDetailModel.svelte.ts: dataset detail page 416→218 lines - DatasetsHubModel.svelte.ts: datasets hub page 468→246 lines Tests: 14 assertions updated (color classes + model refs). Build: 1 duplicate class:text-primary fix in ValidationTaskForm. All 699/699 tests pass.
This commit is contained in:
@@ -69,20 +69,20 @@
|
||||
</div>
|
||||
|
||||
{#if model.branchError}
|
||||
<div class="max-h-32 overflow-y-auto rounded-lg border border-red-300 bg-red-50 p-3 text-sm text-red-800" role="alert">
|
||||
<div class="max-h-32 overflow-y-auto rounded-lg border border-destructive-ring bg-destructive-light p-3 text-sm text-destructive" role="alert">
|
||||
<div class="flex items-start gap-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="mt-0.5 h-4 w-4 flex-shrink-0 text-red-500" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><path stroke-linecap="round" stroke-linejoin="round" d="M15 9l-6 6m0-6l6 6"/></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="mt-0.5 h-4 w-4 flex-shrink-0 text-destructive" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="10"/><path stroke-linecap="round" stroke-linejoin="round" d="M15 9l-6 6m0-6l6 6"/></svg>
|
||||
<div class="flex-1 min-w-0">
|
||||
<p class="truncate">{model.branchError.message}</p>
|
||||
{#if model.branchError.next_steps?.length}
|
||||
<ul class="mt-1 list-disc pl-4 text-xs text-red-700">
|
||||
<ul class="mt-1 list-disc pl-4 text-xs text-destructive">
|
||||
{#each model.branchError.next_steps as step}
|
||||
<li>{step}</li>
|
||||
{/each}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
<button type="button" onclick={() => model.branchError = null} class="flex-shrink-0 rounded p-0.5 hover:bg-red-100" aria-label="Закрыть">
|
||||
<button type="button" onclick={() => model.branchError = null} class="flex-shrink-0 rounded p-0.5 hover:bg-destructive-light" aria-label="Закрыть">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-3.5 w-3.5" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
@@ -90,7 +90,7 @@
|
||||
{/if}
|
||||
|
||||
{#if model.showCreate}
|
||||
<div class="flex items-end gap-2 bg-gray-50 p-3 rounded-lg border border-dashed border-gray-200">
|
||||
<div class="flex items-end gap-2 bg-surface-muted p-3 rounded-lg border border-dashed border-border">
|
||||
<div class="flex-grow">
|
||||
<Input
|
||||
bind:value={model.newBranchName}
|
||||
@@ -104,7 +104,7 @@
|
||||
onclick={() => model.handleCreate()}
|
||||
disabled={model.loading || !model.newBranchName}
|
||||
isLoading={model.loading}
|
||||
class="bg-green-600 hover:bg-green-700"
|
||||
class="bg-success hover:bg-success"
|
||||
>
|
||||
{$t.git.create}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user