fix(ui): semantic turquoise tokens, badge styling, saved fade animation

- Add turquoise/turquoise-fg semantic color tokens to layout.css
  (light + dark mode), replacing all hardcoded #00C7B1 in components
- Bump Details toggle from text-xs to text-sm for visual hierarchy
- Block badge: navy → turquoise, overlapping top-left card border
  with absolute positioning to visually link PDF annotation badges
- Saved indicator: smooth 300ms opacity fade before removal
  (new 'fading' state in SaveState type)
- Transcribe buttons: use border-turquoise/bg-turquoise/text-turquoise-fg

Fixes @Leonie concerns: toggle visual weight, semantic tokens,
badge styling, saved fade animation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-05 20:26:41 +02:00
parent b21778b3d1
commit a3fbcf346b
4 changed files with 41 additions and 17 deletions

View File

@@ -4,7 +4,7 @@ import { SvelteMap } from 'svelte/reactivity';
import TranscriptionBlock from './TranscriptionBlock.svelte';
import type { TranscriptionBlockData } from '$lib/types';
type SaveState = 'idle' | 'saving' | 'saved' | 'error';
type SaveState = 'idle' | 'saving' | 'saved' | 'fading' | 'error';
type Props = {
blocks: TranscriptionBlockData[];
@@ -50,7 +50,12 @@ async function executeSave(blockId: string) {
function scheduleSavedFade(blockId: string) {
setTimeout(() => {
if (getSaveState(blockId) === 'saved') {
setSaveState(blockId, 'idle');
setSaveState(blockId, 'fading');
setTimeout(() => {
if (getSaveState(blockId) === 'fading') {
setSaveState(blockId, 'idle');
}
}, 300);
}
}, 2000);
}