feat(webui): log buffer export + view presets (B3)

- 导出当前视图: a toolbar button dumps the current (filtered) log view to a
  client-side `.log` text file — no server endpoint, respects the active level
  filter + search.
- 视图预设: 开发 / 运维 / 精简 presets bundle the existing display prefs
  (visibleLevels / maxLines / autoScroll / wrap); a new `UiLogsPrefs.preset`
  field stores the active id. Any hand edit to those prefs drops to 自定义.
  The client owns the preset→prefs bundles; the server just stores + validates
  the id (oneOf, defaults custom). No non-chronological reordering, per plan.
This commit is contained in:
DrSmoothl committed 2026-06-16 14:36:02 +08:00
1 parent 1a0bc12ec0
commit 7355fe9ea4
4 files changed
+88 -7

No files matched your search

@@ -39,7 +39,7 @@ const ALL_LEVELS = ['trace', 'debug', 'info', 'success', 'warn', 'error'];
export function defaultPages(): UiPages {
return {
defaultRoute: '/',
logs: { visibleLevels: [...ALL_LEVELS], maxLines: 1000, autoScroll: true, wrap: true, highlightRules: [] },
logs: { visibleLevels: [...ALL_LEVELS], maxLines: 1000, autoScroll: true, wrap: true, highlightRules: [], preset: 'custom' },
processesSort: 'pid',
configTab: '',
};