sign in auth flow 👍

This commit is contained in:
2025-11-27 13:28:33 +08:00
parent 6fe397e868
commit bafbe271d8
9 changed files with 838 additions and 51 deletions

View File

@@ -1,24 +1,19 @@
use crate::get_app_handle;
pub static SCENE_WINDOW_LABEL: &str = "scene";
pub fn overlay_fullscreen(window: &tauri::Window) -> Result<(), tauri::Error> {
// Get the primary monitor
let monitor = get_app_handle().primary_monitor()?.unwrap();
let monitor_position = monitor.position();
let monitor_size = monitor.size();
// Set window position to top-left
// Get the work area (usable space, excluding menu bar/dock/notch)
let work_area = monitor.work_area();
// Set window position to top-left of the work area
window.set_position(tauri::PhysicalPosition {
x: monitor_position.x,
y: monitor_position.y,
x: work_area.position.x,
y: work_area.position.y,
})?;
// Set window size to match screen size
// Set window size to match work area size
window.set_size(tauri::PhysicalSize {
width: monitor_size.width,
height: monitor_size.height,
width: work_area.size.width,
height: work_area.size.height,
})?;
Ok(())
}