添加清除数据按钮、为OOBE修改命名

This commit is contained in:
Linkon
2026-03-21 00:31:07 +08:00
parent 12d6be331c
commit 517ce1e6bd
4 changed files with 790 additions and 790 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ edition = "2021"
rust-version = "1.70" rust-version = "1.70"
[lib] [lib]
name = "secscore" name = "secscore_lib"
crate-type = ["staticlib", "cdylib", "lib"] crate-type = ["staticlib", "cdylib", "lib"]
[build-dependencies] [build-dependencies]
+5 -5
View File
@@ -1,6 +1,6 @@
use parking_lot::RwLock; use parking_lot::RwLock;
use std::sync::Arc; use std::sync::Arc;
use tauri::{AppHandle, Emitter, State}; use tauri::{AppHandle, Emitter, Manager, State};
use crate::db::connection::{create_sqlite_connection, DatabaseType}; use crate::db::connection::{create_sqlite_connection, DatabaseType};
use crate::db::migration::Migration; use crate::db::migration::Migration;
@@ -34,10 +34,10 @@ fn sqlite_db_path(app_handle: &AppHandle) -> Result<String, String> {
std::fs::create_dir_all(&data_dir) std::fs::create_dir_all(&data_dir)
.map_err(|e| format!("Failed to create data directory: {}", e))?; .map_err(|e| format!("Failed to create data directory: {}", e))?;
let db_path = data_dir.join("data.sql"); let db_path = data_dir.join("data.sql");
db_path match db_path.to_str() {
.to_str() Some(path) => Ok(path.to_owned()),
.map(|s| s.to_string()) None => Err("Invalid sqlite database path".to_string()),
.ok_or_else(|| "Invalid sqlite database path".to_string()) }
} }
#[tauri::command] #[tauri::command]
+1 -1
View File
@@ -1,5 +1,5 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() { fn main() {
secscore::run(); secscore_lib::run();
} }
File diff suppressed because it is too large Load Diff