首页布局优化前

This commit is contained in:
iven
2026-03-17 23:26:16 +08:00
parent 74dbf42644
commit e262200f1e
89 changed files with 2266 additions and 2120 deletions

View File

@@ -1,4 +1,7 @@
// Browser action definitions for Hands system
// Note: These types are reserved for future Browser Hand automation features
#![allow(dead_code)]
use serde::{Deserialize, Serialize};

View File

@@ -324,10 +324,10 @@ impl BrowserClient {
let client = self.get_client(session_id).await?;
let locator = Locator::Css(selector);
// Use wait_for_find with proper API
// Use the new wait().for_element() API instead of deprecated wait_for_find
let element = tokio::time::timeout(
Duration::from_millis(timeout_ms),
client.wait_for_find(locator)
client.wait().for_element(locator)
)
.await
.map_err(|_| BrowserError::Timeout {

View File

@@ -1,8 +1,10 @@
// Tauri commands for browser automation
// Note: Some imports are reserved for future Browser Hand features
use crate::browser::actions::{ActionResult, BrowserAction, BrowserTask, FormField};
#![allow(unused_imports)]
use crate::browser::actions::BrowserAction;
use crate::browser::client::BrowserClient;
use crate::browser::error::BrowserError;
use crate::browser::session::{BrowserType, SessionConfig};
use serde::{Deserialize, Serialize};
use std::sync::Arc;

View File

@@ -1,4 +1,7 @@
// Browser automation error types
// Note: Some variants are reserved for future error handling scenarios
#![allow(dead_code)]
use serde::Serialize;
use thiserror::Error;

View File

@@ -1,5 +1,9 @@
// Browser automation module using Fantoccini
// Provides Browser Hand capabilities for ZCLAW
//
// Note: Public exports are reserved for future Browser Hand features
#![allow(unused_imports)]
pub mod client;
pub mod commands;
@@ -7,6 +11,7 @@ pub mod error;
pub mod session;
pub mod actions;
// Re-export main types for convenience
pub use client::BrowserClient;
pub use error::{BrowserError, Result};
pub use session::{BrowserSession, SessionConfig};

View File

@@ -166,6 +166,9 @@ impl SessionManager {
sessions.values().cloned().collect()
}
/// Get the number of active sessions
/// Reserved for future status dashboard
#[allow(dead_code)]
pub async fn session_count(&self) -> usize {
let sessions = self.sessions.read().await;
sessions.len()