centralize tauri event names

This commit is contained in:
2026-03-06 16:34:24 +08:00
parent 0e6b497cf6
commit 59253d286c
14 changed files with 155 additions and 20 deletions

View File

@@ -8,7 +8,7 @@ use tauri::{Emitter, Manager};
use tauri_plugin_positioner::WindowExt;
use tracing::{error, info, warn};
use crate::get_app_handle;
use crate::{get_app_handle, services::app_events::AppEvents};
pub static SCENE_WINDOW_LABEL: &str = "scene";
pub static SPLASH_WINDOW_LABEL: &str = "splash";
@@ -69,7 +69,7 @@ pub fn update_scene_interactive(interactive: bool, should_click: bool) {
}
}
if let Err(e) = window.emit("scene-interactive", &interactive) {
if let Err(e) = window.emit(AppEvents::SceneInteractive.as_str(), &interactive) {
error!("Failed to emit scene interactive event: {}", e);
}
} else {