Every VM action had two bindings: one by name and one by driver and name. The window used only the second, so the first is gone and the WithDriver suffix with it. Unused bindings and frontend exports are removed too. Tests now reject bindings the window never calls, stale generated bindings and unused frontend exports. TypeScript rejects unused locals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
631 B
TypeScript
15 lines
631 B
TypeScript
import { t } from '../i18n'
|
|
import type { ParsedAppError } from '../i18n'
|
|
import type { Locale } from '../types'
|
|
|
|
export function NetworkErrorNotice({ error, locale }: { error: ParsedAppError | null; locale: Locale }) {
|
|
if (!error?.summary) return null
|
|
return <div className="notice notice-error" role="alert">
|
|
<div>{error.summary}{error.code && <> <span className="selectable">[{error.code}]</span></>}</div>
|
|
{error.rawDetail && <details className="network-error-details">
|
|
<summary>{t(locale, 'errRawDetailsToggle')}</summary>
|
|
<pre className="selectable">{error.rawDetail}</pre>
|
|
</details>}
|
|
</div>
|
|
}
|