Files
arboretum/packages/web/src/views/HelpView.vue
Johan LEROY 063f5e928b 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).
2026-07-20 21:30:57 +02:00

69 lines
2.7 KiB
Vue

<template>
<div class="flex flex-col gap-4">
<PageHeader :title="t('help.title')">
<template #search>
<div class="relative">
<Search :size="15" class="pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-fg-subtle" />
<input v-model="query" class="input pl-8" :placeholder="t('help.searchPlaceholder')" />
</div>
</template>
</PageHeader>
<p class="text-sm text-fg-muted">{{ t('help.intro') }}</p>
<section v-for="section in filtered" :key="section.id" class="card flex flex-col gap-3">
<header class="flex items-center gap-2">
<component :is="iconFor(section.id)" :size="18" class="text-accent" :stroke-width="1.75" />
<h2 class="text-sm font-semibold text-fg">{{ section.title }}</h2>
</header>
<p class="text-xs text-fg-subtle">{{ section.blurb }}</p>
<dl class="flex flex-col gap-2">
<div v-for="(item, i) in section.items" :key="i" class="card-inset">
<dt class="text-sm font-medium text-fg">{{ item.title }}</dt>
<dd class="mt-0.5 text-sm leading-relaxed text-fg-muted">{{ item.body }}</dd>
</div>
</dl>
</section>
<EmptyState v-if="!filtered.length" :icon="SearchX" :title="t('help.noMatch')" />
</div>
</template>
<script setup lang="ts">
import { computed, ref, type Component } from 'vue';
import { useI18n } from 'vue-i18n';
import { Boxes, Command, GitBranch, KeyRound, Puzzle, Search, SearchX, Settings, Smartphone, TerminalSquare } from '@lucide/vue';
import type { AppLocale } from '../i18n';
import { helpSections, type HelpSection } from './help-content';
import PageHeader from '../components/layout/PageHeader.vue';
import EmptyState from '../components/ui/EmptyState.vue';
const { t, locale } = useI18n();
const query = ref('');
const ICONS: Record<string, Component> = {
gettingStarted: KeyRound,
worktrees: GitBranch,
sessions: TerminalSquare,
mobile: Smartphone,
groups: Boxes,
productivity: Command,
settings: Settings,
integrations: Puzzle,
};
const iconFor = (id: string): Component => ICONS[id] ?? KeyRound;
const sections = computed<HelpSection[]>(() => helpSections[locale.value as AppLocale] ?? helpSections.en);
const filtered = computed<HelpSection[]>(() => {
const q = query.value.trim().toLowerCase();
if (!q) return sections.value;
return sections.value
.map((s) => {
const sectionMatches = (s.title + ' ' + s.blurb).toLowerCase().includes(q);
const items = sectionMatches ? s.items : s.items.filter((it) => (it.title + ' ' + it.body).toLowerCase().includes(q));
return items.length ? { ...s, items } : null;
})
.filter((s): s is HelpSection => s !== null);
});
</script>