mirror of
https://github.com/SECTL/SecScore.git
synced 2026-07-19 21:14:21 +08:00
添加清除数据按钮、为OOBE修改命名
This commit is contained in:
@@ -7,7 +7,7 @@ edition = "2021"
|
||||
rust-version = "1.70"
|
||||
|
||||
[lib]
|
||||
name = "secscore"
|
||||
name = "secscore_lib"
|
||||
crate-type = ["staticlib", "cdylib", "lib"]
|
||||
|
||||
[build-dependencies]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use parking_lot::RwLock;
|
||||
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::migration::Migration;
|
||||
@@ -34,10 +34,10 @@ fn sqlite_db_path(app_handle: &AppHandle) -> Result<String, String> {
|
||||
std::fs::create_dir_all(&data_dir)
|
||||
.map_err(|e| format!("Failed to create data directory: {}", e))?;
|
||||
let db_path = data_dir.join("data.sql");
|
||||
db_path
|
||||
.to_str()
|
||||
.map(|s| s.to_string())
|
||||
.ok_or_else(|| "Invalid sqlite database path".to_string())
|
||||
match db_path.to_str() {
|
||||
Some(path) => Ok(path.to_owned()),
|
||||
None => Err("Invalid sqlite database path".to_string()),
|
||||
}
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||
|
||||
fn main() {
|
||||
secscore::run();
|
||||
secscore_lib::run();
|
||||
}
|
||||
|
||||
@@ -319,7 +319,7 @@
|
||||
},
|
||||
"about": {
|
||||
"title": "关于",
|
||||
"appName": "教育积分管理",
|
||||
"appName": "积分管理",
|
||||
"version": "版本",
|
||||
"copyright": "版权",
|
||||
"ipcStatus": "IPC 状态",
|
||||
|
||||
Reference in New Issue
Block a user