Add a Help menu with a built-in Markdown cheatsheet
Mirrors the logrs cheatsheet: a scrollable reference window covering the markdown md-manuscript renders on export, plus the manuscript-specific conventions (# Title:/# Slug: metadata, the draft-marker header, and comments). Opened from Help ▸ Markdown cheatsheet in the menu bar. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+13
@@ -63,6 +63,8 @@ pub struct App {
|
||||
settings_test_rx: Option<std::sync::mpsc::Receiver<Result<usize, String>>>,
|
||||
/// Result line for the settings window's "Test connection" button.
|
||||
settings_test_status: String,
|
||||
/// Whether the markdown cheatsheet window is open.
|
||||
show_cheatsheet: bool,
|
||||
}
|
||||
|
||||
impl App {
|
||||
@@ -96,6 +98,7 @@ impl App {
|
||||
show_settings: false,
|
||||
settings_test_rx: None,
|
||||
settings_test_status: String::new(),
|
||||
show_cheatsheet: false,
|
||||
};
|
||||
app.open_workspace();
|
||||
app
|
||||
@@ -969,6 +972,12 @@ impl App {
|
||||
self.show_settings = true;
|
||||
}
|
||||
});
|
||||
ui.menu_button("Help", |ui| {
|
||||
if ui.button("📝 Markdown cheatsheet").clicked() {
|
||||
ui.close_menu();
|
||||
self.show_cheatsheet = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -1411,6 +1420,10 @@ impl eframe::App for App {
|
||||
self.settings_window(ctx);
|
||||
}
|
||||
|
||||
if self.show_cheatsheet {
|
||||
crate::help::cheatsheet_window(ctx, &mut self.show_cheatsheet);
|
||||
}
|
||||
|
||||
if self.pending_repo.is_some() {
|
||||
self.repo_prompt(ctx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user