Files
WT-Offline/apps/launcher/src/renderer/src/shell/BottomBar.tsx
T
N0VAN0M4LY ebb2937a38 feat(launcher): add wordmark logo, ellipsis tooltips, auto-dismiss errors and online wording
Replace the title bar text mark with the white WTOffline wordmark SVG, add a window-level floating tooltip for truncated ellipsis text, auto-dismiss and manually close global error banners, and replace retail wording with online edition terminology across both locales and isolation patch titles.
2026-11-30 16:53:04 +08:00

40 lines
1.6 KiB
TypeScript

import { ProgressBar } from '../components/ProgressBar.tsx';
import type { BarModel, StatusTone } from './bar-model.ts';
const TONE_MARKS: Record<StatusTone, string> = { ok: '✓', warn: '!', bad: '✕', idle: '·', busy: '' };
/** Status, progress and the primary action, at the bottom of every page. */
export function BottomBar({ model }: { readonly model: BarModel }) {
const { tone, title, detail, progress, primary, secondary } = model;
return (
<section className="bottom-bar">
<div className="status" role="status">
<span className={`status-icon status-icon-${tone}`} aria-hidden="true">{TONE_MARKS[tone]}</span>
<div className="status-text">
<div className="status-title" data-ellipsis-tip={title}>{title}</div>
{detail !== undefined && (
<div className="status-detail" data-ellipsis-tip={typeof detail === 'string' ? detail : undefined}>{detail}</div>
)}
</div>
</div>
{secondary && (
<button type="button" className="secondary-action" onClick={secondary.onClick} disabled={secondary.disabled}>
{secondary.label}
</button>
)}
{progress && (
<div className="bar-progress">
<ProgressBar value={progress.value} max={progress.max} />
<div className="bar-progress-label">
<span>{progress.start}</span>
<span>{progress.end}</span>
</div>
</div>
)}
<button type="button" className="primary-action" onClick={primary.onClick} disabled={primary.disabled}>
{primary.label}
</button>
</section>
);
}