refactor(settings): rename Dock setting to system tray (showInDock → showInTray)

- compat: map legacy showInDock to showInTray when loading settings
- ui(copy): clarify “system tray (menu bar)” vs Dock in SettingsModal
- tauri(settings): return showInTray in get_settings; adjust default fallback
- docs(comment): align comments to “system tray” terminology across code
- note: no functional change yet; tray visibility toggle remains unimplemented
This commit is contained in:
Jason
2025-09-11 20:20:27 +08:00
parent c597b9b122
commit 9fbce5d0cf
4 changed files with 18 additions and 13 deletions

View File

@@ -567,9 +567,9 @@ pub async fn open_app_config_folder(handle: tauri::AppHandle) -> Result<bool, St
/// 获取设置
#[tauri::command]
pub async fn get_settings(_state: State<'_, AppState>) -> Result<serde_json::Value, String> {
// 暂时返回默认设置
// 暂时返回默认设置:系统托盘(菜单栏)显示开关
Ok(serde_json::json!({
"showInDock": true
"showInTray": true
}))
}
@@ -579,7 +579,7 @@ pub async fn save_settings(
_state: State<'_, AppState>,
settings: serde_json::Value,
) -> Result<bool, String> {
// TODO: 实现设置保存逻辑
// TODO: 实现系统托盘显示开关的保存与应用(显示/隐藏菜单栏托盘图标)
log::info!("保存设置: {:?}", settings);
Ok(true)
}