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).
61 lines
2.0 KiB
Vue
61 lines
2.0 KiB
Vue
<template>
|
|
<div class="pointer-events-none fixed inset-x-0 bottom-0 z-50 flex flex-col items-end gap-2 p-4 sm:bottom-4 sm:right-4 sm:left-auto sm:p-0">
|
|
<TransitionGroup name="toast">
|
|
<div
|
|
v-for="toast in store.toasts"
|
|
:key="toast.id"
|
|
class="pointer-events-auto flex w-full max-w-sm items-start gap-2 rounded-lg border px-3 py-2 shadow-pop"
|
|
:class="toneClass(toast.kind)"
|
|
:role="toast.kind === 'error' ? 'alert' : 'status'"
|
|
:aria-live="toast.kind === 'error' ? 'assertive' : 'polite'"
|
|
>
|
|
<component :is="icon(toast.kind)" :size="16" class="mt-0.5 shrink-0" />
|
|
<span class="min-w-0 flex-1 break-words text-sm">{{ toast.message }}</span>
|
|
<button
|
|
class="shrink-0 rounded p-0.5 opacity-70 transition-opacity hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-strong/50"
|
|
:aria-label="t('toast.dismiss')"
|
|
@click="store.dismiss(toast.id)"
|
|
>
|
|
<X :size="14" />
|
|
</button>
|
|
</div>
|
|
</TransitionGroup>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { useI18n } from 'vue-i18n';
|
|
import { CheckCircle2, AlertTriangle, Info, X } from '@lucide/vue';
|
|
import { useToastsStore, type ToastKind } from '../stores/toasts';
|
|
|
|
const { t } = useI18n();
|
|
const store = useToastsStore();
|
|
|
|
function toneClass(kind: ToastKind): string {
|
|
if (kind === 'success') return 'border-accent/40 bg-accent/15 text-accent';
|
|
if (kind === 'error') return 'border-danger/40 bg-danger/15 text-danger';
|
|
return 'border-border-strong bg-surface-1 text-fg';
|
|
}
|
|
function icon(kind: ToastKind) {
|
|
return kind === 'success' ? CheckCircle2 : kind === 'error' ? AlertTriangle : Info;
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
.toast-enter-active,
|
|
.toast-leave-active {
|
|
transition: opacity 0.18s ease, transform 0.18s ease;
|
|
}
|
|
.toast-enter-from,
|
|
.toast-leave-to {
|
|
opacity: 0;
|
|
transform: translateY(8px);
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.toast-enter-active,
|
|
.toast-leave-active {
|
|
transition: none;
|
|
}
|
|
}
|
|
</style>
|