feat: Add Story Bible breakout editor window
- Add new module src/app/story_bible_editor.rs for dedicated Story Bible editing - Add 'Edit -> Story Bible' menu option to open the editor - Tree view (left 1/3) shows Story Bible directory structure with collapsible folders - Editor (right 2/3) allows editing selected Story Bible items - Auto-load first file on open, support Ctrl+S to save - Rebuild Story Bible index after saving to pick up changes - Update README.md with Story Bible Editor documentation Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
+15
-1
@@ -23,10 +23,11 @@ mod diff;
|
||||
mod editor;
|
||||
mod file_list;
|
||||
mod find;
|
||||
mod grammar;
|
||||
mod outline;
|
||||
mod project;
|
||||
mod grammar;
|
||||
mod spelling;
|
||||
mod story_bible_editor;
|
||||
mod story_bible_ui;
|
||||
mod style;
|
||||
mod ui;
|
||||
@@ -381,6 +382,12 @@ pub struct App {
|
||||
selected_bible_item: Option<String>,
|
||||
/// References found in the current draft file.
|
||||
current_references: Vec<crate::story_bible::StoryBibleReference>,
|
||||
/// Whether the Story Bible breakout editor window is open.
|
||||
show_story_bible_editor: bool,
|
||||
/// The content being edited in the Story Bible editor.
|
||||
story_bible_editor_content: String,
|
||||
/// The workspace-relative path of the file being edited in the Story Bible editor.
|
||||
story_bible_editor_path: Option<String>,
|
||||
}
|
||||
|
||||
impl App {
|
||||
@@ -485,6 +492,9 @@ impl App {
|
||||
show_story_bible: false,
|
||||
selected_bible_item: None,
|
||||
current_references: Vec::new(),
|
||||
show_story_bible_editor: false,
|
||||
story_bible_editor_content: String::new(),
|
||||
story_bible_editor_path: None,
|
||||
};
|
||||
app.load_spell_dict();
|
||||
app.open_workspace();
|
||||
@@ -611,6 +621,10 @@ impl eframe::App for App {
|
||||
self.story_bible_window(ctx);
|
||||
}
|
||||
|
||||
if self.show_story_bible_editor {
|
||||
self.story_bible_editor_window(ctx);
|
||||
}
|
||||
|
||||
if self.show_manuscript_settings {
|
||||
self.manuscript_settings_window(ctx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user