feat: TUI settings panel on key 6 with per-section preference editors backed by the same GUI settings backends (issue #29)
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
-- Distilled from: lib/bds/tui.ex, lib/bds/ui/sidebar.ex, lib/bds/ui/post_editor/*.ex
|
||||
|
||||
entity TuiState {
|
||||
view: posts | media | templates | scripts | tags
|
||||
view: posts | media | templates | scripts | tags | settings | git
|
||||
focus: sidebar | editor
|
||||
selected_index: Integer
|
||||
editing_post: Boolean
|
||||
@@ -116,6 +116,24 @@ rule CommandPrompt {
|
||||
ensures: CommandListShownOrExecuted()
|
||||
}
|
||||
|
||||
rule SettingsPanel {
|
||||
when: TuiKeyPressed(code: "6")
|
||||
-- "6" opens the settings panel (issue #29), matching the GUI panel
|
||||
-- numbering: the sidebar lists the same preference sections as the
|
||||
-- GUI settings editor (Project, Editor, Content, AI, Technology,
|
||||
-- Publishing, Data, MCP, Style — from BDS.UI.Sidebar's settings
|
||||
-- view). Enter on a section opens a section-specific editor in the
|
||||
-- main area: a generic typed-field form from BDS.UI.SettingsForm.
|
||||
-- Enter edits a text field in a status-line prompt, toggles a
|
||||
-- boolean, or cycles an enum through its options; read-only info
|
||||
-- rows are skipped by the selection. ctrl+s saves the section
|
||||
-- through the same backends as the GUI editor (BDS.Metadata,
|
||||
-- BDS.Settings, BDS.AI, BDS.MCP.AgentConfig) and reloads the form;
|
||||
-- esc cancels the prompt, then closes the form. Category removal
|
||||
-- and AI model discovery remain GUI-only.
|
||||
ensures: SettingsFormShownEditedOrSaved()
|
||||
}
|
||||
|
||||
rule GitPanel {
|
||||
when: TuiKeyPressed(code: "7")
|
||||
-- "7" opens the git panel (issue #30) for content sync: the sidebar
|
||||
|
||||
Reference in New Issue
Block a user