feat(web): refonte visuelle « Emerald » (thème clair/sombre, polices, tokens)
Adopte le langage visuel du design system Emerald dans l'IDE web : neutres zinc + accent emerald, polices auto-hébergées Inter + JetBrains Mono, radii/pills mono, points de statut, motif terminal, halo/grain. Refonte purement visuelle et additive (layout, routing, stores, protocole inchangés). - style.css : défauts sombres dans @theme + override clair sous html[data-theme=light] ; accent scindé (bright #34d399 / solid #059669 / hover) ; tokens border-soft/info/warn/danger/coffee ; idiomes globaux (focus/selection accent, scrollbars fines, jl-pulse/jl-blink, classes .chip/.status/.eyebrow/.label-mono/.caret/.halo/.grain, .btn*/.badge pill). - lib/theme.ts : singleton themeMode/resolvedTheme (dark/light/system, persistedRef arb.theme) + application dataset.theme/metas ; script anti-FOUC inline dans index.html ; toggle ActivityBar + Réglages. - Thèmes Monaco + xterm dark/light réactifs (palette ANSI + coloration syntaxique) ; fonts.ready + remeasureFonts pour l'alignement des glyphes. - status-tokens : tons sémantiques tokenisés ; balayage des ~340 couleurs Tailwind brutes vers les tokens sur tout components/* et views/* (exceptions assumées commentées). - GroupSummary.color exploité : icône de groupe teintée + ColorSwatchPicker (lib/group-colors.ts) dans les modals de groupe. - Polices via @fontsource-variable/{inter,jetbrains-mono} (offline).
This commit is contained in:
@@ -1,27 +1,27 @@
|
||||
<template>
|
||||
<div class="flex h-full flex-col">
|
||||
<p v-if="loading" class="p-3 text-xs text-zinc-500">{{ t('fs.loading') }}</p>
|
||||
<p v-else-if="error" class="p-3 text-xs text-rose-400">{{ error }}</p>
|
||||
<p v-else-if="binary" class="p-3 text-xs text-zinc-500">{{ t('diff.binary') }}</p>
|
||||
<p v-else-if="tooLarge" class="p-3 text-xs text-amber-500">{{ t('diff.tooLarge') }}</p>
|
||||
<p v-else-if="parsed.hunks.length === 0" class="p-3 text-xs text-zinc-500">{{ t('diff.noChanges') }}</p>
|
||||
<p v-if="loading" class="p-3 text-xs text-fg-subtle">{{ t('fs.loading') }}</p>
|
||||
<p v-else-if="error" class="p-3 text-xs text-danger">{{ error }}</p>
|
||||
<p v-else-if="binary" class="p-3 text-xs text-fg-subtle">{{ t('diff.binary') }}</p>
|
||||
<p v-else-if="tooLarge" class="p-3 text-xs text-warn">{{ t('diff.tooLarge') }}</p>
|
||||
<p v-else-if="parsed.hunks.length === 0" class="p-3 text-xs text-fg-subtle">{{ t('diff.noChanges') }}</p>
|
||||
<div v-else class="min-h-0 flex-1 overflow-auto">
|
||||
<div class="flex items-center gap-3 border-b border-zinc-800 px-3 py-1 text-[11px] text-zinc-500">
|
||||
<span class="text-emerald-500">+{{ parsed.additions }}</span>
|
||||
<span class="text-rose-500">−{{ parsed.deletions }}</span>
|
||||
<span v-if="staged" class="rounded bg-emerald-950 px-1 text-emerald-400">{{ t('git.staged') }}</span>
|
||||
<div class="flex items-center gap-3 border-b border-border px-3 py-1 text-[11px] text-fg-subtle">
|
||||
<span class="text-accent">+{{ parsed.additions }}</span>
|
||||
<span class="text-danger">−{{ parsed.deletions }}</span>
|
||||
<span v-if="staged" class="rounded bg-accent/15 px-1 text-accent">{{ t('git.staged') }}</span>
|
||||
</div>
|
||||
<table class="w-full border-collapse font-mono text-xs leading-5">
|
||||
<tbody>
|
||||
<template v-for="(h, hi) in parsed.hunks" :key="hi">
|
||||
<tr class="bg-zinc-900/60 text-sky-300/80">
|
||||
<td class="select-none px-2 text-right text-zinc-700" />
|
||||
<td class="select-none px-2 text-right text-zinc-700" />
|
||||
<tr class="bg-surface-1/60 text-info/80">
|
||||
<td class="select-none px-2 text-right text-fg-subtle" />
|
||||
<td class="select-none px-2 text-right text-fg-subtle" />
|
||||
<td class="whitespace-pre px-2">{{ h.header }}</td>
|
||||
</tr>
|
||||
<tr v-for="(l, li) in h.lines" :key="`${hi}-${li}`" :class="rowClass(l.type)">
|
||||
<td class="w-10 select-none px-2 text-right text-zinc-600">{{ l.oldLine ?? '' }}</td>
|
||||
<td class="w-10 select-none px-2 text-right text-zinc-600">{{ l.newLine ?? '' }}</td>
|
||||
<td class="w-10 select-none px-2 text-right text-fg-subtle">{{ l.oldLine ?? '' }}</td>
|
||||
<td class="w-10 select-none px-2 text-right text-fg-subtle">{{ l.newLine ?? '' }}</td>
|
||||
<td class="whitespace-pre px-2">{{ marker(l.type) }}{{ l.content }}</td>
|
||||
</tr>
|
||||
</template>
|
||||
@@ -66,9 +66,9 @@ async function load(): Promise<void> {
|
||||
watch(() => [props.repoId, props.wt, props.file, props.staged, props.version], load, { immediate: true });
|
||||
|
||||
function rowClass(type: DiffLineType): string {
|
||||
if (type === 'add') return 'bg-emerald-950/40 text-emerald-200';
|
||||
if (type === 'del') return 'bg-rose-950/40 text-rose-200';
|
||||
return 'text-zinc-300';
|
||||
if (type === 'add') return 'diff-add';
|
||||
if (type === 'del') return 'diff-del';
|
||||
return 'diff-ctx';
|
||||
}
|
||||
function marker(type: DiffLineType): string {
|
||||
return type === 'add' ? '+' : type === 'del' ? '-' : ' ';
|
||||
|
||||
Reference in New Issue
Block a user