get rid of debug windows on launch
This commit is contained in:
@@ -2,6 +2,7 @@ use tauri::{AppHandle, Manager, WebviewUrl};
|
|||||||
|
|
||||||
const WINDOW_LABEL: &str = "debug";
|
const WINDOW_LABEL: &str = "debug";
|
||||||
|
|
||||||
|
#[allow(dead_code)]
|
||||||
pub fn init(handle: &AppHandle) {
|
pub fn init(handle: &AppHandle) {
|
||||||
if let Some(window) = handle.get_webview_window(WINDOW_LABEL) {
|
if let Some(window) = handle.get_webview_window(WINDOW_LABEL) {
|
||||||
if !window.is_visible().unwrap() {
|
if !window.is_visible().unwrap() {
|
||||||
|
|||||||
@@ -9,8 +9,8 @@ pub mod splashscreen;
|
|||||||
mod tray;
|
mod tray;
|
||||||
|
|
||||||
pub fn init(app_handle: &AppHandle) {
|
pub fn init(app_handle: &AppHandle) {
|
||||||
#[cfg(debug_assertions)]
|
// #[cfg(debug_assertions)]
|
||||||
debug::init(app_handle);
|
// debug::init(app_handle);
|
||||||
scene::init(app_handle);
|
scene::init(app_handle);
|
||||||
control_panel::init(app_handle);
|
control_panel::init(app_handle);
|
||||||
tray::init(app_handle);
|
tray::init(app_handle);
|
||||||
|
|||||||
@@ -176,8 +176,8 @@ pub fn open_window(app_handle: &AppHandle) -> Result<tauri::WebviewWindow, Strin
|
|||||||
|
|
||||||
let window = builder.build().map_err(|e: tauri::Error| e.to_string())?;
|
let window = builder.build().map_err(|e: tauri::Error| e.to_string())?;
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
// #[cfg(debug_assertions)]
|
||||||
window.open_devtools();
|
// window.open_devtools();
|
||||||
|
|
||||||
Ok(window)
|
Ok(window)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user