mirror of
https://github.com/FranP-code/ChatGPT.git
synced 2025-10-13 00:13:25 +00:00
chore: export markdown
This commit is contained in:
@@ -40,6 +40,13 @@ pub fn download(_app: AppHandle, name: String, blob: Vec<u8>) {
|
||||
utils::open_file(path);
|
||||
}
|
||||
|
||||
#[command]
|
||||
pub fn save_file(_app: AppHandle, name: String, content: String) {
|
||||
let path = api::path::download_dir().unwrap().join(name);
|
||||
fs::write(&path, content).unwrap();
|
||||
utils::open_file(path);
|
||||
}
|
||||
|
||||
#[command]
|
||||
pub fn open_link(app: AppHandle, url: String) {
|
||||
api::shell::open(&app.shell_scope(), url, None).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user