diff --git a/src-tauri/src/database.rs b/src-tauri/src/database.rs index 2226b29..b15844f 100644 --- a/src-tauri/src/database.rs +++ b/src-tauri/src/database.rs @@ -45,8 +45,9 @@ pub fn setup(app: &mut tauri::App) -> Result<(), Box> { .take(16) .map(char::from) .collect(); - sqlx::query("INSERT INTO history (id, content_type, content) VALUES (?, text, ?)") + sqlx::query("INSERT INTO history (id, content_type, content) VALUES (?, ?, ?)") .bind(id) + .bind("text") .bind("Welcome to your clipboard history!") .execute(&pool) .await diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index ee7bcfe..44c2509 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -35,6 +35,13 @@ fn main() { window.show().unwrap(); } + #[cfg(dev)] + { + let window = app.get_webview_window("main").unwrap(); + window.open_devtools(); + window.close_devtools(); + } + Ok(()) }) .on_window_event(|app, event| match event {