Finish bundled-template migration; simplify frontmatter; de-duplicate toolbar/menu
Completes the move off the external cookiecutter tool: drops src/cookiecutter.rs and the cookiecutter_bin/Template-path setting now that scaffolding always runs through the built-in MiniJinja engine, and rewrites default_project_template() to walk up from the executable without panicking when the bundled template can't be found. Rounds out the snowflake template with the remaining 06-Revisions, 07-Final, 08-Covers and 09-Archive folders. Simplifies the scene/chapter YAML frontmatter (drops type/word_count_min/ word_count_max in favor of status + a flat characters list) and updates the new-file template, header parsing, outline, file list and Story Bible editor to match. Separately, de-duplicates the toolbar and menu bar: settings that only existed as always-visible toolbar controls (draft marker, zero-pad, spell-check toggle, dictionary picker) move into their Settings windows, toolbar buttons that exactly duplicated a menu item are dropped, and toolbar-only actions with no menu path (open project folder, git sync/init) gain one under File. Also fixes two ambiguous menu labels: the Story Bible editor now reads "Story Bible editor…" next to "Story Bible…" in Tools instead of sharing a label with Edit, and Settings' "New project…" is now "New-project settings…" so it doesn't read like File's actual create action. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+23
-10
@@ -433,6 +433,26 @@ impl App {
|
||||
.weak(),
|
||||
);
|
||||
ui.separator();
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Draft marker:").on_hover_text(
|
||||
"Text above this line in each file (its header) is dropped on \
|
||||
export; # Title: / # Slug: lines become the chapter heading \
|
||||
and caption. Leave blank to export files whole.",
|
||||
);
|
||||
let r = ui.add(
|
||||
egui::TextEdit::singleline(&mut self.config.draft_marker)
|
||||
.desired_width(140.0),
|
||||
);
|
||||
save_now |= r.lost_focus();
|
||||
});
|
||||
let r = ui
|
||||
.checkbox(&mut self.config.zero_pad_index, "Zero-pad chapter #")
|
||||
.on_hover_text(
|
||||
"When a chapter title defaults to its number, pad it with \
|
||||
leading zeros (e.g. 03. of 12).",
|
||||
);
|
||||
save_now |= r.changed();
|
||||
ui.separator();
|
||||
if ui.button("Close").clicked() {
|
||||
close = true;
|
||||
}
|
||||
@@ -514,15 +534,6 @@ impl App {
|
||||
);
|
||||
save_now |= r.lost_focus();
|
||||
ui.end_row();
|
||||
|
||||
ui.label("Template path:");
|
||||
let r = ui.add(
|
||||
egui::TextEdit::singleline(&mut self.config.cookiecutter_bin)
|
||||
.hint_text("no longer used - built-in MiniJinja")
|
||||
.desired_width(280.0),
|
||||
);
|
||||
save_now |= r.lost_focus();
|
||||
ui.end_row();
|
||||
});
|
||||
ui.label(
|
||||
egui::RichText::new("✔ Built-in MiniJinja templating - no external tool needed")
|
||||
@@ -537,7 +548,9 @@ impl App {
|
||||
"Publish to Gitea after creation",
|
||||
)
|
||||
.on_hover_text(
|
||||
"When enabled and Gitea credentials are configured below, a new repository will be created and the project pushed to it.",
|
||||
"When enabled and Gitea credentials are configured below, \
|
||||
a new repository will be created and the project pushed \
|
||||
to it.",
|
||||
)
|
||||
.changed()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user