Add collaborative authored-file safety

This commit is contained in:
Rbanh committed 2026-07-12 11:27:57 -04:00
1 parent b4aa61e394
commit 5a82a9ee29
23 files changed
+2857 -89

No files matched your search

+11
View File
@@ -7,6 +7,7 @@ use egui_phosphor_icons::icons;
use crate::history::EditorHistory;
use crate::operators::ActiveOperator;
use crate::project::collaboration::{file_status_indicator_ui, CollaborationState};
use crate::scene_io::SceneIo;
use crate::state::{EditorMode, PlayPaused};
@@ -47,6 +48,16 @@ pub fn status_bar_ui(
.on_hover_text(status);
},
|ui| {
if let (Some(state), Some(path)) = (
world.get_resource::<CollaborationState>(),
world.resource::<SceneIo>().active_path.as_deref(),
) {
let status = state.file_status(path);
if status.indicator().is_some() {
let _ = file_status_indicator_ui(ui, &status, path);
ui.separator();
}
}
let (mode_icon, mode_label, mode_color) = match mode {
EditorMode::Editing => (icons::PENCIL_SIMPLE, "EDIT", ACCENT),
EditorMode::Playing => {