fix: less fragile dev brain sources revisions
This commit is contained in:
@@ -704,7 +704,7 @@ impl App {
|
||||
]
|
||||
.spacing(8);
|
||||
|
||||
container(row![
|
||||
let base: Element<'_, Message> = container(row![
|
||||
container(navigation)
|
||||
.width(210)
|
||||
.height(Length::Fill)
|
||||
@@ -731,6 +731,39 @@ impl App {
|
||||
])
|
||||
.width(Length::Fill)
|
||||
.height(Length::Fill)
|
||||
.into();
|
||||
if !self.restore_dev_brain_confirmation {
|
||||
return base;
|
||||
}
|
||||
let confirmation = container(
|
||||
column![
|
||||
text("Recreate Dev Brain guidance?").size(22),
|
||||
text("This replaces purpose.md and schema.md in the selected vault with this version's defaults. Topic pages, generated indexes, skills, and log.md are preserved.")
|
||||
.size(13),
|
||||
row![
|
||||
Space::new().width(Length::Fill),
|
||||
action_button("Cancel")
|
||||
.on_press(Message::CancelRestoreDevBrainDefaultGuides),
|
||||
danger_button("Recreate files")
|
||||
.on_press(Message::ConfirmRestoreDevBrainDefaultGuides),
|
||||
]
|
||||
.spacing(8),
|
||||
]
|
||||
.spacing(14),
|
||||
)
|
||||
.padding(22)
|
||||
.width(460)
|
||||
.style(overview_style);
|
||||
stack![
|
||||
base,
|
||||
opaque(
|
||||
container(confirmation)
|
||||
.center_x(Length::Fill)
|
||||
.center_y(Length::Fill)
|
||||
.style(|_| container::Style::default()
|
||||
.background(Color::from_rgba8(0, 0, 0, 0.68)))
|
||||
)
|
||||
]
|
||||
.into()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user