mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 14:35:41 +00:00
chore(tauri): enable devtools in dev builds only
Removes the explicit "devtools": false from tauri.conf.json so the Tauri default applies (true in debug, false in release). Auto-opens the inspector in the setup hook under #[cfg(debug_assertions)] so contributors get DevTools on `npm run tauri:dev` without right-clicking. `cargo check --release` confirms the open_devtools() call is hard-stripped from production binaries — the symbol does not exist in the release build. Helps debug WebView-side issues (CORS, TLS, axios responses) that the Rust-only logging mode does not capture. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3621,6 +3621,14 @@ pub fn run() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
|
{
|
||||||
|
use tauri::Manager;
|
||||||
|
if let Some(win) = app.get_webview_window("main") {
|
||||||
|
win.open_devtools();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ── System tray ───────────────────────────────────────────────
|
// ── System tray ───────────────────────────────────────────────
|
||||||
// Always build on startup when possible; the frontend calls toggle_tray_icon(false)
|
// Always build on startup when possible; the frontend calls toggle_tray_icon(false)
|
||||||
// immediately after load if the user has disabled the tray icon.
|
// immediately after load if the user has disabled the tray icon.
|
||||||
|
|||||||
@@ -23,8 +23,7 @@
|
|||||||
"decorations": true,
|
"decorations": true,
|
||||||
"transparent": false,
|
"transparent": false,
|
||||||
"visible": true,
|
"visible": true,
|
||||||
"dragDropEnabled": false,
|
"dragDropEnabled": false
|
||||||
"devtools": false
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"security": {
|
"security": {
|
||||||
|
|||||||
Reference in New Issue
Block a user