Make the engine choice explicit and show route-D telemetry

The toolbar now treats the engine as route-d|v1 instead of a boolean whose v1
state omitted the query parameter (which now means route-d on the server). Both
preview and PDF always send an explicit engine query, the old localStorage key
migrates, and route-D is the default with a v1 escape hatch.

The preview status tolerates a missing duration, displays the warning count with
details on hover, and reports when X-Preview-Engine differs from the selected
engine; PDF export shows a fallback notice. The README documents the toggle and
the X-Preview-Engine response header.
This commit is contained in:
gloamxun committed 2026-10-27 12:23:32 +08:00
1 parent 24c95938d2
commit cecad51f91
3 files changed
+53 -16

No files matched your search

+1 -1
View File
@@ -66,7 +66,7 @@
<span>实时预览</span>
<span class="head-right">
<span class="status" id="preview-status"></span>
<button class="btn small" id="toggle-engine" title="切换预览使用的排版内核">引擎: v1</button>
<button class="btn small" id="toggle-engine" title="切换预览使用的排版内核(Route-D 为实验引擎)">引擎: Route-D (实验)</button>
<button class="btn small" id="export-pdf">导出 PDF</button>
</span>
</div>