This commit is contained in:
2025-07-15 17:13:35 +01:00
parent 1117ce9f13
commit fe8bbae68e
11 changed files with 201 additions and 49 deletions
+9 -2
View File
@@ -13,7 +13,7 @@ use egui_file::DialogType;
use object::ObjectInstance;
use template::{FieldType, Template};
use crate::{explorer::Explorer, note::Note};
use crate::{explorer::Explorer, main_editor::MainEditor, note::Note};
static PROJECT_FOLDER: LazyLock<PathBuf> = LazyLock::new(|| {
let mut path = std::env::current_dir().unwrap();
@@ -147,14 +147,21 @@ impl eframe::App for Interface {
ui.separator();
let mut to_load: Option<RightPanelContent> = None;
let mut load_doc: Option<MainEditor> = None;
ScrollArea::vertical().show(ui, |ui| {
self.explorer.ui(&mut to_load, ui);
self.explorer.ui(&mut to_load, &mut load_doc, ui);
});
if let Some(to_load) = to_load {
self.right_panel_content = to_load;
}
if let Some(load_doc) = load_doc {
self.editor = load_doc;
self.editor.show_editor = true;
self.editor.show_preview = true;
}
});
// Main content area