import { tr } from '../lib/i18n'; import { Icon, type IconName } from './ui'; import type { TuneProgress } from '../lib/native-tune'; import type { Outcome } from '../lib/tune-outcome'; import { tokS } from '../lib/tune-outcome'; import { tunePhase, tuneSpeeds } from '../lib/tune-phase'; const STEPS: { icon: IconName; title: string; running: string }[] = [ { icon: 'cpu', title: 'Checking your PC', running: 'Looking at your graphics card and memory' }, { icon: 'gauge', title: 'Measuring the base speed', running: 'Timing your current settings' }, { icon: 'sliders', title: 'Trying settings', running: 'Trying other settings, one at a time' }, { icon: 'thinking', title: 'Confirming the best one', running: 'Repeating the test to be sure' }, { icon: 'disk', title: 'Saving', running: 'Keeping it for this model; you can undo it' }, ]; const fmt = (n: number) => (Math.round(n * 10) / 10).toFixed(1); function Spark({ values }: { values: number[] }) { if (values.length < 2) return