centralize tauri event names
This commit is contained in:
23
src-tauri/Cargo.lock
generated
23
src-tauri/Cargo.lock
generated
@@ -1227,6 +1227,7 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sha2",
|
"sha2",
|
||||||
|
"strum",
|
||||||
"tauri",
|
"tauri",
|
||||||
"tauri-build",
|
"tauri-build",
|
||||||
"tauri-plugin-dialog",
|
"tauri-plugin-dialog",
|
||||||
@@ -4279,6 +4280,28 @@ version = "0.11.1"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "strum"
|
||||||
|
version = "0.26.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
|
||||||
|
dependencies = [
|
||||||
|
"strum_macros",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "strum_macros"
|
||||||
|
version = "0.26.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
|
||||||
|
dependencies = [
|
||||||
|
"heck 0.5.0",
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"rustversion",
|
||||||
|
"syn 2.0.110",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "subtle"
|
name = "subtle"
|
||||||
version = "2.6.1"
|
version = "2.6.1"
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ tauri-plugin-process = "2"
|
|||||||
reqwest = { version = "0.12.23", features = ["json", "native-tls", "blocking"] }
|
reqwest = { version = "0.12.23", features = ["json", "native-tls", "blocking"] }
|
||||||
tokio-util = "0.7"
|
tokio-util = "0.7"
|
||||||
ts-rs = "11.0.1"
|
ts-rs = "11.0.1"
|
||||||
|
strum = { version = "0.26", features = ["derive"] }
|
||||||
device_query = "4.0.1"
|
device_query = "4.0.1"
|
||||||
dotenvy = "0.15.7"
|
dotenvy = "0.15.7"
|
||||||
keyring = { version = "3", features = ["apple-native", "windows-native", "sync-secret-service"] }
|
keyring = { version = "3", features = ["apple-native", "windows-native", "sync-secret-service"] }
|
||||||
|
|||||||
85
src-tauri/src/services/app_events.rs
Normal file
85
src-tauri/src/services/app_events.rs
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
use serde::Serialize;
|
||||||
|
#[allow(unused_imports)]
|
||||||
|
use std::{fs, path::Path};
|
||||||
|
use strum::{AsRefStr, EnumIter};
|
||||||
|
use ts_rs::TS;
|
||||||
|
|
||||||
|
#[derive(Serialize, TS, EnumIter, AsRefStr)]
|
||||||
|
#[serde(rename_all = "kebab-case")]
|
||||||
|
#[ts(export)]
|
||||||
|
pub enum AppEvents {
|
||||||
|
CursorPosition,
|
||||||
|
SceneInteractive,
|
||||||
|
AppDataRefreshed,
|
||||||
|
SetInteractionOverlay,
|
||||||
|
EditDoll,
|
||||||
|
CreateDoll,
|
||||||
|
UserStatusChanged,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl AppEvents {
|
||||||
|
pub fn as_str(&self) -> &'static str {
|
||||||
|
match self {
|
||||||
|
AppEvents::CursorPosition => "cursor-position",
|
||||||
|
AppEvents::SceneInteractive => "scene-interactive",
|
||||||
|
AppEvents::AppDataRefreshed => "app-data-refreshed",
|
||||||
|
AppEvents::SetInteractionOverlay => "set-interaction-overlay",
|
||||||
|
AppEvents::EditDoll => "edit-doll",
|
||||||
|
AppEvents::CreateDoll => "create-doll",
|
||||||
|
AppEvents::UserStatusChanged => "user-status-changed",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn export_bindings_appeventsconsts() {
|
||||||
|
use strum::IntoEnumIterator;
|
||||||
|
|
||||||
|
let some_export_dir = std::env::var("TS_RS_EXPORT_DIR")
|
||||||
|
.ok()
|
||||||
|
.map(|s| Path::new(&s).to_owned());
|
||||||
|
|
||||||
|
let Some(export_dir) = some_export_dir else {
|
||||||
|
eprintln!("TS_RS_EXPORT_DIR not set, skipping constants export");
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
|
let to_kebab_case = |s: &str| -> String {
|
||||||
|
let mut result = String::new();
|
||||||
|
for (i, c) in s.chars().enumerate() {
|
||||||
|
if c.is_uppercase() {
|
||||||
|
if i > 0 {
|
||||||
|
result.push('-');
|
||||||
|
}
|
||||||
|
result.push(c.to_lowercase().next().unwrap());
|
||||||
|
} else {
|
||||||
|
result.push(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
result
|
||||||
|
};
|
||||||
|
|
||||||
|
let mut lines = vec![
|
||||||
|
r#"// Auto-generated constants - DO NOT EDIT"#.to_string(),
|
||||||
|
r#"// Generated from Rust AppEvents enum"#.to_string(),
|
||||||
|
"".to_string(),
|
||||||
|
"export const AppEvents = {".to_string(),
|
||||||
|
];
|
||||||
|
|
||||||
|
for variant in AppEvents::iter() {
|
||||||
|
let name = variant.as_ref();
|
||||||
|
let kebab = to_kebab_case(name);
|
||||||
|
lines.push(format!(" {}: \"{}\",", name, kebab));
|
||||||
|
}
|
||||||
|
|
||||||
|
lines.push("} as const;".to_string());
|
||||||
|
lines.push("".to_string());
|
||||||
|
lines.push("export type AppEvents = typeof AppEvents[keyof typeof AppEvents];".to_string());
|
||||||
|
|
||||||
|
let constants_content = lines.join("\n");
|
||||||
|
|
||||||
|
let constants_path = export_dir.join("AppEventsConstants.ts");
|
||||||
|
if let Err(e) = fs::write(&constants_path, constants_content) {
|
||||||
|
eprintln!("Failed to write {}: {}", constants_path.display(), e);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,7 +8,7 @@ use tokio::sync::mpsc;
|
|||||||
use tracing::{debug, error, info, warn};
|
use tracing::{debug, error, info, warn};
|
||||||
use ts_rs::TS;
|
use ts_rs::TS;
|
||||||
|
|
||||||
use crate::{get_app_handle, lock_r, state::FDOLL};
|
use crate::{get_app_handle, lock_r, services::app_events::AppEvents, state::FDOLL};
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize, TS)]
|
#[derive(Debug, Clone, Serialize, Deserialize, TS)]
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
@@ -103,7 +103,7 @@ async fn init_cursor_tracking_i() -> Result<(), String> {
|
|||||||
crate::services::ws::report_cursor_data(mapped_for_ws).await;
|
crate::services::ws::report_cursor_data(mapped_for_ws).await;
|
||||||
|
|
||||||
// 2. Broadcast to local windows
|
// 2. Broadcast to local windows
|
||||||
if let Err(e) = app_handle.emit("cursor-position", &positions) {
|
if let Err(e) = app_handle.emit(AppEvents::CursorPosition.as_str(), &positions) {
|
||||||
error!("Failed to emit cursor position event: {:?}", e);
|
error!("Failed to emit cursor position event: {:?}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ use tauri::WebviewWindow;
|
|||||||
use tauri::{Emitter, Listener, Manager};
|
use tauri::{Emitter, Listener, Manager};
|
||||||
use tracing::{error, info};
|
use tracing::{error, info};
|
||||||
|
|
||||||
use crate::get_app_handle;
|
use crate::{get_app_handle, services::app_events::AppEvents};
|
||||||
|
|
||||||
static APP_MENU_WINDOW_LABEL: &str = "app_menu";
|
static APP_MENU_WINDOW_LABEL: &str = "app_menu";
|
||||||
|
|
||||||
@@ -76,17 +76,17 @@ pub async fn open_doll_editor_window(doll_id: Option<String>) {
|
|||||||
// Ensure overlay is active on parent (redundancy for safety)
|
// Ensure overlay is active on parent (redundancy for safety)
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
if let Some(parent) = app_handle.get_webview_window(APP_MENU_WINDOW_LABEL) {
|
if let Some(parent) = app_handle.get_webview_window(APP_MENU_WINDOW_LABEL) {
|
||||||
if let Err(e) = parent.emit("set-interaction-overlay", true) {
|
if let Err(e) = parent.emit(AppEvents::SetInteractionOverlay.as_str(), true) {
|
||||||
error!("Failed to ensure interaction overlay on parent: {}", e);
|
error!("Failed to ensure interaction overlay on parent: {}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Emit event to update context
|
// Emit event to update context
|
||||||
if let Some(id) = doll_id {
|
if let Some(id) = doll_id {
|
||||||
if let Err(e) = window.emit("edit-doll", id) {
|
if let Err(e) = window.emit(AppEvents::EditDoll.as_str(), id) {
|
||||||
error!("Failed to emit edit-doll event: {}", e);
|
error!("Failed to emit edit-doll event: {}", e);
|
||||||
}
|
}
|
||||||
} else if let Err(e) = window.emit("create-doll", ()) {
|
} else if let Err(e) = window.emit(AppEvents::CreateDoll.as_str(), ()) {
|
||||||
error!("Failed to emit create-doll event: {}", e);
|
error!("Failed to emit create-doll event: {}", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ pub async fn open_doll_editor_window(doll_id: Option<String>) {
|
|||||||
let app_handle_clone = get_app_handle().clone();
|
let app_handle_clone = get_app_handle().clone();
|
||||||
|
|
||||||
// Emit event to show overlay
|
// Emit event to show overlay
|
||||||
if let Err(e) = parent.emit("set-interaction-overlay", true) {
|
if let Err(e) = parent.emit(AppEvents::SetInteractionOverlay.as_str(), true) {
|
||||||
error!("Failed to emit set-interaction-overlay event: {}", e);
|
error!("Failed to emit set-interaction-overlay event: {}", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ pub async fn open_doll_editor_window(doll_id: Option<String>) {
|
|||||||
parent.unlisten(id);
|
parent.unlisten(id);
|
||||||
}
|
}
|
||||||
// Remove overlay if we failed
|
// Remove overlay if we failed
|
||||||
let _ = parent.emit("set-interaction-overlay", false);
|
let _ = parent.emit(AppEvents::SetInteractionOverlay.as_str(), false);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -204,7 +204,9 @@ pub async fn open_doll_editor_window(doll_id: Option<String>) {
|
|||||||
parent.unlisten(id);
|
parent.unlisten(id);
|
||||||
}
|
}
|
||||||
// Remove overlay
|
// Remove overlay
|
||||||
if let Err(e) = parent.emit("set-interaction-overlay", false) {
|
if let Err(e) = parent
|
||||||
|
.emit(AppEvents::SetInteractionOverlay.as_str(), false)
|
||||||
|
{
|
||||||
error!("Failed to remove interaction overlay: {}", e);
|
error!("Failed to remove interaction overlay: {}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -230,7 +232,7 @@ pub async fn open_doll_editor_window(doll_id: Option<String>) {
|
|||||||
if let Some(id) = parent_focus_listener_id {
|
if let Some(id) = parent_focus_listener_id {
|
||||||
parent.unlisten(id);
|
parent.unlisten(id);
|
||||||
}
|
}
|
||||||
let _ = parent.emit("set-interaction-overlay", false);
|
let _ = parent.emit(AppEvents::SetInteractionOverlay.as_str(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ use tauri::Manager;
|
|||||||
|
|
||||||
use crate::get_app_handle;
|
use crate::get_app_handle;
|
||||||
|
|
||||||
|
pub mod app_events;
|
||||||
pub mod app_menu;
|
pub mod app_menu;
|
||||||
pub mod auth;
|
pub mod auth;
|
||||||
pub mod client_config_manager;
|
pub mod client_config_manager;
|
||||||
@@ -10,10 +11,10 @@ pub mod doll_editor;
|
|||||||
pub mod health_manager;
|
pub mod health_manager;
|
||||||
pub mod health_monitor;
|
pub mod health_monitor;
|
||||||
pub mod interaction;
|
pub mod interaction;
|
||||||
|
pub mod petpet;
|
||||||
pub mod presence_modules;
|
pub mod presence_modules;
|
||||||
pub mod scene;
|
pub mod scene;
|
||||||
pub mod sprite_recolor;
|
pub mod sprite_recolor;
|
||||||
pub mod petpet;
|
|
||||||
pub mod welcome;
|
pub mod welcome;
|
||||||
pub mod ws;
|
pub mod ws;
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ use tauri::{Emitter, Manager};
|
|||||||
use tauri_plugin_positioner::WindowExt;
|
use tauri_plugin_positioner::WindowExt;
|
||||||
use tracing::{error, info, warn};
|
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 SCENE_WINDOW_LABEL: &str = "scene";
|
||||||
pub static SPLASH_WINDOW_LABEL: &str = "splash";
|
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);
|
error!("Failed to emit scene interactive event: {}", e);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ use tracing::warn;
|
|||||||
|
|
||||||
use crate::services::presence_modules::models::PresenceStatus;
|
use crate::services::presence_modules::models::PresenceStatus;
|
||||||
|
|
||||||
|
use crate::services::app_events::AppEvents;
|
||||||
|
|
||||||
use super::{emitter, types::WS_EVENT};
|
use super::{emitter, types::WS_EVENT};
|
||||||
|
|
||||||
/// User status payload sent to WebSocket server
|
/// User status payload sent to WebSocket server
|
||||||
@@ -17,8 +19,6 @@ pub struct UserStatusPayload {
|
|||||||
pub state: String,
|
pub state: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub static USER_STATUS_CHANGED: &str = "user-status-changed";
|
|
||||||
|
|
||||||
/// Debouncer for user status reports
|
/// Debouncer for user status reports
|
||||||
static USER_STATUS_REPORT_DEBOUNCE: Lazy<Mutex<Option<JoinHandle<()>>>> =
|
static USER_STATUS_REPORT_DEBOUNCE: Lazy<Mutex<Option<JoinHandle<()>>>> =
|
||||||
Lazy::new(|| Mutex::new(None));
|
Lazy::new(|| Mutex::new(None));
|
||||||
@@ -32,7 +32,7 @@ pub async fn report_user_status(status: UserStatusPayload) {
|
|||||||
handle.abort();
|
handle.abort();
|
||||||
}
|
}
|
||||||
|
|
||||||
emitter::emit_to_frontend(USER_STATUS_CHANGED, &status);
|
emitter::emit_to_frontend(AppEvents::UserStatusChanged.as_str(), &status);
|
||||||
|
|
||||||
// Schedule new report after 500ms
|
// Schedule new report after 500ms
|
||||||
let handle = async_runtime::spawn(async move {
|
let handle = async_runtime::spawn(async move {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
get_app_handle, lock_r, lock_w,
|
get_app_handle, lock_r, lock_w,
|
||||||
remotes::{dolls::DollsRemote, friends::FriendRemote, user::UserRemote},
|
remotes::{dolls::DollsRemote, friends::FriendRemote, user::UserRemote},
|
||||||
|
services::app_events::AppEvents,
|
||||||
state::FDOLL,
|
state::FDOLL,
|
||||||
};
|
};
|
||||||
use std::{collections::HashSet, sync::LazyLock};
|
use std::{collections::HashSet, sync::LazyLock};
|
||||||
@@ -210,7 +211,9 @@ pub async fn init_app_data_scoped(scope: AppDataRefreshScope) {
|
|||||||
let app_data_clone = guard.user_data.clone();
|
let app_data_clone = guard.user_data.clone();
|
||||||
drop(guard); // Drop lock before emitting to prevent potential deadlocks
|
drop(guard); // Drop lock before emitting to prevent potential deadlocks
|
||||||
|
|
||||||
if let Err(e) = get_app_handle().emit("app-data-refreshed", &app_data_clone) {
|
if let Err(e) =
|
||||||
|
get_app_handle().emit(AppEvents::AppDataRefreshed.as_str(), &app_data_clone)
|
||||||
|
{
|
||||||
warn!("Failed to emit app-data-refreshed event: {}", e);
|
warn!("Failed to emit app-data-refreshed event: {}", e);
|
||||||
use tauri_plugin_dialog::MessageDialogBuilder;
|
use tauri_plugin_dialog::MessageDialogBuilder;
|
||||||
use tauri_plugin_dialog::{DialogExt, MessageDialogKind};
|
use tauri_plugin_dialog::{DialogExt, MessageDialogKind};
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { writable } from "svelte/store";
|
|||||||
import { type UserData } from "../types/bindings/UserData";
|
import { type UserData } from "../types/bindings/UserData";
|
||||||
import { listen, type UnlistenFn } from "@tauri-apps/api/event";
|
import { listen, type UnlistenFn } from "@tauri-apps/api/event";
|
||||||
import { invoke } from "@tauri-apps/api/core";
|
import { invoke } from "@tauri-apps/api/core";
|
||||||
|
import { AppEvents } from "../types/bindings/AppEventsConstants";
|
||||||
|
|
||||||
export let appData = writable<UserData | null>(null);
|
export let appData = writable<UserData | null>(null);
|
||||||
|
|
||||||
@@ -12,7 +13,7 @@ export async function initAppDataListener() {
|
|||||||
try {
|
try {
|
||||||
if (isListening) return;
|
if (isListening) return;
|
||||||
appData.set(await invoke("get_app_data"));
|
appData.set(await invoke("get_app_data"));
|
||||||
unlisten = await listen<UserData>("app-data-refreshed", (event) => {
|
unlisten = await listen<UserData>(AppEvents.AppDataRefreshed, (event) => {
|
||||||
console.log("app-data-refreshed", event.payload);
|
console.log("app-data-refreshed", event.payload);
|
||||||
appData.set(event.payload);
|
appData.set(event.payload);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { writable } from "svelte/store";
|
|||||||
import type { CursorPositions } from "../types/bindings/CursorPositions";
|
import type { CursorPositions } from "../types/bindings/CursorPositions";
|
||||||
import type { CursorPosition } from "../types/bindings/CursorPosition";
|
import type { CursorPosition } from "../types/bindings/CursorPosition";
|
||||||
import type { DollDto } from "../types/bindings/DollDto";
|
import type { DollDto } from "../types/bindings/DollDto";
|
||||||
|
import { AppEvents } from "../types/bindings/AppEventsConstants";
|
||||||
|
|
||||||
export let cursorPositionOnScreen = writable<CursorPositions>({
|
export let cursorPositionOnScreen = writable<CursorPositions>({
|
||||||
raw: { x: 0, y: 0 },
|
raw: { x: 0, y: 0 },
|
||||||
@@ -52,7 +53,7 @@ export async function initCursorTracking() {
|
|||||||
try {
|
try {
|
||||||
// Listen to cursor position events (each window subscribes independently)
|
// Listen to cursor position events (each window subscribes independently)
|
||||||
unlistenCursor = await listen<CursorPositions>(
|
unlistenCursor = await listen<CursorPositions>(
|
||||||
"cursor-position",
|
AppEvents.CursorPosition,
|
||||||
(event) => {
|
(event) => {
|
||||||
cursorPositionOnScreen.set(event.payload);
|
cursorPositionOnScreen.set(event.payload);
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { listen, type UnlistenFn } from "@tauri-apps/api/event";
|
import { listen, type UnlistenFn } from "@tauri-apps/api/event";
|
||||||
import { writable } from "svelte/store";
|
import { writable } from "svelte/store";
|
||||||
|
import { AppEvents } from "../types/bindings/AppEventsConstants";
|
||||||
|
|
||||||
export const sceneInteractive = writable<boolean>(false);
|
export const sceneInteractive = writable<boolean>(false);
|
||||||
|
|
||||||
@@ -12,7 +13,7 @@ export async function initSceneInteractiveListener() {
|
|||||||
try {
|
try {
|
||||||
// ensure initial default matches backend default
|
// ensure initial default matches backend default
|
||||||
sceneInteractive.set(false);
|
sceneInteractive.set(false);
|
||||||
unlisten = await listen<boolean>("scene-interactive", (event) => {
|
unlisten = await listen<boolean>(AppEvents.SceneInteractive, (event) => {
|
||||||
sceneInteractive.set(Boolean(event.payload));
|
sceneInteractive.set(Boolean(event.payload));
|
||||||
});
|
});
|
||||||
isListening = true;
|
isListening = true;
|
||||||
|
|||||||
3
src/types/bindings/AppEvents.ts
Normal file
3
src/types/bindings/AppEvents.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
||||||
|
|
||||||
|
export type AppEvents = "cursor-position" | "scene-interactive" | "app-data-refreshed" | "set-interaction-overlay" | "edit-doll" | "create-doll" | "user-status-changed";
|
||||||
14
src/types/bindings/AppEventsConstants.ts
Normal file
14
src/types/bindings/AppEventsConstants.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// Auto-generated constants - DO NOT EDIT
|
||||||
|
// Generated from Rust AppEvents enum
|
||||||
|
|
||||||
|
export const AppEvents = {
|
||||||
|
CursorPosition: "cursor-position",
|
||||||
|
SceneInteractive: "scene-interactive",
|
||||||
|
AppDataRefreshed: "app-data-refreshed",
|
||||||
|
SetInteractionOverlay: "set-interaction-overlay",
|
||||||
|
EditDoll: "edit-doll",
|
||||||
|
CreateDoll: "create-doll",
|
||||||
|
UserStatusChanged: "user-status-changed",
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export type AppEvents = typeof AppEvents[keyof typeof AppEvents];
|
||||||
Reference in New Issue
Block a user