Persist segment text edits to database on Enter
- Add update_segment Tauri command (calls existing update_segment_text query) - Wire onTextEdit handler from TranscriptEditor to invoke update_segment - Edits are saved to SQLite immediately when user presses Enter Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -91,6 +91,16 @@ pub fn delete_project(id: String, state: State<AppState>) -> Result<(), String>
|
||||
queries::delete_project(&conn, &id).map_err(|e| e.to_string())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn update_segment(
|
||||
segment_id: String,
|
||||
new_text: String,
|
||||
state: State<AppState>,
|
||||
) -> Result<(), String> {
|
||||
let conn = state.db.lock().map_err(|e| e.to_string())?;
|
||||
queries::update_segment_text(&conn, &segment_id, &new_text).map_err(|e| e.to_string())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn save_project_transcript(
|
||||
project_id: String,
|
||||
|
||||
Reference in New Issue
Block a user