Revert "feat: 实现依赖注入系统、插件架构和窗口管理"

This reverts commit 18eada8ff3.
This commit is contained in:
Yukino_fox
2026-05-02 14:08:44 +08:00
parent 8c7aaadabc
commit 3e85c32c9c
47 changed files with 180 additions and 5347 deletions
-58
View File
@@ -169,61 +169,3 @@ pub async fn window_start_dragging(
}
Ok(())
}
#[tauri::command]
pub async fn open_settings_window(app: AppHandle) -> Result<(), String> {
#[cfg(not(desktop))]
{
let _ = app;
return Err("Not supported on mobile".to_string());
}
#[cfg(desktop)]
{
// 检查设置窗口是否已存在
if let Some(window) = app.get_webview_window("settings") {
// 如果窗口已存在,将其置于前台
window.set_focus().map_err(|e| e.to_string())?;
return Ok(());
}
// 创建新的设置窗口
let window = tauri::WebviewWindowBuilder::new(
&app,
"settings",
tauri::WebviewUrl::App("/settings-window".into()),
)
.title("SecScore 设置")
.inner_size(900.0, 650.0)
.min_inner_size(700.0, 500.0)
.center()
.decorations(false)
.transparent(false)
.resizable(true)
.build()
.map_err(|e| e.to_string())?;
// 在开发模式下打开开发者工具
#[cfg(debug_assertions)]
window.open_devtools();
Ok(())
}
}
#[tauri::command]
pub async fn close_settings_window(app: AppHandle) -> Result<(), String> {
#[cfg(not(desktop))]
{
let _ = app;
return Ok(());
}
#[cfg(desktop)]
{
if let Some(window) = app.get_webview_window("settings") {
window.close().map_err(|e| e.to_string())?;
}
Ok(())
}
}
-2
View File
@@ -131,8 +131,6 @@ pub fn run() {
toggle_devtools,
window_resize,
window_set_resizable,
open_settings_window,
close_settings_window,
db_test_connection,
db_switch_connection,
db_get_status,