Make DevTools a toggle in Settings > Developer tab
- DevTools off by default (no more auto-open on launch) - New "Developer" tab in Settings with a checkbox to toggle devtools - Toggle takes effect immediately (opens/closes inspector) - Setting persists: devtools restored on next launch if enabled - toggle_devtools Tauri command wraps window.open/close_devtools Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@ use commands::project::{
|
||||
create_project, delete_project, get_project, list_projects, load_project_file,
|
||||
load_project_transcript, save_project_file, save_project_transcript, update_segment,
|
||||
};
|
||||
use commands::settings::{load_settings, save_settings};
|
||||
use commands::settings::{load_settings, save_settings, toggle_devtools};
|
||||
use commands::sidecar::{check_sidecar, check_sidecar_update, download_sidecar};
|
||||
use commands::system::{
|
||||
get_data_dir, llama_list_models, llama_start, llama_status, llama_stop, log_frontend,
|
||||
@@ -41,8 +41,6 @@ pub fn run() {
|
||||
// Set the webview background to match the app's dark theme
|
||||
if let Some(window) = app.get_webview_window("main") {
|
||||
let _ = window.set_background_color(Some(Color(10, 10, 35, 255)));
|
||||
// Enable right-click → Inspect (requires "devtools" feature in Cargo.toml)
|
||||
window.open_devtools();
|
||||
}
|
||||
Ok(())
|
||||
})
|
||||
@@ -74,6 +72,7 @@ pub fn run() {
|
||||
download_sidecar,
|
||||
check_sidecar_update,
|
||||
log_frontend,
|
||||
toggle_devtools,
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running tauri application");
|
||||
|
||||
Reference in New Issue
Block a user